Re: argmatch.h: new "_" definition may conflict with that of callers

2019-07-02 Thread Jim Meyering
On Tue, Jul 2, 2019 at 9:48 PM Akim Demaille wrote: > Bummer :( Sorry about that. I installed the following commit. ... > + argmatch: don't define _ in the header. > + Reported by Jim Meyering. > + * lib/argmatch.h (N_, _): Don't define. > + Use gettext instead. > +

Re: argmatch.h: new "_" definition may conflict with that of callers

2019-07-02 Thread Akim Demaille
Hi Jim! > Le 3 juil. 2019 à 06:17, Jim Meyering a écrit : > > Hi Akim, > I tried to build grep using latest gnulib and it failed with these errors: > > CC grep.o > In file included from grep.c:30: > ../lib/argmatch.h:35: error: "_" redefined [-Werror] > 35 | # define _(Msgid) gettext

argmatch.h: new "_" definition may conflict with that of callers

2019-07-02 Thread Jim Meyering
Hi Akim, I tried to build grep using latest gnulib and it failed with these errors: CC grep.o In file included from grep.c:30: ../lib/argmatch.h:35: error: "_" redefined [-Werror] 35 | # define _(Msgid) gettext (Msgid) | In file included from grep.c:28: system.h:43: note: this is

renameatu: fix test failure on MSVC

2019-07-02 Thread Bruno Haible
Hi Paul, Eric, On MSVC I'm seeing these two test failures: FAIL: test-renameat === c:\testdir-posix-msvc\gltests\test-rename.h:115: assertion 'errno == ENOENT' failed FAIL test-renameat.exe (exit status: 127) FAIL: test-renameatu c:\testdir-posix-msvc\glte

Re: bug#36370: 27.0.50; XFIXNAT called on negative numbers

2019-07-02 Thread Paul Eggert
Bruno Haible wrote: I like this wording. OK, I merged that into the wording I proposed and installed the attached. One new point that I added is that I sometimes use 'assume (X)' to pacify GCC so that it does not issue a bogus warning in nearby code; this benefit of 'assume' is independent

localcharset, nl_langinfo: fix return value for UTF-8 locales on MSVC

2019-07-02 Thread Bruno Haible
On MSVC (on Windows 10), I'm seeing this test failure: FAIL: test-nl_langinfo.sh = C:\testdir-posix-msvc\gltests\test-nl_langinfo.c:57: assertion 'c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0' failed FAIL test-nl_langinfo.sh (exit status: 1)

getaddrinfo tests: fix test failure on MSVC

2019-07-02 Thread Bruno Haible
On native Windows with MSVC, I observe this test failure: FAIL: test-getaddrinfo == FAIL test-getaddrinfo.exe (exit status: 4) The cause is a missing call to WSAStartup(). This patch fixes it. 2019-07-02 Bruno Haible getaddrinfo tests: Fix test failure on MSVC.

getcwd: fix crash when invoked with size = 0 on MSVC

2019-07-02 Thread Bruno Haible
On MSVC, I'm seeing this test failure: FAIL: test-getcwd-lgpl == FAIL test-getcwd-lgpl.exe (exit status: 127) It's the getcwd-lgpl test, but it exercises the function rpl_getcwd defined in lib/getcwd.c, not the one in lib/getcwd-lgpl.c. The crash happens in the getcwd (buf,

nonblocking-pipe tests: Fix test failure on MSVC

2019-07-02 Thread Bruno Haible
On MSVC, I'm seeing this test failure: FAIL: test-nonblocking-pipe.sh == c:\testdir-posix-msvc\gltests\test-nonblocking-reader.h:179: assertion 'spent_time < 1.5' failed FAIL test-nonblocking-pipe.sh (exit status: 1) The comment says: /* This assertion fails if

usleep: implement with millisecond resolution on native Windows

2019-07-02 Thread Bruno Haible
The usleep() emulation on MSVC has a resolution of 1 second only. This patch improves it, to have a resolution of 15 milliseconds. 2019-07-02 Bruno Haible usleep: Implement with millisecond resolution on native Windows. * lib/usleep.c (usleep): On native Windows, implement usi

stat tests: fix test failure on MSVC

2019-07-02 Thread Bruno Haible
On MSVC, I'm seeing these three test failures: FAIL: test-fstatat == c:\testdir-posix-msvc\gltests\test-stat.h:35: assertion 'SAME_INODE (st1, st2)' failed FAIL test-fstatat.exe (exit status: 127) FAIL: test-stat === c:\testdir-posix-msvc\gltests\test-stat.h:35: ass

lstat tests: fix test failure on MSVC

2019-07-02 Thread Bruno Haible
Similarly, on MSVC, I'm seeing this test failure: FAIL: test-lstat c:\testdir-posix-msvc\gltests\test-lstat.h:34: assertion 'SAME_INODE (st1, st2)' failed FAIL test-lstat.exe (exit status: 127) The cause is the same: SAME_INODE always returns false in this configuration. This p