[PATCH] Cygwin: POSIX Clock Selection option

Corinna Vinschen vinschen@redhat.com
Sat Jul 23 23:25:00 GMT 2011


Hi Yaakov,

thanks for the patch.

On Jul 20 04:53, Yaakov (Cygwin/X) wrote:
> 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 */
> +

Please move this block of code right after the _POSIX_TIMERS block
(about line 177) and add its own __cplusplus/extern "C" bracket.

With this change the patch is good to go.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Newlib mailing list