summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/creat.c
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-21 17:45:53 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-21 17:45:53 +0000
commit4ae685ecc4e94df58b5a7da4915716cbe651d932 (patch)
tree7802ce2c5e37f284f7f8d5454c798cbebbb14d03 /libc/sysdeps/linux/common/creat.c
parentadf2de51a26bcac06af741c3ab3e62622e30a5d6 (diff)
downloaduClibc-alpine-4ae685ecc4e94df58b5a7da4915716cbe651d932.tar.bz2
uClibc-alpine-4ae685ecc4e94df58b5a7da4915716cbe651d932.tar.xz
Added some missing files:
creat.c: to provide creat function longjmp.c: to provide longjmp implementation for sh4 tsd.c: to provide implementation of __libc_dl_error_tsd Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/sysdeps/linux/common/creat.c')
-rw-r--r--libc/sysdeps/linux/common/creat.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/creat.c b/libc/sysdeps/linux/common/creat.c
new file mode 100644
index 000000000..429b4824c
--- /dev/null
+++ b/libc/sysdeps/linux/common/creat.c
@@ -0,0 +1,16 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * open() for uClibc
+ *
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+#include <fcntl.h>
+
+extern int __libc_open(const char *file, int flags, ...);
+
+int creat(const char *file, mode_t mode)
+{
+ return __libc_open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
+}