svn commit: [25556] trunk/uClibc/libc/sysdeps/linux/common

kraj at uclibc.org kraj at uclibc.org
Thu Mar 5 19:07:01 UTC 2009


Author: kraj
Date: 2009-03-05 19:07:01 +0000 (Thu, 05 Mar 2009)
New Revision: 25556

Log:
Define creat in an independent file

Added:
   trunk/uClibc/libc/sysdeps/linux/common/creat.c

Modified:
   trunk/uClibc/libc/sysdeps/linux/common/open.c


Changeset:
Added: trunk/uClibc/libc/sysdeps/linux/common/creat.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/creat.c	                        (rev 0)
+++ trunk/uClibc/libc/sysdeps/linux/common/creat.c	2009-03-05 19:07:01 UTC (rev 25556)
@@ -0,0 +1,15 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * creat() for uClibc
+ *
+ * Copyright (C) 2009 <kraj at uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+ */
+
+#include <fcntl.h>
+
+int creat(const char *file, mode_t mode)
+{
+	return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
+}

Modified: trunk/uClibc/libc/sysdeps/linux/common/open.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/open.c	2009-03-05 19:00:17 UTC (rev 25555)
+++ trunk/uClibc/libc/sysdeps/linux/common/open.c	2009-03-05 19:07:01 UTC (rev 25556)
@@ -37,8 +37,3 @@
 libc_hidden_weak(open)
 strong_alias(open,__libc_open)
 #endif
-
-int creat(const char *file, mode_t mode)
-{
-	return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
-}



More information about the uClibc-cvs mailing list