Re: time_r module does not work on MingW

2019-11-24 Thread Bruno Haible
This patch introduced a regression: > 2019-11-16 Bruno Haible > > time_r: Fix for mingw. > Reported by Christian Biesinger in > . > * lib/time.in.h: On mingw, include . > * m4/time_r.m4 (gl_TIME

Re: time_r module does not work on MingW

2019-11-16 Thread Bruno Haible
This patch fixes the issue. The cause was that the contents of in mingw depends on whether or was included before. 2019-11-16 Bruno Haible time_r: Fix for mingw. Reported by Christian Biesinger in

Re: time_r module does not work on MingW

2019-11-11 Thread Bruno Haible
> Here is the testcase: > #include "build-gnulib-gdbserver/config.h" > #include "pathmax.h" > #include "time.h" > > x86_64-w64-mingw32-g++ test.cc -I build-gnulib-gdbserver/import/ -I > ~/binutils-gdb/gnulib/import/ > > It turns out that the pathmax.h include is required for this to fail. > Alter

Re: time_r module does not work on MingW

2019-11-11 Thread Christian Biesinger
(I accidentally sent this from the wrong email address. Please respond to my google.com address, not gmail.com) Thanks for your responses! The patch above does not fix the issue because apparently REPLACE_LOCALTIME_R is defined as GNULIB_PORTCHECK which is not defined. Replacing that with #if 1 d

Re: time_r module does not work on MingW

2019-11-11 Thread Bruno Haible
Hi, Christian Biesinger wrote: > I tried to use the time_r module with GDB (using Gnulib > revision 38237baf99386101934cd93278023aa4ae523ec0) > > However, I found that it does not compile, see logs at: > https://gdb-buildbot.osci.io/#/builders/23/builds/934 It is hard for me to do guesswork, bas

Re: time_r module does not work on MingW

2019-11-11 Thread Paul Eggert
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..cb5fe3d8

time_r module does not work on MingW

2019-11-11 Thread Christian Biesinger
Hello! I tried to use the time_r module with GDB (using Gnulib revision 38237baf99386101934cd93278023aa4ae523ec0) However, I found that it does not compile, see logs at: https://gdb-buildbot.osci.io/#/builders/23/builds/934 Apparently, the MingW time.h has localtime_r and gmtime_r defined as __f