Hi Currently we implement both open () and creat () in same file called open.c. With nptl we have its own implementation of open so the build mechanism overrides the default open.c implementation by removing open.c from compile. It also removes creat () implementation and hence we miss creat () on nptl.
This patch separates out the creat () implementation into its own file. that way we get creat () in nptl too. OK for trunk and uClibc-nptl branch ? Thx -Khem Signed-off-by: Khem Raj <k...@uclibc.org>
Index: libc/sysdeps/linux/common/creat.c =================================================================== --- libc/sysdeps/linux/common/creat.c (revision 0) +++ libc/sysdeps/linux/common/creat.c (revision 0) @@ -0,0 +1,15 @@ +/* vi: set sw=4 ts=4: */ +/* + * creat() for uClibc + * + * Copyright (C) 2009 <k...@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); +} Index: libc/sysdeps/linux/common/open.c =================================================================== --- libc/sysdeps/linux/common/open.c (revision 25530) +++ libc/sysdeps/linux/common/open.c (working copy) @@ -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); -}
_______________________________________________ uClibc mailing list uClibc@uclibc.org http://lists.busybox.net/mailman/listinfo/uclibc