summaryrefslogtreecommitdiffstats
path: root/newlib
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2012-11-12 15:57:35 +0000
committerChristopher Faylor <me@cgf.cx>2012-11-12 15:57:35 +0000
commit86fd769f376c45762b5f26abe35b706309ec7257 (patch)
tree69805a35992f3177b8d184f60a733e9933a1805d /newlib
parentd10aaa0ecfe5f4f2a40a69e6c545ea6c06316fdf (diff)
downloadcygnal-86fd769f376c45762b5f26abe35b706309ec7257.tar.gz
cygnal-86fd769f376c45762b5f26abe35b706309ec7257.tar.bz2
cygnal-86fd769f376c45762b5f26abe35b706309ec7257.zip
* libc/include/sys/time.h: Avoid guarding other than timeval declaration with
_TIMEVAL_DEFINED. Move timeval related macros under _TIMEVAL_DEFINED control.
Diffstat (limited to 'newlib')
-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));