Note the libc/include/sys/unistd.h: to change from:
unsigned _EXFUN(usleep, (unsigned int __useconds));
To:
int _EXFUN(usleep, (useconds_t __useconds));
So we match both the existing usleep.c and POSIX.
You can't just do that arbitrarily for Cygwin and RTEMS. That
function prototype is protected by their OS flags being set on. If
the prototype is not a typo error, then you must leave it alone.
The RTEMS implementation is
int usleep( useconds_t useconds );
and the unistd.h we are using with the RPMs has it as:
int _EXFUN(usleep, (useconds_t __useconds));
Our patch to newlib has this fragment
@@ -200,7 +200,7 @@
int _EXFUN(getdtablesize, (void));
int _EXFUN(setdtablesize, (int));
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));
So I guess we are using the POSIX usleep profile and it just hasn't gotten
merged.