bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] time: port __need_time_t to MinGW


From: Paul Eggert
Subject: [PATCH] time: port __need_time_t to MinGW
Date: Mon, 27 Jul 2015 07:55:44 -0700

* 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
---
 ChangeLog     | 6 ++++++
 lib/time.in.h | 8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9787fda..59a23d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-07-27  Paul Eggert  <address@hidden>
+
+       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  <address@hidden>
 
        strftime: fix newly-introduced bug on Solaris
diff --git a/lib/time.in.h b/lib/time.in.h
index a5cb55d..0d37572 100644
--- 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 address@hidden@_TIME_H)
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]