changeset 18068:90195ad97c8b

time: port __need_time_t to MinGW * lib/time.in.h (__need_time_t): Do not treat specially on MinGW. Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 27 Jul 2015 07:53:36 -0700
parents 0295f80643fc
children 1c6c8e9218c9
files ChangeLog lib/time.in.h
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-27  Paul Eggert  <eggert@cs.ucla.edu>
+
+	time: port __need_time_t to MinGW
+	* lib/time.in.h (__need_time_t): Do not treat specially on MinGW.
+	Fix reported by Eli Zaretskii in: http://bugs.gnu.org/21020#36
+
 2015-07-25  Paul Eggert  <eggert@cs.ucla.edu>
 
 	strftime: fix newly-introduced bug on Solaris
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -22,11 +22,13 @@
 
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
-   symbols.  Also, Solaris 8 <time.h> eventually includes itself
+   symbols.  (However, skip this for MinGW as it treats __need_time_t
+   incompatibly.)  Also, Solaris 8 <time.h> eventually includes itself
    recursively; if that is happening, just include the system <time.h>
    without adding our own declarations.  */
-#if (defined __need_time_t || defined __need_clock_t \
-     || defined __need_timespec \
+#if (((defined __need_time_t || defined __need_clock_t \
+       || defined __need_timespec)                     \
+      && !defined __MINGW32__)                         \
      || defined _@GUARD_PREFIX@_TIME_H)
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@