Re: vsnprintf unnecessarily configures and builds vasnprintf.o etc.

2011-04-08 Thread Simon Josefsson
Paul Eggert writes: > But that raises another problem. For Emacs, I'd like a variant of > vasnprintf that uses Emacs's allocators rather than malloc/realloc/free. > I could instead attack the problem by blocking interrupts while > calling vasnprintf, but I'd rather not add these extra system cal

Re: vsnprintf unnecessarily configures and builds vasnprintf.o etc.

2011-04-08 Thread Eric Blake
On 04/08/2011 03:58 AM, Simon Josefsson wrote: > Paul Eggert writes: > >> But that raises another problem. For Emacs, I'd like a variant of >> vasnprintf that uses Emacs's allocators rather than malloc/realloc/free. >> I could instead attack the problem by blocking interrupts while >> calling va

Re: RFC socketpair

2011-04-08 Thread Bastien ROUCARIES
Le jeudi 7 avril 2011 01:12:51, Bruno Haible a écrit : > Hi Bastien, > > > A request for comment for a socketpair for windows. > > > > Please comment. > > I think it is too early for us to comment, because it appears that you have > not > > yet started to compile and test the code: > > int > >

Re: proposed new module careadlinkat (renamed from breadlinkat)

2011-04-08 Thread Eric Blake
On 03/31/2011 11:57 PM, Paul Eggert wrote: > Following up on Bruno's comments, here's a revised proposed > patch to gnulib, which I've tested with coreutils and with Emacs. > > +#ifndef _GL_ALLOCATOR_H > + > +#include > + > +struct allocator > +{ > + /* Call MALLOC to allocate memory, like 'mall

Re: [PATCH] verify: use _Static_assert if available

2011-04-08 Thread Pádraig Brady
On 05/04/11 03:26, Paul Eggert wrote: > This gnulib patch modifies "verify" to use C1X's _Static_assert if > running GCC 4.6.0 or later, which generates easier-to-read > diagnostics. I haven't pushed this yet because I thought it wouldn't > hurt to get more pairs of eyes to look at it. So C++0x s

Re: [PATCH] verify: use _Static_assert if available

2011-04-08 Thread Paul Eggert
On 04/08/2011 09:30 AM, Pádraig Brady wrote: > So C++0x support in gcc 4.6.0 is using static_assert() > while C1X support is using _Static_assert(). > Why the divergence in the standards? Sorry, I don't know, as I don't use C++. > Do we need to enforce the gcc option --std=c1x > to enable this as

[PATCH 2/4] pipe-filter: drop O_NONBLOCK workarounds

2011-04-08 Thread Eric Blake
* modules/pipe-filter-gi (Depends-on): Add fcntl-h. * modules/pipe-filter-ii (Depends-on): Likewise. * lib/pipe-filter-aux.h (O_NONBLOCK): Delete workaround. Signed-off-by: Eric Blake --- ChangeLog |5 + lib/pipe-filter-aux.h |3 --- modules/pipe-filter-gi |1 + mod

[PATCH 1/4] nonblocking: provide O_NONBLOCK for mingw

2011-04-08 Thread Eric Blake
Mingw is the only known platform that lacks O_NONBLOCK (possibly via the alternate spelling O_NDELAY). But mingw also lacks any files where open() needs to enforce non-blocking behavior, and lacks openat(), so it is relatively simple to provide a non-zero flag. A future patches will make use of O

[PATCH 0/4] pipe2(,O_NONBLOCK) for mingw

2011-04-08 Thread Eric Blake
We had all the pieces, just not wired together until now. Eric Blake (4): nonblocking: provide O_NONBLOCK for mingw pipe-filter: drop O_NONBLOCK workarounds fcntl-h: fix O_ACCMODE on cygwin pipe2: fix O_NONBLOCK support on mingw ChangeLog| 27 ++ doc/pos

[PATCH 3/4] fcntl-h: fix O_ACCMODE on cygwin

2011-04-08 Thread Eric Blake
* doc/posix-headers/fcntl.texi (fcntl.h): Document the bug. * lib/fcntl.in.h (O_ACCMODE): Fix it. Signed-off-by: Eric Blake --- ChangeLog|4 doc/posix-headers/fcntl.texi |5 + lib/fcntl.in.h |5 + 3 files changed, 14 insertions(+), 0 del

[PATCH 4/4] pipe2: fix O_NONBLOCK support on mingw

2011-04-08 Thread Eric Blake
* modules/pipe2 (Depends-on): Add nonblocking. * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support. * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly. Signed-off-by: Eric Blake --- ChangeLog |5 + lib/pipe2.c| 34 ++ modul

Re: vsnprintf unnecessarily configures and builds vasnprintf.o etc.

2011-04-08 Thread Eric Blake
On 04/07/2011 04:02 AM, Bruno Haible wrote: > Hi Paul, > >> the gnulib code added quite a bit of of unnecessary work >> to configure and build vasnprintf.o, printf-parse.o, printf-args.o, >> and asnprintf.o. None of these object files were needed: they were put >> into libgnu.a but were not used b

Re: [PATCH 4/4] pipe2: fix O_NONBLOCK support on mingw

