From d31a862312eebff8f99e28f30d245248408b538b Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 3 Nov 2005 16:52:15 +0000 Subject: [PATCH] 2005-11-03 Shaun Jackman * libc/include/sys/unistd.h (readlink, symlink): Provide these prototypes by default. * libc/sys/linux/include/unistd.h (readlink): Remove this prototype. * libc/sys/linux/sys/unistd.h (readlink, symlink): New prototypes. --- newlib/ChangeLog | 9 +++++++++ newlib/libc/include/sys/unistd.h | 2 +- newlib/libc/sys/linux/include/unistd.h | 2 -- newlib/libc/sys/linux/sys/unistd.h | 2 ++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 4adf5c1b9..dd96d27ee 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,12 @@ +2005-11-03 Shaun Jackman + + * libc/include/sys/unistd.h (readlink, symlink): Provide these + prototypes by default. + * libc/sys/linux/include/unistd.h (readlink): Remove this + prototype. + * libc/sys/linux/sys/unistd.h (readlink, symlink): New + prototypes. + 2005-11-01 Ralf Corsepius * libc/include/stdint.h: Cleanup #if vs. #ifdef. diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index e9215e24d..a670dd735 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -211,9 +211,9 @@ void _EXFUN(sync, (void)); #else /* defined(__rtems__) */ int _EXFUN(sync, (void)); #endif +#endif int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen)); int _EXFUN(symlink, (const char *__name1, const char *__name2)); -#endif #define F_OK 0 #define R_OK 4 diff --git a/newlib/libc/sys/linux/include/unistd.h b/newlib/libc/sys/linux/include/unistd.h index e2f562a3a..55ecc3a4e 100644 --- a/newlib/libc/sys/linux/include/unistd.h +++ b/newlib/libc/sys/linux/include/unistd.h @@ -15,6 +15,4 @@ extern char *optarg; extern int optind, opterr, optopt; -int readlink(const char *path, char *buf, size_t bufsiz); - #endif diff --git a/newlib/libc/sys/linux/sys/unistd.h b/newlib/libc/sys/linux/sys/unistd.h index e720d6b72..502fb473a 100644 --- a/newlib/libc/sys/linux/sys/unistd.h +++ b/newlib/libc/sys/linux/sys/unistd.h @@ -72,6 +72,7 @@ int _EXFUN(pipe, (int __fildes[2] )); ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset)); ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset)); _READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte )); +int _EXFUN(readlink, (const char *path, char *buf, size_t bufsiz)); int _EXFUN(rmdir, (const char *__path )); void * _EXFUN(sbrk, (ptrdiff_t __incr)); int _EXFUN(setegid, (gid_t __gid )); @@ -83,6 +84,7 @@ pid_t _EXFUN(setsid, (void )); int _EXFUN(setuid, (uid_t __uid )); unsigned _EXFUN(sleep, (unsigned int __seconds )); void _EXFUN(swab, (const void *, void *, ssize_t)); +int _EXFUN(symlink, (const char *oldpath, const char *newpath)); long _EXFUN(sysconf, (int __name )); pid_t _EXFUN(tcgetpgrp, (int __fildes )); int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));