Re: rename strftime module

2017-05-02 Thread Bernhard Voelker
On 05/03/2017 12:30 AM, Bruno Haible wrote: >> What exactly do you mean by "fell into ..."? > > I mean that the bootstrap.conf requests the module 'strftime', whose benefit > is that it supports GNU extensions in the format string, but it does not get > used. > > 'nstrftime' is meant to lift thi

Re: tzset: add native Windows workaround

2017-05-02 Thread Paul Eggert
Bruno Haible wrote: Only for Cygwin, an empty or absent TZ environment variable means GMT. That's weird; I don't know of any other system that does that. In many systems, an empty but set TZ means UTC0 without leap seconds; but an unset TZ typically means "ask the file system for the time zo

Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg

2017-05-02 Thread Paul Eggert
On 05/02/2017 02:55 PM, Bruno Haible wrote: it would be good to know what qualms you have with the msvc-nothrow module. Should Emacs be built with mingw, not MSVC? Is an EBADF situation never going to occur in Emacs anyway? Are the portability efforts for mingw and MSVC in Gnulib useless for Emac

Re: rename strftime module

2017-05-02 Thread Bruno Haible
Bernhard Voelker wrote: > > 1) It suggests that it defines the function 'strftime', but in fact it > > defines 'nstrftime'. GNU findutils fell into this pit: their > > bootstrap.conf > > requests the gnulib 'strftime' module but the coded doesn't use > > nstrftime. > > What exactly d

Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg

2017-05-02 Thread Bruno Haible
Paul Eggert wrote: > I'd like Bruno's opinion on the macro clash The common idiom is "#define WINDOWS_LEAN_AND_MEAN". This can be seen by comparing the number of hits of two web searches: https://www.google.de/search?q=%22define+windows_lean_and_mean%22 https://www.google.de/search?q=%22defin

Re: rename strftime module

2017-05-02 Thread Bernhard Voelker
[CC-ing bug-findut...@gnu.org] On 04/30/2017 04:53 PM, Bruno Haible wrote: > The name of the strftime module is misleading: > 1) It suggests that it defines the function 'strftime', but in fact it > defines 'nstrftime'. GNU findutils fell into this pit: their > bootstrap.conf > reques

Re: tzset: add native Windows workaround

2017-05-02 Thread Bruno Haible
Hi Paul, > On 05/01/2017 09:40 AM, Bruno Haible wrote: > > + /* If the environment variable TZ has been set by Cygwin, neutralize it. > > + The Microsoft CRT interprets TZ differently than Cygwin and produces > > + incorrect results if TZ has the syntax used by Cygwin. */ > > + const ch

Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg

2017-05-02 Thread Eli Zaretskii
> Cc: kbr...@cornell.edu, emacs-de...@gnu.org, Bruno Haible , > Gnulib bugs > From: Paul Eggert > Date: Tue, 2 May 2017 00:52:03 -0700 > > > the utimens.c file you've brought from Gnulib has 2 problems: > > > > . it defines WIN32_LEAN_AND_MEAN unconditionally, which conflicts > > with our

Re: tzset: add native Windows workaround

2017-05-02 Thread Paul Eggert
On 05/01/2017 09:40 AM, Bruno Haible wrote: + /* If the environment variable TZ has been set by Cygwin, neutralize it. + The Microsoft CRT interprets TZ differently than Cygwin and produces + incorrect results if TZ has the syntax used by Cygwin. */ + const char *tz = getenv ("TZ"); +

Re: [Emacs-diffs] master 085c7f6 2/2: Test format-time-string with zone arg

2017-05-02 Thread Paul Eggert
Eli Zaretskii wrote: the utimens.c file you've brought from Gnulib has 2 problems: . it defines WIN32_LEAN_AND_MEAN unconditionally, which conflicts with our own definition in nt/inc/ms-w32.h, which is processed earlier; . it includes msvc-nothrow.h, which is absent in the reposito

Re: split module gettimeofday

2017-05-02 Thread Jim Meyering
On Tue, May 2, 2017 at 1:39 AM, Bruno Haible wrote: > Currently: > - gettimeofday.c contains code that is not related to gettimeofday at all - > a tzset() override, for example. > - The user who wants a fixed 'tzset' function will also get a 'gettimeofday' > replacement, for no good re