Re: Using gnulib with -pedantic, I get many warnings about #include_next

2008-08-29 Thread Bruno Haible
Eric Blake wrote: > > Since -isystem is some burden on the gnulib user (not a big one, but anyway) > > I propose to add > >#ifdef __GNUC__ > ># pragma GCC system_header > >#endif > > to all gnulib headers that use @[EMAIL PROTECTED] Fortunately gnulib does > > not > > use __STDC__ in a

simplify m4/include_next.m4

2008-08-29 Thread Bruno Haible
This removes a one-year-old FIXME from m4/include_next.m4. 2008-08-29 Bruno Haible <[EMAIL PROTECTED]> * m4/include_next.m4 (gl_INCLUDE_NEXT): Don't define HAVE_INCLUDE_NEXT any more. --- m4/include_next.m4.orig Sat Aug 30 02:10:51 2008 +++ m4/include_next.m4 Sat Aug 30 02

Re: bitrotate

2008-08-29 Thread Bruno Haible
Simon Josefsson wrote: > + > +#include > + The module description needs to list the dependency to the 'stdint' module. Bruno

Re: bitrotate

2008-08-29 Thread Bruno Haible
Ben Pfaff wrote: > Since you're using the inline keyword, you should add a > dependency on the inline module. He's only using 'static inline'; therefore an AC_REQUIRE([AC_C_INLINE]) is all that he needs. > > +/* Given an unsigned 32-bit argument X, return the value corresponding > > + to rotati

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > how about we go one step > further, and have a deprecation period, where for a year or so, we provide > mbase_name (returns NULL on failure) and xbase_name (calls xmalloc on > failure) but no base_name. There's a better solution that doesn't involve waitin

Re: bitrotate

2008-08-29 Thread Ben Pfaff
Simon Josefsson <[EMAIL PROTECTED]> writes: > I have pushed the patch below, but i still appreciate further review of > the code. Since you're using the inline keyword, you should add a dependency on the inline module. > +/* Given an unsigned 32-bit argument X, return the value corresponding > +

Re: bitrotate

2008-08-29 Thread Paolo Bonzini
> +/* Given an unsigned 16-bit argument X, return the value corresponding > + to rotating the bits N steps to the left. N must be between 1 to > + 15 inclusive. */ > +static inline uint16_t > +rotl16 (uint16_t x, int n) > +{ > + return ((x << n) | (x >> (16 - n))) & 0x; > +} & 0xFFF

Re: [PATCH] use unlocked io in getdelim

2008-08-29 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> I'd prefer to solve it by having m4 code check whether >> the non-portable code works or not, and then AC_SUBST in the proper >> replacement function, either getline-fast.c or getline-slow.c. This >> allows a gnulib module 'getl

Re: bitrotate

2008-08-29 Thread Simon Josefsson
Paul Eggert <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> +#define rotl32(x,n) \ >> + x) << ((uint16_t)(n))) | ((x) >> (32 - (uint16_t)(n & 0x) > > I suggest using inline functions rather than macros, to avoid hassles > with double-evaluating argum

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > According to Jim Meyering on 8/29/2008 6:00 AM: >>> 1) About the naming of the functions. We have one convention so far to >>>distinguish a library-safe function and one that calls xalloc_die() >>>upon memory allocation error: the prefix "x" ("checki

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 8/29/2008 6:00 AM: >> 1) About the naming of the functions. We have one convention so far to >>distinguish a library-safe function and one that calls xalloc_die() >>upon memory allocation error: the prefix "x" ("che

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: ... > This would also solve a problem that was mentioned some time ago: 'argp' > is an LGPLed module, but it uses 'dirname' which is not under LGPL. > >> I wanted a version of findprog that I could use from a library >> (libvirt), but the existing one can cal

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Bruno Haible
Hi Jim, > ended up with > a new module, mfilenamecat (wrapper around filenamecat), and mfilename > (contents of basename.c and dirname.c, adjusted not to exit). This would also solve a problem that was mentioned some time ago: 'argp' is an LGPLed module, but it uses 'dirname' which is not under L

[PATCH] bootstrap: merge changes from coreutils

2008-08-29 Thread Jim Meyering
FYI, I've just pushed this: >From 2477d329d432a5969750486f2ea7657f5c54abae Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Fri, 29 Aug 2008 12:53:50 +0200 Subject: [PATCH] bootstrap: merge changes from coreutils * build-aux/bootstrap (cp_mark_as_generated): Preserve perms of

Re: findprog: don't exit => exit-free base_name, dir_name, etc

2008-08-29 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: ... > diff --git a/lib/mfilename.c b/lib/mfilename.c > new file mode 100644 > index 000..10bdfbd > --- /dev/null > +++ b/lib/mfilename.c > @@ -0,0 +1,182 @@ > +/* simple file-name-manipulation functions that never exit > + > + Copyright (C) 1996-2008 Fr

Re: [PATCH] use unlocked io in getdelim

2008-08-29 Thread Bruno Haible
Simon Josefsson wrote: > I'd prefer to solve it by having m4 code check whether > the non-portable code works or not, and then AC_SUBST in the proper > replacement function, either getline-fast.c or getline-slow.c. This > allows a gnulib module 'getline-slow' for when people prefer a small and > s

Re: byteswap 404

2008-08-29 Thread Bruno Haible
> Thanks. It's fine now: the newest MODULES.html fixes the problems with the > hyperlinks. I'm removing the --cvs-urls option. Note that the problem was that these URLs referred to the old cvs repository. The git-mirroring cvs repository works fine, but AFAIK it is not viewable through http. Brun

Re: getndelim2 license

2008-08-29 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Hi Jim, > >> Will commit this shortly: >> >> * modules/getndelim2 (License): Relicense to LGPLv2+. > > Do you have RMS's backing for this move? The original version of this code > was contributed to the FSF by Jan Brittenson, who is not on this mailing

Re: getndelim2 license

2008-08-29 Thread Paolo Bonzini
Bruno Haible wrote: > Hi Jim, > >> Will commit this shortly: >> >> * modules/getndelim2 (License): Relicense to LGPLv2+. > > Do you have RMS's backing for this move? The original version of this code > was contributed to the FSF by Jan Brittenson, who is not on this mailing list. > It was my