Cygwin declare nanosleep() patch

Jason Tishler
Fri Jan 24 17:28:00 GMT 2003

Cygwin recently added support for nanosleep():

The attached patch is one way of adding the missing nanosleep()
declaration to newlib's time.h.

I'm not happy about the "yank and put" style of this patch, but I was
trying to avoid perturbing time.h too much.  I'm quite willing to factor
to eliminate the "duplicate" declaration, if desired.


PGP/GPG Key: or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
-------------- next part --------------
Index: time.h
RCS file: /cvs/src/src/newlib/libc/include/time.h,v
retrieving revision 1.11
diff -u -p -r1.11 time.h
--- time.h	26 Aug 2002 19:05:48 -0000	1.11
+++ time.h	24 Jan 2003 16:32:47 -0000
@@ -159,6 +159,10 @@ int _EXFUN(timer_getoverrun, (timer_t ti
 /* High Resolution Sleep, P1003.1b-1993, p. 269 */
 int _EXFUN(nanosleep, (const struct timespec  *rqtp, struct timespec *rmtp));
+#ifdef __CYGWIN__
+int _EXFUN(nanosleep, (const struct timespec  *rqtp, struct timespec *rmtp));
+#endif /* __CYGWIN__ */
 #ifdef __cplusplus
-------------- next part --------------
2003-01-24  Jason Tishler  <>

	* libc/include/time.h: Declare nanosleep() under Cygwin.

More information about the Newlib mailing list