summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog6
-rw-r--r--newlib/libc/include/sys/time.h39
2 files changed, 25 insertions, 20 deletions
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 <me.cygwin2012@cgf.cx>
+
+ * 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 <vinschen@redhat.com>
* 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 <cygwin/sys_time.h>
-#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 <cygwin/sys_time.h>
+#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));