Re: Some free()s in module 'relocatable'

2007-12-26 Thread Ben Pfaff
Sylvain Beucler <[EMAIL PROTECTED]> writes: > Attached is a small patch to fix a couple non-fred memory blocks. They > are not a big deal, but they do produce noise when analyzing programs > with memory checkers such as Valgrind. I do not see the attachment. > Another thing:, the relocatable mod

Re: Gnulib needed in AC_CHECK_HEADERS

2007-12-26 Thread Sylvain Beucler
> I get: > /usr/bin/m4:configure.ac:90: recursion limit of 1024 exceeded, use -L to > change it configure.ac:90 being: gl_INIT -- Sylvain

Some free()s in module 'relocatable'

2007-12-26 Thread Sylvain Beucler
Hello, Attached is a small patch to fix a couple non-fred memory blocks. They are not a big deal, but they do produce noise when analyzing programs with memory checkers such as Valgrind. Another thing:, the relocatable module documentation recommends using: bindtextdomain (PACKAGE, relocate (L

Re: Gnulib needed in AC_CHECK_HEADERS

2007-12-26 Thread Sylvain Beucler
On Wed, Dec 26, 2007 at 06:24:35PM +0100, Bruno Haible wrote: > Sylvain Beucler wrote: > > it seems alloca.h is not yet present at ./configure time > > (there's only gnulib/lib/alloca.in.h). So AC_CHECK_HEADERS fails > > anyway: > > > > configure:14417: checking SDL.h usability > > configure:14434

Re: memmem issues

2007-12-26 Thread Ben Pfaff
>> > + unsigned char b = (unsigned char) needle[i - 1]; >> > ... >> > + if (b == (unsigned char) needle[j]) >> >> Would it be cleaner to declare 'b' to be of type 'char' and avoid the >> casts? > > No; ISO C 99 section 7.21.4 says that when byte strings are compared the > elements are conside

Re: Gnulib needed in AC_CHECK_HEADERS

2007-12-26 Thread Bruno Haible
Sylvain Beucler wrote: > it seems alloca.h is not yet present at ./configure time > (there's only gnulib/lib/alloca.in.h). So AC_CHECK_HEADERS fails > anyway: > > configure:14417: checking SDL.h usability > configure:14434: i586-mingw32msvc-gcc -c -g -O2 > -I/usr/local/cross-tools/i386-mingw32/inc

Re: memmem issues

2007-12-26 Thread Bruno Haible
Hi Paul, Most of your comments apply to all copies of the KMP code in gnulib. > 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? Ye

Re: Problem with yacc rebuild rules

2007-12-26 Thread Bruno Haible
Larry Jones wrote: > I'm having a problem building the Gnulib getdate module as part of CVS > when building in a directory other than the source directory: > > test -f getdate.c || /bin/sh > /u/scjones/cvs-nightly/build-aux/ylwrap /u/scjones/cvs-nightly/lib/getdate.y > y.tab.c getd

Re: Patch for the getpagesize module

2007-12-26 Thread Bruno Haible
Martin Lambers wrote: > > The function from libgcc.a is maybe not correct in all > > situations (think of 64-bit Windows), therefore I would use the > > replacement also on mingw. > > OK, I attached a patch. Thanks. I applied your patch, adding a lib/getpagesize.c file ("git diff" omits added fi

Re: CHARSETALIASDIR in TESTS_ENVIRONMENT?

2007-12-26 Thread Bruno Haible
Ben Pfaff wrote: > The localcharset module has a dependency on "make install" that I > didn't realize until recently: until "make install" is run, > locale_charset cannot resolve character set aliases. For PSPP at > least, this makes "make check" before "make install" fail, unless > CHARSETALIASDI

Re: removing empty parens after function names

2007-12-26 Thread Bruno Haible
Here's what I'm committing. 2007-12-25 Paul Eggert <[EMAIL PROTECTED]> Bruno Haible <[EMAIL PROTECTED]> Avoid using the syntax symbol() in formatted documentation. * MODULES.html.sh (func_module): When replacing symbol() with a hyperlink, remove the parenthe

Re: Incompatible module license.

2007-12-26 Thread Bruno Haible
Hi Jim, I haven't seen progress on this topic for a week, so permit me to jump in. > FYI, it happened two months ago, with this change: > > http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=12a195113bbb3 > > 2007-10-17 Paul Eggert <[EMAIL PROTECTED]> > > Modify glob.c to us

Re: Compiler warning in glob

2007-12-26 Thread Bruno Haible
Paul Eggert wrote: > 2007-10-16 Paul Eggert <[EMAIL PROTECTED]> > > Merge glibc changes into lib/glob.c. > > * lib/glob.c (glob_in_dir): Sync with glibc/posix/glob.c, dated > 2007-10-15 04:59:03 UTC. Here are the changes: > > 2007-10-14 Ulrich Drepper <[EMAIL PROTECT

Re: mingw isnanl-nolibm failure

2007-12-26 Thread Bruno Haible
Eric Blake wrote on 2007-12-11: > 2007-12-11 Eric Blake <[EMAIL PROTECTED]> > > + Fix bug with -0.0L in previous patch. > + * lib/isnan.c (rpl_isnanl): Make robust to -0.0L and pad bits. > + * tests/test-isnan.c (main): Also test on zeroes. > + * tests/test-isnanf.c (main): Lik

make --enable-relocatable work with DESTDIR

2007-12-26 Thread Bruno Haible
Левашев Иван also reported [1] that --enable-relocatable does not work when DESTDIR is used. This fixes it. 2007-12-24 Bruno Haible <[EMAIL PROTECTED]> Make --enable-relocatable work with DESTDIR. * build-aux/install-reloc: Accept another argument 'destdir'. Use it to co

relocatable-prog-wrapper fixes

2007-12-26 Thread Bruno Haible
Hi, It was reported in [1] that the relocatable-prog-wrapper fails to compile due to an undefined xalloc_die() symbol. It is caused by the use of xreadlink(). Since the wrapper is compiled with NO_XMALLOC defined, xreadlink should be avoided. 2007-12-24 Bruno Haible <[EMAIL PROTECTED]>

setenv, unsetenv fixes

2007-12-26 Thread Bruno Haible
Hi, It was reported in [1] that there is a conflict between the unsetenv() declarations on MacOS X and in gnulib under some conditions. The error message is this: In file included from ../gnulib-lib/relocwrapper.c:56: ../gnulib-lib/setenv.h:47: error: conflicting types for `unsetenv' /usr/i

Re: memmem issues

2007-12-26 Thread Bruno Haible
Eric Blake wrote: > + Fix memmem to avoid O(n^2) worst-case complexity. > + * lib/memmem.c (knuth_morris_pratt): New function. > + (memmem): Use it if first few naive iterations fail. While considering to submit a modified version of this code to glibc for inclusion, I found it good to

comments about Knuth-Morris-Pratt algorithm

2007-12-26 Thread Bruno Haible
Hi, Some of the comments in the KMP algorithm implementation were insufficient to understand and verify the correctness of the code. I'm adding better comments. 2007-12-23 Bruno Haible <[EMAIL PROTECTED]> * lib/c-strcasestr.c: Add more comments. * lib/c-strstr.c: Likewise.

Re: no license on some test modules

2007-12-26 Thread Bruno Haible
Eric Blake wrote: > If libtests.a is listed first, progname.o is not included. But if it > is listed second only, then gl_array_list.o generates a missing link to > xmalloc > and friends. The only solution is repeating the LDADD. I'm committing the > following: > > From: Eric Blake <[EMAIL

Re: memmem issues

2007-12-26 Thread Bruno Haible
Eric Blake wrote: > + * tests/test-memmem.c: Rewrite, borrowing ideas from > + test-mbsstr1.c; the old version wouldn't even compile! After the rewrite, there's no code left from the original test. I committed this, to correct the attribution: 2007-12-23 Bruno Haible <[EMAIL PROTECTED]

Re: gnulib-tool: fix a detail in tests/Makefile.am

2007-12-26 Thread Bruno Haible
Ralf Wildenhues wrote: > > * gnulib-tool (func_emit_tests_Makefile_am): Expand references to > > the build-aux directory. > > FWIW, I think this would do the wrong thing (namely, missing `../') for > substitutions that matched with `gnulib-tool --with-tests --test'. > (i.e., for the case w

Re: no license on some test modules

2007-12-26 Thread Bruno Haible
Eric Blake wrote: > 2007-12-11 Eric Blake <[EMAIL PROTECTED]> > + > + Avoid link failures with separate libtests.a. > + * gnulib-tool (func_emit_tests_Makefile_am): Also list local_ldadd > + last, to satisfy circular dependencies. > + Thanks. I'm applying this additional patch, 1)