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

Reply via email to