This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] sys/unistd.h: Unconditionally declare SUSv3 functions
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Wed, 22 Mar 2006 15:33:56 -0700
- Subject: [PATCH] sys/unistd.h: Unconditionally declare SUSv3 functions
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
2006-03-22 Shaun Jackman <sjackman@gmail.com>
* libc/include/sys/unistd.h: Unconditionally declare the
SUSv3 functions ualarm, usleep, gethostname, mktemp, sync,
readlink, symlink.
(usleep): Change the declaration to match SUSv3.
(readlink): Ditto.
Index: newlib/libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.56
diff -u -r1.56 unistd.h
--- newlib/libc/include/sys/unistd.h 3 Nov 2005 16:52:15 -0000 1.56
+++ newlib/libc/include/sys/unistd.h 22 Mar 2006 22:29:54 -0000
@@ -199,8 +199,9 @@
#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(getdtablesize, (void));
int _EXFUN(setdtablesize, (int));
+#endif
useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
-unsigned _EXFUN(usleep, (unsigned int __useconds));
+int _EXFUN(usleep, (useconds_t __useconds));
#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
int _EXFUN(gethostname, (char *__name, size_t __len));
@@ -211,8 +212,7 @@
#else /* defined(__rtems__) */
int _EXFUN(sync, (void));
#endif
-#endif
-int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
+int _EXFUN(readlink, (const char *__path, char *__buf, size_t __buflen));
int _EXFUN(symlink, (const char *__name1, const char *__name2));
#define F_OK 0