Re: [PATCH 2/2] maint: use pragma consistently across replacement headers

2010-03-29 Thread Bruno Haible
Hi Eric, > but for the remaining files, we might as > well satisfy gcc's optimization, since the effort is trivial. > > Please apply. Applied. > Hmm, if we were using cppi more religiously, I wouldn't have introduced > the whitespace usage in that #if in the first place. The file lib/time.in.h

Re: lchmod cygwin failure

2010-03-29 Thread Simon Josefsson
Eric Blake writes: >> ../gllib/sys/stat.h:668: error: ‘lchmod’ was not declared in this scope ... >> (Not sure how the broken UTF-8 characters happened..) > > What terminal are you using? It is most likely a case of using a locale > with a UTF-8 charset, but a terminal like rxvt that does no

duplocale cygwin failure (was: Re: lchmod cygwin failure)

2010-03-29 Thread Simon Josefsson
Bruno Haible writes: > Fixed as follows: > > > 2010-03-27 Bruno Haible > > Fix a compilation error on Cygwin with g++ >= 4.3. > * lib/sys_stat.in.h (lchmod): Don't warn about the use of this function > if it is undefined or if we alias it to chmod. > (lstat): Don't warn

Re: [PATCH] fdopendir: work around FreeBSD bug

2010-03-29 Thread Eric Blake
[re-adding the list] On 03/29/2010 04:39 PM, Christian Weisgerber wrote: >> I'm still trying to get access to a FreeBSD 7 box to test this out >> myself (my current FreeBSD access is running 8.0, but that does not >> have the bug). > > Well, you can temporarily remove the prototype for fdopendir(

Re: make dist depending on binaries which use gnulib

2010-03-29 Thread Reuben Thomas
On 29 March 2010 19:56, Jim Meyering wrote: > Reuben Thomas wrote: >> 1. Is it expected that "make dist" should work without a preceding >> "make"? i.e. is this really a bug? > > Not technically, as Eric already explained. Yes, thanks Eric! (And yes, I had my SUBDIRS correctly ordered,) > The la

Re: read() and write() for MinGW

2010-03-29 Thread Neil Jerram
Paolo Bonzini writes: >>> Conceptually this is extremely simple, and I've found that gnulib >>> already contains useful bits like SOCKET_TO_FD, FD_TO_SOCKET, and the >>> code for determining if an arbitrary fd is a socket - which is all >>> great. >> >> Yes, and the read() and write() functions d

[PATCH] fdopendir: work around FreeBSD bug

