This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Cygwin: POSIX Clock Selection option
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Wed, 20 Jul 2011 16:15:11 +0200
- Subject: Re: [PATCH] Cygwin: POSIX Clock Selection option
- References: <1311155598.7796.73.camel@YAAKOV04>
- Reply-to: newlib at sourceware dot org
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