wcwidth failure on RedHat Linux 7.3 (coreutils-6.9.91)

2007-12-21 Thread Peter Fales
I'm seeing the following gnulib test failure while building coreutils-6.9.91 on RedHat Linux 7.3. I'm not sure whether folks want to support such old systems, but just in case... I've attached the results of the verbose make check below, but the failure is at line 63 of gnulib-tests/test-wcwidth

Re: mingw and memcmp

2007-12-21 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > - You can bury the 'memcmp' module. It's not needed by ANSI C systems, > and gnulib assumes ANSI C for ca. 2 years already. I think we're assuming freestanding C89 or better, right? memcmp is required for hosted C89, but not for freestanding. It's

Re: memmem issues

2007-12-21 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > + size_t *table = (size_t *) malloca (m * sizeof (size_t)); > + if (table == NULL) > +return false; Shouldn't this check for overflow in the multiplication? Something like this, perhaps? size_t *table; if (xalloc_oversized (m, sizeof *table))

Re: relocatable-prog-wrapper

2007-12-21 Thread Bruno Haible
Simon Josefsson wrote: > 2007-12-21 Simon Josefsson <[EMAIL PROTECTED]> > > * modules/relocatable-prog-wrapper (Depends-on): Add intprops and > string, needed by strerror. Yes, please apply. These two modules can be added because they don't contain *.c files. Adding 'string' will

m4 and progname (was: Re: mingw and memcmp)

2007-12-21 Thread Bruno Haible
Eric Blake wrote: > (I'm starting to wonder if it is easier to require all test-foo.c programs to > declare and populate program_name themselves, rather than relying on the > progname module.) Oh no. The progname module is there to simplify things for both programs and test suite. It would be b

Re: memmem issues

2007-12-21 Thread Bruno Haible
I wrote: > > + precisely, when > > + - the outer loop count is >= 10, > > + - the average number of comparisons per outer loop is >= 5, > > + - the total number of comparisons is >= m. > > These comments are out of sync with the code. Oops, that was nonsense. Please ignore t

Re: mingw and memcmp

2007-12-21 Thread Bruno Haible
Hi Eric, > +2007-12-20 Eric Blake <[EMAIL PROTECTED]> > + > + Work around circular library issue when cross-compiling. > + * lib/progname.c (set_program_name): Use strncmp, not memcmp, so > + that progname.o does not need to pull in rpl_memcmp. I don't like this patch at all.

Re: gnulib's Knuth-Morris-Pratt implementation

2007-12-21 Thread Bruno Haible
Eric Blake wrote: > I wonder if Boyer-Moore would be any more effective than KMP in the > average case For long strings, I think so, yes, according to what I read in wikipedia. The initialization of an array of 256 bytes can be relatively costly if the strings are short. But since it's only trigg

Re: memmem issues

2007-12-21 Thread Bruno Haible
Eric Blake wrote: > - It uses memcmp without depending on the memcmp module, making it needlessly > fail on some older platforms. If memory serves me well, the platforms where memcmp was incorrect (comparing signed instead of unsigned byte values) were SunOS 4 and possibly IRIX 4. *Very* ancient.

Re: removing empty parens after function names

2007-12-21 Thread Bruno Haible
Karl Berry wrote: > Personally, I kind of agree with you that in this instance, the parens > to mark functions is more useful than not. I don't know why rms felt so > strongly about it that he put it into standards.texi (umpteen years ago). > ... > If you want to ask rms about it, feel free. Than

relocatable-prog-wrapper

2007-12-21 Thread Simon Josefsson
This module fails --test: executing aclocal -I glm4 configure.ac:110: warning: gl_HEADER_STRING_H_DEFAULTS is m4_require'd but not m4_defun'd glm4/strerror.m4:18: gl_FUNC_STRERROR_SEPARATE is expanded from... configure.ac:27: gl_INIT is expanded from... configure.ac:110: the top level executing a