From ad0ae5d83af50e747e727b361e6d97ecb0022e51 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 8 Dec 2009 13:50:41 +0000 Subject: [PATCH] Fix some *at declarations. * libc/include/stdio.h (symlinkat): Move this... * libc/include/sys/_default_fcntl.h (unlinkat): ...and this... * libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to match POSIX. --- newlib/ChangeLog | 8 ++++++++ newlib/libc/include/stdio.h | 1 - newlib/libc/include/sys/_default_fcntl.h | 1 - newlib/libc/include/sys/unistd.h | 4 ++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 10ffe9d24..d45432757 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,11 @@ +2009-12-08 Eric Blake + + Fix some *at declarations. + * libc/include/stdio.h (symlinkat): Move this... + * libc/include/sys/_default_fcntl.h (unlinkat): ...and this... + * libc/include/sys/unistd.h (symlinkat, unlinkat): ...here, to + match POSIX. + 2009-12-03 Craig Howland * libc/stdlib/strtod.c: Correct "NO_REENT" to "_REENT_ONLY". diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index b9c8745bc..8389449c2 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -348,7 +348,6 @@ FILE * _EXFUN(fmemopen, (void *, size_t, const char *)); FILE * _EXFUN(open_memstream, (char **, size_t *)); #if defined (__CYGWIN__) int _EXFUN(renameat, (int, const char *, int, const char *)); -int _EXFUN(symlinkat, (const char *, int, const char *)); #endif int _EXFUN(vdprintf, (int, const char *, __VALIST) _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); diff --git a/newlib/libc/include/sys/_default_fcntl.h b/newlib/libc/include/sys/_default_fcntl.h index ccef6132e..eb30e5cda 100644 --- a/newlib/libc/include/sys/_default_fcntl.h +++ b/newlib/libc/include/sys/_default_fcntl.h @@ -181,7 +181,6 @@ extern int fcntl _PARAMS ((int, int, ...)); #include extern int futimesat _PARAMS ((int, const char *, const struct timeval *)); extern int openat _PARAMS ((int, const char *, int, ...)); -extern int unlinkat _PARAMS ((int, const char *, int)); #endif /* Provide _ prototypes for functions provided by some versions diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index cc507a9ea..5abe5f709 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -242,6 +242,10 @@ ssize_t _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen)); ssize_t _EXFUN(readlinkat, (int __dirfd1, const char *__path, char *__buf, size_t __buflen)); #endif int _EXFUN(symlink, (const char *__name1, const char *__name2)); +#if defined(__CYGWIN__) +int _EXFUN(symlinkat, (const char *, int, const char *)); +int _EXFUN(unlinkat, (int, const char *, int)); +#endif #define F_OK 0 #define R_OK 4