Re: errno --> errno name ?

2011-06-06 Thread Thien-Thi Nguyen
() Sam Steingold () Mon, 06 Jun 2011 18:38:00 -0400 Absolutely not. The whole point of my request is that I will be maintaining _less_ code, not more. Speaking of less, Guile 1.4.x is withering away, so this excerpt from libguile/Makefile.am might merit a new home someday reformulated for

Re: [PATCH] canonicalize-lgpl: work around AIX realpath bug

2011-06-06 Thread Eric Blake
On 06/06/2011 05:11 PM, Bruno Haible wrote: > Eric Blake wrote: >> +rm -Rf conftest.a conftest.d > >rm -rf conftest.a conftest.d > > would be more portable, I think: The autoconf documentation mentions > > `rm' >The `-f' and `-r' options are portable. > > whereas it does n

Re: [PATCH] canonicalize-lgpl: work around AIX realpath bug

2011-06-06 Thread Bruno Haible
Eric Blake wrote: > +    rm -Rf conftest.a conftest.d rm -rf conftest.a conftest.d would be more portable, I think: The autoconf documentation mentions `rm' The `-f' and `-r' options are portable. whereas it does not say that '-R' is portable. Bruno -- In memoriam Robert F. Ke

[PATCH 2/2] strerror: work around FreeBSD bug

2011-06-06 Thread Eric Blake
Breaking strerror away from strerror_r re-exposed the FreeBSD strerror(0) bug. * lib/strerror.c (strerror): Special case 0. Reported by Bruno Haible. Signed-off-by: Eric Blake --- This fixes test-strerror on FreeBSD, again. I still need to work on perror, but I'm pushing this in the meantime.

[PATCH 1/2] strerror-override: avoid bloating errno module

2011-06-06 Thread Eric Blake
* modules/errno (Files, configure.ac): Move replacement strings... * modules/strerror-override: ...to new module. * modules/strerror (Depends-on): Add strerror-override. * modules/strerror_r-posix (Depends-on): Likewise. * MODULES.html.sh: Document new module. Reported by Bruno Haible. Signed-off-

Re: error: avoid gcc warning

