Re: lib-ignore: link error with Sun C++ compiler

2010-03-20 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Sat, Mar 20, 2010 at 11:52:25PM CET: > lib-ignore: Determine different options for different compilers. > * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Set a variable which > depends on the current language (C/C++/Fortran). Don't set LDFLAGS.

Re: status of new 'c++defs' module?

2010-03-20 Thread Bruno Haible
John W. Eaton wrote: > An additional problem showed up on OS X systems: > > libtool: compile: g++-4.2 -DHAVE_CONFIG_H -I. -I.. -I/sw/lib/flex/include > -I/sw/include -O0 -g -m32 -I/sw/include/freetype2 -I/sw/include/qhull > -I/usr/include -I../libgnu -I../libgnu -I../libcruft/misc -I../liboct

Re: status of new 'c++defs' module?

2010-03-20 Thread Bruno Haible
John W. Eaton wrote: > I received a report about the following error on an OS X system: > > In file included from /usr/include/sys/time.h:197, >from ../libgnu/sys/time.h:40, >from ../libgnu/sys/select.h:51, >from /usr/include/unistd.h:5

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Bruno Haible
Jim Meyering wrote: > I produced the preprocessed output using this trick: > > make -C gnulib-tests AM_CXXFLAGS='-dD -E' test-fcntl-h-c++.o You teach me about the -dD option. Nice! > #define _GL_FCNTL_H > # 59 "../lib/fcntl.h" 3 > #define GL_LINK_WARNING(message) GL_LINK_WARNING1 (__FILE__,

Re: lib-ignore: link error with Sun C++ compiler

2010-03-20 Thread Bruno Haible
Hello Ralf, > > But this does not fix the problem with coreutils, as long as it has some > > source > > files in C++. I would therefore find it useful to change lib-ignore.m4 so > > that > > it sets an AC_SUBSTed variable IGNORE_UNUSED_LIBS, and coreutils/Makefile.am > > can then do > > AM_LDF

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim, > >> >> test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' >> >> make[4]: *** [test-fcntl-h-c++.o] Error 1 >> > >> > On which platform, please? And which C++ compiler? >> >> Fedora 12, gcc-c++-4.4.3-4.fc12.x86_64 >> >> FYI, I pushed the grep

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: >> >> test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' >> >> make[4]: *** [test-fcntl-h-c++.o] Error 1 >> > >> > On which platform, please? And which C++ compiler? >> >> Fedora 12, gcc-c++-4.4.3-4.fc12.x86_64 >> >> FYI, I pushed the grep changes, so

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: > A large part of them are in comments. I would suggest to exempt comments > (since comments are not code). Like this: > > # A sed expression that removes ANSI C and ISO C99 comments. > # Taken from GNU gettext's 'moopp' preprocessor. > sed_remove_comments=" > /[/][/*]/{ > ta

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Bruno Haible
Hi Jim, > >> test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' > >> make[4]: *** [test-fcntl-h-c++.o] Error 1 > > > > On which platform, please? And which C++ compiler? > > Fedora 12, gcc-c++-4.4.3-4.fc12.x86_64 > > FYI, I pushed the grep changes, so if you get the la

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: >> This leaves 916 occurrences, which is more reasonable (attached below). > > Here's a proposal to fix those that IMO ought to be fixed. > > Objections? None from me. > --- lib/acosl.c.orig Sat Mar 20 18:58:28 2010 > +++ lib/acosl.c Sat Mar 20 17:59:36 2010 > @@ -108,7

[PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
Since commit 4e86671a, gethostname failed to compile on mingw. Gnulib's sys/socket.h includes winsock2.h, which then includes unistd.h prior to declaring gethostname. Therefore, unistd.h cannot replace gethostname until winsock2.h is complete, also fixing things if a .c includes (or even ) prior

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Bruno Haible
> This leaves 916 occurrences, which is more reasonable (attached below). Here's a proposal to fix those that IMO ought to be fixed. Objections? 2010-03-20 Bruno Haible Minor formatting changes. * lib/acosl.c: Insert space before function argument list. * lib/argz.c:

Re: [PATCH] bootstrap: a new option --no-git, prohibiting the use git in the bootstrap process.

2010-03-20 Thread Aleksey Avdeev
20.03.2010 15:00, Eric Blake пишет: > [writing to undisclosed-recipients makes it hard to guess where you > wanted the reply to go to] > > On 03/19/2010 09:52 AM, Aleksey Avdeev wrote: >> Ability to explicitly disable the use git when calling bootstrap will >> exclude recourse to third-party res

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
Jim Meyering wrote: > FYI, I've just pushed this to coreutils. ... >>From 628a5e16ddd28110c506f34667ef993d9be7b837 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Sat, 20 Mar 2010 12:14:46 +0100 > Subject: [PATCH 2/2] maint: enforce one small aspect of formatting style: > space-before-"(" .

Re: unlink test failure on MacOS X

2010-03-20 Thread Bruno Haible
Jim Meyering wrote: > > + (umask 077 && mkdir "$tmp") > > +}; then > > + mkdir "$tmp/subdir" > > + export tmp > > + AC_RUN_IFELSE( > > + [AC_LANG_SOURCE([[ > > +#include > > +#include > > +

pipe-filter-gi: fix

2010-03-20 Thread Bruno Haible
On MacOS X 10.5, I'm seeing this test failure: test-pipe-filter-gi2-main.c:89: assertion failed FAIL: test-pipe-filter-gi2.sh The reason is that pipe-filter-gi.c assumes that create_pipe_bidi sets errno when it fails, but it does not actually do so. This fixes it. 2010-03-20 Bruno Haible

Re: unlink test failure on MacOS X

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: > The workaround below impacts only MacOS platforms. I'm applying it. > It also fixes the 'unlinkat' test failure. > > 2010-03-20 Bruno Haible > > Work around unlink() bug on MacOS X 10.5.6. > * lib/unlink.c (rpl_unlink): If UNLINK_PARENT_BUG is defined, fail when

Re: warning in lchown.c

2010-03-20 Thread Eric Blake
On 03/20/2010 08:05 AM, Bruno Haible wrote: > Hi Jim or Eric, > > On MacOS X, with "gcc -Wall", I'm seeing this warning: > > gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT lchown.o -MD -MP -MF > .deps/lchown.Tpo -c -o lchown.o lchown.c > lchown.c: In function 'rpl_lchown': > lchown.c:73:

Re: warning in lchown.c

2010-03-20 Thread Bruno Haible
Jim Meyering wrote: > Instead of adding more #ifdefs, how about just moving that > "struct stat st;" line down a few lines so it's within > the existing #if CHOWN_CHANGE_TIME_BUG block: It looks a little uglier to me, because the variable 'st' is also used in the third #if block at the end, and th

Re: gnulib bootstrap and git submodules

2010-03-20 Thread Dmitry V. Levin
Hi, On Mon, Feb 22, 2010 at 03:58:19PM -0700, Eric Blake wrote: [...] > Here's the next three patches I had to add on top of the previously posted > one. With this series, I was able to copy the new bootstrap to libvirt > and still get everything there to work correctly (patch to libvirt list to

Re: warning in lchown.c

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: > Hi Jim or Eric, > > On MacOS X, with "gcc -Wall", I'm seeing this warning: > > gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT lchown.o -MD -MP -MF > .deps/lchown.Tpo -c -o lchown.o lchown.c > lchown.c: In function 'rpl_lchown': > lchown.c:73: warning: unused variable

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: >> Any objections? > > I cannot reasonably object, because you have not precisely explained what the > "small aspect of formatting style" is. The subject line says: > space-before-"(". > The comment says: > Ensure that there is a space before each open parenthesis in C code.

Re: unlink test failure on MacOS X

2010-03-20 Thread Bruno Haible
Hi Eric, > > This prints > > -1 21 [EISDIR] > > on Linux, but > > 0 0 > > on MacOS X. > > Which version of MacOS X? What does uname state? What file system? For me, it happens on MacOS X 10.5.6. I could only test HFS+. > I cannot reproduce it on the machine I have access to, tested on an nfs

warning in lchown.c

2010-03-20 Thread Bruno Haible
Hi Jim or Eric, On MacOS X, with "gcc -Wall", I'm seeing this warning: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT lchown.o -MD -MP -MF .deps/lchown.Tpo -c -o lchown.o lchown.c lchown.c: In function 'rpl_lchown': lchown.c:73: warning: unused variable 'st' Is it ok to apply this as a

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Jim Meyering
Bruno Haible wrote: >> test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' >> make[4]: *** [test-fcntl-h-c++.o] Error 1 > > On which platform, please? And which C++ compiler? Fedora 12, gcc-c++-4.4.3-4.fc12.x86_64 FYI, I pushed the grep changes, so if you get the latest,

Re: test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Bruno Haible
Hi Jim, > test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' > make[4]: *** [test-fcntl-h-c++.o] Error 1 On which platform, please? And which C++ compiler? Bruno

Re: [PATCH] bootstrap: a new option --no-git, prohibiting the use git in the bootstrap process.

2010-03-20 Thread Aleksey Avdeev
20.03.2010 15:00, Eric Blake пишет: > [writing to undisclosed-recipients makes it hard to guess where you > wanted the reply to go to] > > On 03/19/2010 09:52 AM, Aleksey Avdeev wrote: >> Ability to explicitly disable the use git when calling bootstrap will >> exclude recourse to third-party res

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Bruno Haible
Hi Jim, > Any objections? I cannot reasonably object, because you have not precisely explained what the "small aspect of formatting style" is. The subject line says: space-before-"(". The comment says: Ensure that there is a space before each open parenthesis in C code. But there are currently

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
Eric Blake wrote: > On 03/20/2010 05:24 AM, Jim Meyering wrote: >> +_space_before_paren_exempt =? \\n\\$$ >> +_space_before_paren_exempt = \ >> + (\\n\\$$|%s\(to %s|delimit-method|(date|group|character)\(s\)) >> +# Ensure that there is a space before each open parenthesis in C code. >> +sc_space_b

[PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
Since commit 4e86671a, gethostname failed to compile on mingw. Gnulib's sys/socket.h includes winsock2.h, which then includes unistd.h prior to declaring gethostname. Therefore, unistd.h cannot replace gethostname until winsock2.h is complete, also fixing things if a .c includes (or even ) prior

Re: [PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Eric Blake
On 03/20/2010 05:24 AM, Jim Meyering wrote: > +_space_before_paren_exempt =? \\n\\$$ > +_space_before_paren_exempt = \ > + (\\n\\$$|%s\(to %s|delimit-method|(date|group|character)\(s\)) > +# Ensure that there is a space before each open parenthesis in C code. > +sc_space_before_open_paren: > +

Re: [PATCH] gethostname: fix build on mingw

2010-03-20 Thread Eric Blake
On 03/19/2010 05:35 PM, Matthias Bolte wrote: >> I believe this will solve the issue, but would appreciate some testing >> by Matthias. I also think that this is the same issue as: >> http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00183.html >> > > I tested this patch and can confirm tha

Re: [PATCH] bootstrap: a new option --no-git, prohibiting the use git in the bootstrap process.

2010-03-20 Thread Eric Blake
[writing to undisclosed-recipients makes it hard to guess where you wanted the reply to go to] On 03/19/2010 09:52 AM, Aleksey Avdeev wrote: > Ability to explicitly disable the use git when calling bootstrap will > exclude recourse to third-party resources for assembly rpm package. What, > in pa

[PATCH] maint: enforce one small aspect of formatting style: space-before-"("

2010-03-20 Thread Jim Meyering
FYI, I've just pushed this to coreutils. Note that I've embedded both a default exemption regexp, as well as the one I'm using in coreutils. Obviously only the default would go into gnulib's maint.mk Eric suggested that I put this in gnulib's maint.mk. This is a pretty fundamental axiom of formatt

[PATCH] bootstrap: a new option --no-git, prohibiting the use git in the bootstrap process.

2010-03-20 Thread Aleksey Avdeev
Signed-off-by: Aleksey Avdeev --- Hello. Ability to explicitly disable the use git when calling bootstrap will exclude recourse to third-party resources for assembly rpm package. What, in particular, significantly simplify the preparation of packages to build on git.alt (see

test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib'

2010-03-20 Thread Jim Meyering
Hello, Trying to use gnulib's latest in grep (required, due to my regexp-related changes), I see a new "make check" failure: CC test-stat.o CC test-stdbool.o test-fcntl-h-c++.cc:32: error: 'open' is not a member of 'gnulib' make[4]: *** [test-fcntl-h-c++.o]