This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Cygwin: POSIX Clock Selection option


I'm about to implement the POSIX Clock Selection option on Cygwin, so
here is the relevant patch for newlib's headers.


Yaakov
Cygwin/X

2011-07-20  Yaakov Selkowitz  <yselkowitz@...>

	* libc/include/time.h [_POSIX_CLOCK_SELECTION] (clock_nanosleep):
	Declare.
	* libc/include/sys/features.h [__CYGWIN__] (_POSIX_CLOCK_SELECTION):
	Define.

Index: libc/include/time.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/time.h,v
retrieving revision 1.20
diff -u -p -r1.20 time.h
--- libc/include/time.h	16 May 2011 22:35:10 -0000	1.20
+++ libc/include/time.h	20 Jul 2011 08:42:29 -0000
@@ -236,6 +236,14 @@ extern "C" {
 
 #endif
 
+#if defined(_POSIX_CLOCK_SELECTION)
+
+int _EXFUN(clock_nanosleep,
+  (clockid_t clock_id, int flags, const struct timespec *rqtp,
+   struct timespec *rmtp));
+
+#endif /* _POSIX_CLOCK_SELECTION */
+
 #if defined(_POSIX_CPUTIME)
 
 /* Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 */
Index: libc/include/sys/features.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/features.h,v
retrieving revision 1.26
diff -u -p -r1.26 features.h
--- libc/include/sys/features.h	16 May 2011 22:35:10 -0000	1.26
+++ libc/include/sys/features.h	20 Jul 2011 08:42:29 -0000
@@ -102,7 +102,7 @@ extern "C" {
 /* #define _POSIX_ASYNCHRONOUS_IO		    -1 */
 /* #define _POSIX_BARRIERS			    -1 */
 #define _POSIX_CHOWN_RESTRICTED			     1
-/* #define _POSIX_CLOCK_SELECTION		    -1 */
+#define _POSIX_CLOCK_SELECTION			200112L
 #define _POSIX_CPUTIME			    	200112L
 #define _POSIX_FSYNC				200112L
 #define _POSIX_IPV6				200112L

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]