2011-06-06 Thread Eric Blake
On 06/05/2011 07:00 AM, Bruno Haible wrote: > On OSF/1 5.1 with gcc, I'm seeing this warning: > > error.c:170: warning: implicit declaration of function 'strerror_r' > > It's because /usr/include/string.h on this system does not always declare > strerror_r (only if _REENTRANT or _THREAD_SAFE is

Re: realpath on AIX 7.1

2011-06-06 Thread Eric Blake
On 06/05/2011 09:27 AM, Bruno Haible wrote: > Hi Eric, > > On AIX 7.1 I'm seeing this test failure: > > test-canonicalize-lgpl.c:69: assertion failed > FAIL: test-canonicalize-lgpl > > The reason is apparently a bug in realpath. Here's a test case: > > result = realpath ("conftest.dir//.

Re: spawn-pipe tests on OSF/1

2011-06-06 Thread Bruno Haible
I wrote: > This failure is probably due to the many libraries against which the child > program is linked: > > $ ldd gettext-0.18.2/gettext-tools/gnulib-tests/.libs/*test-spawn-pipe* > > Main => > gettext-0.18.2/gettext-tools/gnulib-tests/.libs/lt-test-spawn-pipe > libiconv.so

Re: errno --> errno name ?

2011-06-06 Thread Bruno Haible
Hi Sam, all, > I think it would be a useful addition to the errno/strerror/whatever > modules to be able to convert from the numeric errno to the symbolic > one. > e.g., > > char * errno_name () { > switch (errno) { > #ifdef ENOENT >case ENOENT : return "ENOENT"; > #endif >default:

Re: [PATCHv2] strerror: drop strerror_r dependency

2011-06-06 Thread Bruno Haible
Eric Blake wrote: > both need the overrides, so > the overrides have to be AC_LIBOBJ at the first client). You can have more than one AC_LIBOBJ invocation of the same file. Duplicates removed automatically, cf. gnulib-tool line 3758. Bruno -- In memoriam Robert F. Kennedy

Re: errno --> errno name ?

2011-06-06 Thread Sam Steingold
Hi Bruno, > * Bruno Haible [2011-06-06 22:52:14 +0200]: >> I think it would be a useful addition to the errno/strerror/whatever >> modules to be able to convert from the numeric errno to the symbolic >> one. >> e.g., >> >> char * errno_name () { >> switch (errno) { >> #ifdef ENOENT >>cas

[PATCH] canonicalize-lgpl: work around AIX realpath bug

2011-06-06 Thread Eric Blake
AIX 7.1 realpath() gets horribly confused by consecutive / in the name to be resolved. * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Expose AIX bug. * doc/posix-functions/realpath.texi (realpath): Document it. Reported by Bruno Haible. Signed-off-by: Eric Blake --- Not too hard, once I actuall

Re: [PATCHv2] strerror: drop strerror_r dependency

2011-06-06 Thread Bruno Haible
Eric Blake wrote: > ... Compare to the problem we > were solving earlier with fclose vs. fflush being in separate > directories, and the AC_LIBOBJ([fflush]) giving us grief. > > Which is why we need a separate module as prereq for both strerror and > strerror_r-posix, so that the AC_LIBOBJ only o

Re: [PATCHv2] strerror: drop strerror_r dependency

2011-06-06 Thread Eric Blake
On 06/06/2011 02:37 PM, Bruno Haible wrote: > Eric Blake wrote: >> both need the overrides, so >> the overrides have to be AC_LIBOBJ at the first client). > > You can have more than one AC_LIBOBJ invocation of the same file. Duplicates > removed automatically, cf. gnulib-tool line 3758. But only

errno --> errno name ?

2011-06-06 Thread Sam Steingold
I think it would be a useful addition to the errno/strerror/whatever modules to be able to convert from the numeric errno to the symbolic one. e.g., char * errno_name () { switch (errno) { #ifdef ENOENT case ENOENT : return "ENOENT"; #endif default: return NULL; } } the idea is that

Re: [PATCHv2] strerror: drop strerror_r dependency

2011-06-06 Thread Eric Blake
On 06/03/2011 06:28 PM, Bruno Haible wrote: > Hi Eric, > >> Since the errno module is responsible for introducing replacement >> errno values, it should also be responsible for translating those >> new values into strings. And by moving the replacements into a >> file managed by the errno, we can

Re: spawn-pipe tests on OSF/1

2011-06-06 Thread Stefano Lattarini
I Bruno. Hope you doon't mind if I chime in just to signal ... On Monday 06 June 2011, Bruno Haible wrote: > > 2011-06-06 Bruno Haible > > spawn-pipe tests: Like the child program only against libc. > ... this probable typo (should s/Like/Link/ I think). Regards, Stefano

spawn-pipe tests on OSF/1

2011-06-06 Thread Bruno Haible
On OSF/1 5.1 with cc (but not with gcc), and only in the gettext build, not in testdirs, I see a test failure like this: test-spawn-pipe.c:80: assertion failed (null): /home/haible/gettext-0.18.2/gettext-tools/gnulib-tests/.libs/lt-test-spawn-pipe subprocess got fatal signal 6 test-spawn-pipe.sh

Re: careadlinkatcwd's signature

2011-06-06 Thread Bruno Haible
> Thanks, that patch looks good. Could you please install it? Thanks for the quick review, Paul. Done. Bruno -- In memoriam Robert F. Kennedy

Re: [PATCH] gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE

2011-06-06 Thread Bruno Haible
Hi Jim, > I'll be adding uses separately, in headers when possible. Good. Note that in .h files that are meant to be installable stand-alone, that is, most of the *.in.h files, we need to repeat the definition of these macros in the header file. Like we do with _GL_ATTRIBUTE_PURE in string.in.h a

[PATCH] gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _GL_ATTRIBUTE_PURE

2011-06-06 Thread Jim Meyering
FYI, as discussed, here are the definitions. I'll be adding uses separately, in headers when possible. >From dd36104845e77faa713653d1173623a20082cc76 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 24 Apr 2011 19:00:18 +0200 Subject: [PATCH] gnulib-common.m4: add _GL_ATTRIBUTE_CONST and _