new module 'pclose'

2011-09-17 Thread Bruno Haible
Anyone who calls popen() also calls pclose(). MSVC 9 does not have a 'pclose' function, but it has a '_pclose' function with the same semantics. 2011-09-17 Bruno Haible New module 'pclose'. * lib/stdio.in.h (pclose): New declaration. * lib/pclose.c: New file.

popen on MSVC

2011-09-17 Thread Bruno Haible
On MSVC 9, there is no popen() function, only _popen. The replacement code in lib/popen.c is not made for this situation: it gives compilation errors about F_SETFD. This fixes it. 2011-09-17 Bruno Haible popen: Support for MSVC. * lib/stdio.in.h (popen): Declare it if the syst

Re: msvc support: avoid division bug

2011-09-17 Thread Bruno Haible
> The MSVC 9 compiler gives a compilation error for a division through a > literal whose value is zero. This necessitates also this workaround, to avoid compilation errors in lines 133, 134, 135 of lib/isnan.c. 2011-09-17 Bruno Haible isnanl, isnand, isnanf: Work around MSVC bug.

Re: ssize_t on MSVC

2011-09-17 Thread Bruno Haible
I committed: > --- tests/test-sys_socket.c.origThu Sep 15 17:57:52 2011 > +++ tests/test-sys_socket.c Thu Sep 15 16:06:27 2011 > @@ -30,6 +30,10 @@ > /* Check that the 'socklen_t' type is defined. */ > socklen_t t1; > > +/* Check that the 'size_t' and 'ssize_t' types are defined.

putenv on MSVC

2011-09-17 Thread Bruno Haible
The declaration of 'environ' in putenv.c:40 leads to a warning about "inconsistent DLL binding" and then later to a link error in test-unsetenv. This fixes it. 2011-09-17 Bruno Haible putenv: Support for MSVC. * modules/putenv (Depends-on): Add environ. * lib/putenv.c

math.h warnings on MSVC

2011-09-17 Thread Bruno Haible
On MSVC 9, there are warnings about redefined macros in gnulib's . This fixes them. 2011-09-17 Bruno Haible math: Avoid macro redefinition warnings on MSVC. * lib/math.in.h (ceilf, ceill, floorf, floorl, frexpl, ldexpl): Undefine before redefining. --- lib/math.in.h.o

Re: MSVC support: documentation

2011-09-17 Thread Bruno Haible
An update of the documentation: Some functions are defined as macros with arguments in , without a function prototype. This is not allowed according to POSIX:2008 / System Interfaces / General Information / Use and Implementation of Interfaces

Re: dirent.h on MSVC

2011-09-17 Thread Bruno Haible
> 2011-09-12 Bruno Haible > > New modules 'opendir', 'readdir', 'rewinddir', 'closedir'. > As a consequence, modules which use opendir() etc. now need to depend on these modules. Otherwise compilation warnings and link errors occur on MSVC. 2011-09-17 Bruno Haible Add de

inet_ntop, inet_pton on MSVC

2011-09-17 Thread Bruno Haible
On MSVC 9, when compiling for Windows Vista or newer (cf. _WIN32_WINNT), declares an inet_ntop function. But the declaration uses __stdcall calling convention, which is incompatible with the normal C function call convention: $ cat foo.c #include char const * (*ptr2) (int, void const *, char *,

Re: Syntax checks in perl

2011-09-17 Thread Jose E. Marchesi
Still, while I mostly prefer python to perl too these days, we have to consider that perl is already a pre-requisite for projects using autoconf, automake, and/or gnulib, so using perl would have the advantage of not adding another requirement to the maintainer toolchain. Certainl