Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Paul Eggert
On 10/13/11 16:51, Bruno Haible wrote: > But it does not help for the NeXTstep case, where sed chokes on any > regex delimiter that is not a slash. So what's the point? Sorry, I didn't know that NeXTstep's sed was that badly broken. The original message mentions only \|...|{...} as not working, a

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Daniel Richard G.
On Thu, 2011 Oct 13 16:18-0700, Paul Eggert wrote: > > Hmm, but isn't it a bit iffy? With the patch, a string with '\' is > passed to 'echo', and that's not portable. Maybe it works on mingw, > maybe not (I don't use mingw). Good point! > How about the following patch instead? As Bruno noted, t

new module 'integer_length'

2011-10-13 Thread Bruno Haible
Hi, The code in vasnprintf.c around line 560, which determines the most significant set bit in an 'unsigned int' word, is not optimally efficient. ffs() is a nice primitive, but integer_length() is more powerful, because ffs(x) == integer_length(x & -x). This primitive is usally called integer_l

ffsl: optimization for non-GCC

2011-10-13 Thread Bruno Haible
Before I added the previous optimization, I got this warning and code on mingw: $ gcc-3 -mno-cygwin -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -I/usr/local/mingw/include -Wall -S -O2 ffsl.c In file included from ffsl.c:3: ffsl.h: In function `ffsl': ffsl.h:44: warning: right shift coun

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Bruno Haible
Paul Eggert wrote: > diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 > index b7276a3..031bc21 100644 > --- a/m4/absolute-header.m4 > +++ b/m4/absolute-header.m4 > @@ -81,12 +81,12 @@ changequote(,) >gl_dirsep_regex='/' >;; >esac > - gl_absolute_header_sed='\|'"${gl_d

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Bruno Haible
Daniel Richard G. wrote: > diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 > index b7276a3..baabb87 100644 > --- a/m4/absolute-header.m4 > +++ b/m4/absolute-header.m4 > @@ -81,7 +81,10 @@ changequote(,) >gl_dirsep_regex='/' >;; >esac > - gl_absolute_header_sed='\|'"$

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Paul Eggert
On 10/13/11 15:36, Daniel Richard G. wrote: > It's a fairly small and straightforward patch Hmm, but isn't it a bit iffy? With the patch, a string with '\' is passed to 'echo', and that's not portable. Maybe it works on mingw, maybe not (I don't use mingw). How about the following patch instead?

Re: ffsl, ffsll: optimize

2011-10-13 Thread Eric Blake
On 10/13/2011 04:49 PM, Bruno Haible wrote: Hi Eric, Your ffs, ffsl, ffsll modules make use of __builtin_ffs for GCC>= 3.4. But the same compiler versions also have __builtin_ffsl and __builtin_ffsll. Their use simplifies (and most certainly speeds up) the code generated by GCC. I must have mi

ffsl, ffsll: optimize

2011-10-13 Thread Bruno Haible
Hi Eric, Your ffs, ffsl, ffsll modules make use of __builtin_ffs for GCC >= 3.4. But the same compiler versions also have __builtin_ffsl and __builtin_ffsll. Their use simplifies (and most certainly speeds up) the code generated by GCC. For example, on MacOS X in 64-bit mode, currently the code is

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Daniel Richard G.
On Thu, 2011 Oct 13 23:25+0200, Bruno Haible wrote: > > Gnulib attempts to target computer systems from this era, see > > . NeXTstep had its highlight time from 1992 to 1995; that is way too > old for gnulib to support. "

ffs: support symbol renaming

2011-10-13 Thread Bruno Haible
Libraries which use gnulib need to be able to rename symbols, for namespace cleanliness. This is commonly done through definitions such as #define ffs libfoo_ffs in . But for this to work, the implementation of the gnulib module must include . 2011-10-13 Bruno Haible ffs, bcopy, m

Re: gl_ABSOLUTE_HEADER_ONE and older seds

2011-10-13 Thread Bruno Haible
[CCing bug-gnulib.] Daniel Richard G. wrote: > I was recently playing around with a NeXTSTEP 3.3 system in a virtual > machine. Among other things, I tried compiling various modern-day source > packages to see how well they work. > > In building wget, I found a relatively minor problem in > gl_ABS