random_r on AIX, OSF/1

2012-01-12 Thread Bruno Haible
The 'random_r' module is supposed to implement the glibc API. But it fails to override the native API on AIX and OSF/1. Comparison: glibc API: int random_r (struct random_data *buf, int32_t *result); int srandom_r (unsigned int seed, struct random_data *buf); int initstate_r (unsigned int seed,

random_r: support for MSVC

2012-01-12 Thread Bruno Haible
A testdir for the module 'random_r' yields this compilation error on MSVC 9: random_r.c(64) : fatal error C1083: cannot open include file "inttypes.h": No such file or directory make[3]: *** [random_r.lo] Error 1 The reason is that while 'random_r' depends on 'stdint', the file includes , which

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Reuben Thomas
On 12 January 2012 15:40, Bruno Haible wrote: > Hi Reuben, > >> so where's the test with /dev/null? > > You didn't submit a test with /dev/null. If it makes sense to have one, > please submit one. Ah, I think I tried to make one, but it didn't make sense, because I was trying to make a file that

Re: [PATCH 2/2] strptime: silence gcc warnings

2012-01-12 Thread Eric Blake
On 01/11/2012 08:31 PM, Bruno Haible wrote: > Eric Blake wrote: >> @@ -683,7 +684,9 @@ __strptime_internal (rp, fmt, tm, decided, era_cnt >> LOCALE_PARAM) >>++rp; >> if (*rp != '+' && *rp != '-') >>return NULL; >> +#if defined _LIBC || HAVE_TM_GMTOFF >>

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Bruno Haible
Hi Reuben, > so where's the test with /dev/null? You didn't submit a test with /dev/null. If it makes sense to have one, please submit one. Bruno

Re: [PATCH 1/2] inet_ntop: silence gcc warning

2012-01-12 Thread Eric Blake
On 01/12/2012 05:04 AM, Jim Meyering wrote: > Eric Blake wrote: >> On 01/11/2012 04:44 PM, Paul Eggert wrote: >>> On 01/11/12 15:24, Eric Blake wrote: + best.len = 0; >>> >>> I have some qualms about adding unnecessary initializations >>> merely to silence GCC. It's not just that it bloats t

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Reuben Thomas
On 12 January 2012 13:26, Bruno Haible wrote: > Hi Reuben, > > Reuben Thomas wrote: >> I find no tests for specific return codes from qcopy_file_preserving (grep >> GL_COPY gives no hits in gnulib/tests/), and I can find no test >> involving /dev/null (all instances I can find are redirections, no

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Bruno Haible
Hi Reuben, Reuben Thomas wrote: > I find no tests for specific return codes from qcopy_file_preserving (grep > GL_COPY gives no hits in gnulib/tests/), and I can find no test > involving /dev/null (all instances I can find are redirections, not > parameters to a test). Yes, I added a test for whe

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Reuben Thomas
On 12 January 2012 12:55, Jim Meyering wrote: > Reuben Thomas wrote: > >> On 12 January 2012 02:13, Bruno Haible wrote: >>> >>> - In copy-file.h declare the right function name. >> >> Ah yes, I must've missed warnings for this, sorry. >> >>> - In the tests I also had to drop the test with /dev/fu

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Jim Meyering
Reuben Thomas wrote: > On 12 January 2012 02:13, Bruno Haible wrote: >> >> - In copy-file.h declare the right function name. > > Ah yes, I must've missed warnings for this, sorry. > >> - In the tests I also had to drop the test with /dev/full, since - unlike >>  /dev/null - this device does not e

Re: copy_file_preserving variant that doesn't exit on error?

2012-01-12 Thread Reuben Thomas
On 12 January 2012 02:13, Bruno Haible wrote: > > - In copy-file.h declare the right function name. Ah yes, I must've missed warnings for this, sorry. > - In the tests I also had to drop the test with /dev/full, since - unlike >  /dev/null - this device does not exist everywhere. Ex.: on OpenBSD

Re: [PATCH 1/2] inet_ntop: silence gcc warning

2012-01-12 Thread Jim Meyering
Eric Blake wrote: > On 01/11/2012 04:44 PM, Paul Eggert wrote: >> On 01/11/12 15:24, Eric Blake wrote: >>> + best.len = 0; >> >> I have some qualms about adding unnecessary initializations >> merely to silence GCC. It's not just that it bloats the >> runtime -- it's that it makes the code more co