From 86fd769f376c45762b5f26abe35b706309ec7257 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 12 Nov 2012 15:57:35 +0000 Subject: * libc/include/sys/time.h: Avoid guarding other than timeval declaration with _TIMEVAL_DEFINED. Move timeval related macros under _TIMEVAL_DEFINED control. --- newlib/ChangeLog | 6 ++++++ newlib/libc/include/sys/time.h | 39 +++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) (limited to 'newlib') diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 30bf3e4f9..676f147d7 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2012-11-11 Christopher Faylor + + * libc/include/sys/time.h: Avoid guarding other than timeval + declaration with _TIMEVAL_DEFINED. Move timeval related macros under + _TIMEVAL_DEFINED control. + 2012-11-01 Corinna Vinschen * libc/include/locale.h (NULL): Fetch definition via stddef.h. diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index b388b2c5f..120ef553a 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -19,26 +19,6 @@ struct timeval { suseconds_t tv_usec; }; -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - -#ifdef __CYGWIN__ -#include -#endif /* __CYGWIN__ */ - -#endif /* !_TIMEVAL_DEFINED */ - -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerval { - struct timeval it_interval; - struct timeval it_value; -}; - /* BSD time macros used by RTEMS code */ #if defined (__rtems__) || defined (__CYGWIN__) @@ -70,6 +50,25 @@ struct itimerval { } \ } while (0) #endif /* defined (__rtems__) || defined (__CYGWIN__) */ +#endif /* !_TIMEVAL_DEFINED */ + +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; + +#ifdef __CYGWIN__ +#include +#endif /* __CYGWIN__ */ + +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 2 + +struct itimerval { + struct timeval it_interval; + struct timeval it_value; +}; #ifdef _COMPILING_NEWLIB int _EXFUN(_gettimeofday, (struct timeval *__p, void *__tz)); -- cgit v1.2.3