[PATCH] maint: port more modules to GCC 8

2018-05-03 Thread Paul Eggert
* lib/dirname.h (base_name): * lib/exclude.h (new_exclude): * lib/xstrndup.h (xstrndup): Add malloc attribute. * lib/readutmp.c: Pacify GCC 8 about safe use of strncpy. * lib/sig-handler.h (get_handler) [SA_SIGINFO]: Simplify. This pacifies GCC 8. * m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_

Re: predefined macros for native Windows

2018-05-03 Thread Bruno Haible
Gisle Vanem wrote: > > When we began gnulib development, Borland C++ was still a reasonable > > portability > > target to keep in mind. Probably this is no longer the case? Can you check > > all > > "reasonable" C compilers for Windows whether they define '_WIN32'? > > I checked OpenWatcom 2.0 a

Re: localename on mingw

2018-05-03 Thread Bruno Haible
Gisle Vanem asked: > Just curious, which Windows compiler has '__WIN32__' > as a built-in, but not '_WIN32'? Borland C++, according to . When we began gnulib development, Borland C++ was still a reasonable portability target to keep in min

Re: localename on mingw

2018-05-03 Thread Gisle Vanem
Bruno Haible wrote: +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + /* On native Windows, here, Just curious, which Windows compiler has '__WIN32__' as a built-in, but not '_WIN32'? AFAICS, all MinGW's have both. And clang-cl does not have '__WIN32__'. -- --gv