2010-03-29 Thread Eric Blake
Without a declaration, at least tar would core dump on 64-bit FreeBSD because gcc only used 32 bits of the resulting pointer. * m4/dirent_h.m4 (gl_DIRENT_H_DEFAULTS): New witness. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Set it. * modules/dirent (Makefile.am): Substitute it. * lib/dirent.in.h (fdope

Christian Weisgerber: [Bug-tar] 1.23: FreeBSD 7 bug affects GNU tar

2010-03-29 Thread Sergey Poznyakoff
Hello, Here's a report from one of GNU tar users. Regards, Sergey --- Forwarded message Date: Mon, 29 Mar 2010 22:12:02 +0200 From: Christian Weisgerber To: bug-...@gnu.org Message-ID: <20100329201202.ga28...@lorvorc.mips.inka.de> Subject: [Bug-tar] 1.23: FreeBSD 7 bug affects GNU tar Ther

Re: [PATCH 3/3] Macro _prohibit_regexp replaced by _sc_search_regep and rules adapted to use the new macro.

2010-03-29 Thread Jim Meyering
Eric Blake wrote: > On 03/28/2010 08:54 AM, Jose E. Marchesi wrote: >> >>>From 24ab183f237468f2aa59d2424dc416f61c183671 Mon Sep 17 00:00:00 2001 >> From: Jose E. Marchesi >> Date: Sun, 28 Mar 2010 15:42:03 +0200 >> Subject: [PATCH 3/3] Macro _prohibit_regexp replaced by _sc_search_regep and >> r

Re: [Bug-tar] 1.23: FreeBSD 7 bug affects GNU tar

2010-03-29 Thread Eric Blake
[adding bug-gnulib] On 03/29/2010 02:12 PM, Christian Weisgerber wrote: > There is a stupid, stupid bug in FreeBSD 7 (up to and including the > 7.3 release): The fdopendir() function is present in libc, but the > prototype is missing from . > > GNU tar's configure picks up fdopendir(), but since

Re: [PATCH 3/3] Macro _prohibit_regexp replaced by _sc_search_regep and rules adapted to use the new macro.

2010-03-29 Thread Eric Blake
On 03/28/2010 08:54 AM, Jose E. Marchesi wrote: > >>From 24ab183f237468f2aa59d2424dc416f61c183671 Mon Sep 17 00:00:00 2001 > From: Jose E. Marchesi > Date: Sun, 28 Mar 2010 15:42:03 +0200 > Subject: [PATCH 3/3] Macro _prohibit_regexp replaced by _sc_search_regep and > rules adapted to use the ne

Re: Detecting IP_TOS (and IPPROTO_IP vs. SOL_IP)

2010-03-29 Thread Eric Blake
[moving to gnulib, replies can drop autoconf] On 03/28/2010 03:54 PM, Philip Prindeville wrote: >>> Calling the sequence: >>> >>> setsockopt(fd, , IP_TOS,&foo, sizeof(foo)); >>> >>> can be tricky. Linux uses SOL_IP for , whereas Solaris and BSD use >>> IPPROTO_IP for this instead. >>> >>>

Re: make dist depending on binaries which use gnulib

2010-03-29 Thread Ralf Wildenhues
Hello Reuben, * Reuben Thomas wrote on Mon, Mar 29, 2010 at 03:22:08PM CEST: > it has just been pointed out to me that "make dist" for current head > of GNU Zile fails, unless preceded by "make". This is because make > dist distributes a file which can only be made once the zile binary > has been

Re: make dist depending on binaries which use gnulib

2010-03-29 Thread Jim Meyering
Reuben Thomas wrote: > 1. Is it expected that "make dist" should work without a preceding > "make"? i.e. is this really a bug? Not technically, as Eric already explained. However, ... > 2. If so, then I have a further problem: if I simply make the file in > question explicitly depend on zile$(EXE

Re: [PATCH 1/3] Macro _header_without_use renamed to _sc_header_without_use in maint.mk

2010-03-29 Thread Jose E . Marchesi
> Subject: [PATCH 1/3] Macro _header_without_use renamed to _sc_header_without_use in maint.mk Thanks, Jose. This looks pretty clear cut. I'll push this along with the others once I've tested. Thanks :)

Re: make dist depending on binaries which use gnulib

2010-03-29 Thread Eric Blake
On 03/29/2010 07:22 AM, Reuben Thomas wrote: > I have two questions: > > 1. Is it expected that "make dist" should work without a preceding > "make"? i.e. is this really a bug? The GNU Coding Standards requires 'make' before 'make dist', so it is not technically a bug. However, since 'make dist'

Re: [PATCH] save-cwd: don't leak a file descriptor when the caller execs.

2010-03-29 Thread Eric Blake
On 03/29/2010 03:49 AM, James Youngman wrote: > Signed-off-by: James Youngman > --- > ChangeLog|7 +++ > lib/save-cwd.c |2 ++ > modules/save-cwd |1 + > 3 files changed, 10 insertions(+), 0 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index dca5a12..f9bd220 10

Re: [PATCH 2/2] maint: use pragma consistently across replacement headers

2010-03-29 Thread Eric Blake
On 03/28/2010 04:35 AM, Bruno Haible wrote: >>> Did you know that GCC has a special optimization for include files? ... > >> are you saying that the optimization is useless for those files, because they >> are split includes, and thus already fail to meet the pattern that gcc >> is looking for? >

Re: macros factorization

2010-03-29 Thread Eric Blake
On 03/27/2010 11:41 AM, Bruno Haible wrote: > +# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) > +# sets the shell variable that indicates the presence of the given module to > +# a C preprocessor expression that will evaluate to 1. > +AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], > +[ > + > GNUL

Re: lchmod cygwin failure

2010-03-29 Thread Eric Blake
On 03/25/2010 01:41 AM, Simon Josefsson wrote: > Building in cygwin fails because: > > depbase=`echo test-fcntl-h-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > g++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -I./.. -I../gllib -I./../gllib > -MT test-fcntl-h-c++.o -MD -MP -MF $depbase.Tpo -c -o tes

Re: [PATCH 1/3] Macro _header_without_use renamed to _sc_header_without_use in maint.mk

2010-03-29 Thread Jim Meyering
Jose E. Marchesi wrote: > Subject: [PATCH 1/3] Macro _header_without_use renamed to > _sc_header_without_use in maint.mk Thanks, Jose. This looks pretty clear cut. I'll push this along with the others once I've tested.

make dist depending on binaries which use gnulib

2010-03-29 Thread Reuben Thomas
Hi, it has just been pointed out to me that "make dist" for current head of GNU Zile fails, unless preceded by "make". This is because make dist distributes a file which can only be made once the zile binary has been built. I have two questions: 1. Is it expected that "make dist" should work wit

Re: [PATCH] exclude: fix the case of globs vs. EXCLUDE_INCLUDE

2010-03-29 Thread Javier Villavicencio
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On 03/29/2010 02:56 AM, Jim Meyering wrote: > Javier Villavicencio wrote: >> I think you may have mixed up the two patches I reported against grep > > Think again ;-) :+) I just did, you're right. > >> bug 29358, so, to clarify: >> That above

Re: [PATCH] build: sync primary and tests-related gnulib module lists

2010-03-29 Thread Jim Meyering
Bruno Haible wrote: > Jim Meyering wrote: ... >> This patch is for information/discussion only. ... >> * bootstrap.conf (gnulib_modules): Synchronize the primary list >> of modules with the list used by tests, so that we don't have >> a repeat of the wctob-vs-Solaris 8 build failure. > > You should

Re: [PATCH] build: avoid link failure on systems using gnulib's fcntl but not open

2010-03-29 Thread Jim Meyering
Bruno Haible wrote: > Replying to Jim I wrote: >> > "_rpl_open", referenced from: >> > _grepfile in grep.o >> The situation in the 'grep' package is as follows: >> - The main part, in lib/, has the module 'fcntl' and therefore >> implicitly 'fcntl-h', but not the 'open' module

Re: [PATCH] save-cwd: don't leak a file descriptor when the caller execs.

2010-03-29 Thread Jim Meyering
James Youngman wrote: > + save-cwd: don't leak a file descriptor when the caller execs. > + * lib/save-cwd.c (save_cwd): set the close-on-exec flag for the > + saved file descriptor. > + * modules/save-cwd (Depends-on): Depend on cloexec. Thanks! I've pushed.

Re: [PATCH] save-cwd: don't leak a file descriptor when the caller execs.

2010-03-29 Thread James Youngman
On Mon, Mar 29, 2010 at 11:23 AM, Paolo Bonzini wrote: > On 03/29/2010 11:49 AM, James Youngman wrote: >> >> Signed-off-by: James Youngman > > Good catch, thanks!  Do you have commit access? I don't. Thanks, James.

Re: [PATCH] save-cwd: don't leak a file descriptor when the caller execs.

2010-03-29 Thread Paolo Bonzini
On 03/29/2010 11:49 AM, James Youngman wrote: Signed-off-by: James Youngman Good catch, thanks! Do you have commit access? Paolo

[PATCH] save-cwd: don't leak a file descriptor when the caller execs.

2010-03-29 Thread James Youngman
Signed-off-by: James Youngman --- ChangeLog|7 +++ lib/save-cwd.c |2 ++ modules/save-cwd |1 + 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index dca5a12..f9bd220 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-2

Re: read() and write() for MinGW

2010-03-29 Thread Paolo Bonzini
Conceptually this is extremely simple, and I've found that gnulib already contains useful bits like SOCKET_TO_FD, FD_TO_SOCKET, and the code for determining if an arbitrary fd is a socket - which is all great. Yes, and the read() and write() functions don't need to make this distinction, becau

Re: sys_ioctl, sys_select: fix link errors

2010-03-29 Thread Ludovic Courtès
Hi Bruno, Bruno Haible writes: >> >* lib/sys_ioctl.in.h (ioctl): Fix declaration idiom. >> >> This patch appears to break Inetutils bootstrapping: >> >> http://hydra.nixos.org/build/335490 > > Thanks for the quick report. This should fix it. The fix is modeled after the > gettimeofday, f