This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Don't control timespec definition with time_t define
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sourceware dot org
- Date: Tue, 26 Jun 2012 17:35:21 +0200
- Subject: Re: [PATCH] Don't control timespec definition with time_t define
- References: <20120626144828.GA22424@ednor.casa.cgf.cx>
- Reply-to: newlib at sourceware dot org
On Jun 26 10:48, Christopher Faylor wrote:
> Ok to submit?
>
> cgf
>
> 2012-06-26 Christopher Faylor <me.newlib2012@cgf.cx>
>
> * libc/include/sys/types.h: Don't use the same preprocessor guard for
> time_t and timespec.
> Index: libc/include/sys/types.h
> ===================================================================
> RCS file: /cvs/uberbaum/newlib/libc/include/sys/types.h,v
> retrieving revision 1.37
> diff -d -u -p -r1.37 types.h
> --- libc/include/sys/types.h 1 Aug 2011 17:22:18 -0000 1.37
> +++ libc/include/sys/types.h 26 Jun 2012 14:47:37 -0000
> @@ -109,19 +109,22 @@ typedef _CLOCK_T_ clock_t;
> #ifndef __time_t_defined
> typedef _TIME_T_ time_t;
> #define __time_t_defined
> +#endif
>
> +#ifndef __timespec_defined
> +#define __timespec_defined
> /* Time Value Specification Structures, P1003.1b-1993, p. 261 */
>
> struct timespec {
> time_t tv_sec; /* Seconds */
> long tv_nsec; /* Nanoseconds */
> };
> +#endif
>
> struct itimerspec {
> struct timespec it_interval; /* Timer period */
> struct timespec it_value; /* Timer expiration */
> };
> -#endif
>
> typedef long daddr_t;
> typedef char * caddr_t;
Yes, just add a note about excluding the definition of itimerspec to
the ChangeLog.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat