[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: time_r module does not work on MingW
From: |
Paul Eggert |
Subject: |
Re: time_r module does not work on MingW |
Date: |
Mon, 11 Nov 2019 11:53:04 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 11/11/19 10:56 AM, Christian Biesinger wrote:
I'm not sure what the best fix is but this seems unfortunate?
I don't use C++ so you'll have to help me out on this one. Would the followiung
patch work, and if not why not?
diff --git a/lib/time.in.h b/lib/time.in.h
index 94e1da3a8..cb5fe3d84 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -157,7 +157,7 @@ _GL_CXXALIASWARN (mktime);
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/gmtime_r.html>.
*/
# if @GNULIB_TIME_R@
# if @REPLACE_LOCALTIME_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE && !defined
__MINGW32__)
# undef localtime_r
# define localtime_r rpl_localtime_r
# endif
@@ -179,7 +179,7 @@ _GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const
*restrict __timer,
_GL_CXXALIASWARN (localtime_r);
# endif
# if @REPLACE_LOCALTIME_R@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE && !defined
__MINGW32__)
# undef gmtime_r
# define gmtime_r rpl_gmtime_r
# endif
- time_r module does not work on MingW, Christian Biesinger, 2019/11/11
- Re: time_r module does not work on MingW,
Paul Eggert <=
- Re: time_r module does not work on MingW, Bruno Haible, 2019/11/11
- Re: time_r module does not work on MingW, Christian Biesinger, 2019/11/11
- Re: time_r module does not work on MingW, Bruno Haible, 2019/11/11
- Re: time_r module does not work on MingW, Bruno Haible, 2019/11/16
- wctype.h compile error on mingw with GNULIB_NAMESPACE, Christian Biesinger, 2019/11/16
- Re: wctype.h compile error on mingw with GNULIB_NAMESPACE, Bruno Haible, 2019/11/16
- Re: wctype.h compile error on mingw with GNULIB_NAMESPACE, Christian Biesinger, 2019/11/16
- Re: wctype.h compile error on mingw with GNULIB_NAMESPACE, Bruno Haible, 2019/11/24
- Re: wctype.h compile error on mingw with GNULIB_NAMESPACE, Christian Biesinger, 2019/11/25
- Re: wctype.h compile error on mingw with GNULIB_NAMESPACE, Bruno Haible, 2019/11/25