2011-04-08 Thread Eric Blake
On 04/08/2011 11:33 AM, Eric Blake wrote: > * modules/pipe2 (Depends-on): Add nonblocking. > * lib/pipe2.c (pipe2) [WIN32]: Add O_NONBLOCK support. > * tests/test-pipe2.c (is_nonblocking): Adjust test accordingly. > > +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ > +/* Native

[PATCH 5/4] nonblocking: reduce dependency

2011-04-08 Thread Eric Blake
No need to make nonblocking drag in sockets just for a test; test them if they are present and skip them otherwise. * tests/test-nonblocking.c: Only test sockets when in use. * modules/nonblocking-tests (Depends-on): Drop socket. (Makefile.am): Link even if sockets are not present. * modules/pipe2

Re: [PATCH 5/4] nonblocking: reduce dependency

2011-04-08 Thread Eric Blake
On 04/08/2011 12:39 PM, Eric Blake wrote: > No need to make nonblocking drag in sockets just for a test; > test them if they are present and skip them otherwise. > > * tests/test-nonblocking.c: Only test sockets when in use. > * modules/nonblocking-tests (Depends-on): Drop socket. > (Makefile.am):

[PATCHv2 5/4] nonblocking: reduce dependency

2011-04-08 Thread Eric Blake
No need to make nonblocking drag in sockets just for a test; test them if they are present and skip them otherwise. * tests/test-nonblocking.c: Only test sockets when in use. * modules/nonblocking-tests (Depends-on): Drop socket. (Makefile.am): Link even if sockets are not present. * modules/pipe2

Re: [PATCH] verify: use _Static_assert if available

2011-04-08 Thread Bruno Haible
Pádraig Brady wrote: > So C++0x support in gcc 4.6.0 is using static_assert() > while C1X support is using _Static_assert(). ISO C1X draft n1548 [1] defines _Static_assert as a keyword (A.1.2). The meaning of _Static_assert is defined in section 6.7.10: 6.7.10 Static assertions Syntax

Re: [PATCH] verify: use _Static_assert if available

2011-04-08 Thread Paul Eggert
On 04/08/2011 12:30 PM, Bruno Haible wrote: > Here's a proposed patch to fix it. Thanks, that looks good, except: > +# if 0 && defined __cplusplus > +# define HAVE_STATIC_ASSERT 1 > +# endif That "0 &&" looks wrong: did you put it in for debugging, and intend to remove it before installing?

Re: proposed new module careadlinkat (renamed from breadlinkat)

2011-04-08 Thread Paul Eggert
On 04/08/2011 07:54 AM, Eric Blake wrote: > I'm pushing this as the simplest patch, but you may want to instead > consider renaming the field members to not shadow functions that might > have been #defined into replacement names. Thanks, I did that. I also pulled standard_allocator out of caread

gendocs.sh is broken

2011-04-08 Thread Bruce Korb
This source line: > cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\"" yields: > docbook2html -o "manual/complexity-db.xml" whether or not --texi2html is specified on the command line. This is almost certainly a problem stemming from these messages: ../build-aux/gendocs.

[PATCH] gendocs.sh: variable referenced before being set

2011-04-08 Thread Bruce Korb
* build-aux/gendocs.sh (split_html_db_dir): remove variable --- ChangeLog|5 + build-aux/gendocs.sh | 11 +-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 121c22a..f7608e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3

a couple more gendocs.sh issues

2011-04-08 Thread Bruce Korb
Somehow or another, the xml file winds up with this line: /dev/null && \ sed -i '/^ Working on: /old-home/bkorb/ag/cx/doc/manual/complexity-db.xml jade:/old-home/bkorb/ag/cx/doc/manual/complexity-db.xml:1213:11:E: end tag for "chapter" which is not finished gzip: complexity-db.ps: No such fi

gnulib and pcc-1.0.0

2011-04-08 Thread Bruno Haible
Recently pcc version 1.0.0 was released. How does gnulib work with it? 1) #include leads to syntax errors. pcc does not grok the labeled initializer syntax in /usr/include/bits/mathinline.h: #if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2 /* Test for n

Re: [PATCH] gendocs.sh: variable referenced before being set

2011-04-08 Thread Karl Berry
Hi Bruce, As for the split docbook, I see no reason to remove the variable. I moved the definition before use, though. As for the weird "-", I cannot debug in a vacuum. Send me your sources. As for , I didn't think Docbook has any such tag. Hence the . I admit I didn't write that code and do

Re: [PATCH] verify: use _Static_assert if available

2011-04-08 Thread Bruno Haible
Hi Paul, > > +# if 0 && defined __cplusplus > > +# define HAVE_STATIC_ASSERT 1 > > +# endif > > That "0 &&" looks wrong: did you put it in for debugging, > and intend to remove it before installing? The intent of this "0" condition was to be a placeholder until GCC 4.7 or 4.8 or whatever releas

[PATCH] strftime: silence gnulib-tool warning

2011-04-08 Thread Eric Blake
gnulib-tool: warning: module strftime-tests has duplicated dependencies: strftime * modules/strftime-tests (Depends-on): Drop automatic dependency. Signed-off-by: Eric Blake --- Pushing as obvious. ChangeLog |5 + modules/strftime-tests |1 - 2 files changed, 5 inser