Re: Fix malloc, calloc, realloc

2010-08-28 Thread Eric Blake
On 08/28/2010 01:55 AM, Ralf Wildenhues wrote: * Ralf Wildenhues wrote on Sat, Aug 28, 2010 at 09:40:34AM CEST: The patch series makes M4's own testsuite pass, but in the meantime, something else broke again so I'm still not completely done. Never mind, that was PEBKAC. M4 1.4.14.6-76d1-dirty

Re: Fix malloc, calloc, realloc (was: debugging M4 on AIX 5.3)

2010-08-28 Thread Bruno Haible
Hi Ralf, > 0001-Tests-for-module-calloc.patch > 0002-Tests-for-module-malloc.patch > 0003-Tests-for-module-realloc.patch Thanks! I've added your tests, after updating them to the new module naming, and after doing cosmetic changes: - Add comments about what is being tested. - Write NULL, not

rename module malloc -> malloc-gnu

2010-08-28 Thread Bruno Haible
Before adding the unit tests that Ralf wrote, I find it useful to now implement the renaming of modules already suggested on 2007-09-03 in . malloc -> malloc-gnu calloc -> calloc-gnu realloc -> realloc-gnu Rationale: consis

[PATCH] pread, pwrite: add missing dependency

2010-08-28 Thread Eric Blake
* modules/pread (Depends-on): Add extensions. * modules/pwrite (Depends-on): Likewise. Signed-off-by: Eric Blake --- This was the final warning I noticed from a megatest run; both pread and pwrite were using AC_USE_SYSTEM_EXTENSIONS without pulling in the extensions module in time. ChangeLog

Re: [PATCH] missing deps in unistr/

2010-08-28 Thread Bruno Haible
Hi Ian, > Several of the unistr/u{8,16}-str* modules fail the test suite > due to missing dependencies on unistr/u32-to-u{8,16}. Indeed, I reproduce it. > Patch attached. > --- a/modules/unistr/u16-strchr > +++ b/modules/unistr/u16-strchr > @@ -7,6 +7,7 @@ lib/unistr/u16-strchr.c > Depends-on:

Re: [libvirt] [RFC PATCH] build: avoid %zu in translated strings

2010-08-28 Thread Bruno Haible
Hi Eric, > after looking into this deeper, it (happily) appears that I > may have been mistaken. It looks like the gnulib vasprintf module > _already_ performs printf parsing on mingw; and that as a virtue of that > printf parsing, %zu and %llu are already rewritten into modifiers > understood by

Re: Fwd: Automagic dependency on selinux

2010-08-28 Thread Bruno Haible
Hi Jim, Johan Hattne wrote: > ... trouble if e.g. findutils are compiled on a host > where selinux is present, but run on a system without. For every somewhat complicated or possibly troublesome connection to an external package, it makes sense to have a --without-... option. Paul Eggert wrote:

read-file: don't occupy too much unused memory

2010-08-28 Thread Bruno Haible
When read_file returns a buffer that contains a 201KB file, you don't want that buffer to be and to stay 300KB large - that's just a waste of memory. This fixes it. 2010-08-28 Bruno Haible read-file: Don't occupy too much unused memory. * lib/read-file.c (fread_file): Shrink t

Re: [PATCH] read-file: Avoid memory reallocations with seekable files.

2010-08-28 Thread Bruno Haible
Eric Blake wrote: > I see a few changes to squash in: I see some more changes to squash in: > +#include This requires the use of module 'sys_stat'. (See in doc/posix-headers/sys_stat.texi; we use S_REG.) > +/* Get SIZE_MAX. */ > +#include This requires the use of module 'stdint'. > /* Get

Re: ftello license

2010-08-28 Thread Bruno Haible
Eric Blake wrote: > we'd need consensus that ftello > should be LGPLv2+ instead of its current LGPLv3+. I think that boils > down to just Bruno and myself, and I'm okay with the idea. Yes, this makes sense for me too. I'm relaxing its license: 2010-08-28 Bruno Haible ftello: Relax

Re: feature request: detect CPU instruction set

2010-08-28 Thread Bruno Haible
Hi Sam, all, Replying to : Ralf Wildenhues wrote: > > The already existing AC_CANONICAL_HOST is insufficient in that it > > does not detect the actual cpu instruction set to which the C > > compiler compiles. > > Is there someth

Re: AC_FUNC_* cross-compilation guesses

2010-08-28 Thread Bruno Haible
Ralf Wildenhues wrote: > > In particular, it's bad to guess "no" for embedded glibc > > systems because that increases the size of compiled executables. > > But that holds for Autoconf's AC_FUNC_STRNLEN as well. Shouldn't it > have a more optimistic cross compilation guess, too? Autoconf has tra

Re: AC_FUNC_STRTOD

2010-08-28 Thread Ralf Wildenhues
Hello Bruno, * Bruno Haible wrote on Sat, Aug 28, 2010 at 12:56:21PM CEST: > Paolo Bonzini wrote on 2010-06-15: > > >- AC_FUNC_STRNLEN > > > > This maybe falls in the same group as AC_FUNC_MALLOC/AC_FUNC_REALLOC. > > OK, let's leave it in Autoconf. But the cross-compilation guess is too > p

Re: AC_FUNC_STRTOD

2010-08-28 Thread Bruno Haible
Paolo Bonzini wrote on 2010-06-15: > >- AC_FUNC_STRNLEN > > This maybe falls in the same group as AC_FUNC_MALLOC/AC_FUNC_REALLOC. OK, let's leave it in Autoconf. But the cross-compilation guess is too pessimistic for gnulib habits: we haven't seen the AIX bug on any system except on AIX. In

Re: AC_FUNC_STRTOD

2010-08-28 Thread Bruno Haible
> +** Newly obsolete macros > + The following macros have been marked obsolete. New programs should use > + the corresponding Gnulib modules. Gnulib not only detects the particular > + portability problems but also provides complete workarounds. > + > + AC_FUNC_ERROR_AT_LINE AC_FUNC_LS

Re: accept4: depend on socklen

2010-08-28 Thread Bruno Haible
Ralf Wildenhues wrote: > on HP-UX 10.20: > ... > I confirmed that the configure output contained text like: > > | checking for socklen_t... no > | checking for socklen_t equivalent... int Thanks, perfect. Bruno

Re: AC_FUNC_STRTOD

2010-08-28 Thread Bruno Haible
Hi, Regarding the deprecation of AC_FUNC_* macros that are better provided by gnulib: Paolo Bonzini wrote in : > > The affected macros are: > >- AC_FUNC_ERROR_AT_LINE > > If you're interested in this, you're likely using

Re: accept4: depend on socklen

2010-08-28 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Sat, Aug 28, 2010 at 10:23:23AM CEST: > > I needed this on some system but forgot which. > > AFAICT, the systems which lack socklen_t are: > HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS. > > > accept4: depend on socklen > > This patch is incomplete, because acc

Re: relocwrapper interaction with replacement functions

2010-08-28 Thread Bruno Haible
Ben Pfaff wrote in : > > [4/4] getcwd, relocwrapper link errors > > I didn't see this posted yet, but I guess it is not important on > OpenBSD 4.7. It's heavy to use the getcwd replacement in relocwrapper, and probably rarely

Re: iconv.m4: avoid warning

2010-08-28 Thread Bruno Haible
Hi Eric, Eric Blake wrote in : > > I don't see how to test for a new vs. an old definition of AC_DEFUN_ONCE. > > You can use the existence of gnulib's witness macro (in 00gnulib.m4) as > the proof of a working AC_DEFUN_ONCE prio

Re: accept4: depend on socklen

2010-08-28 Thread Bruno Haible
Hi Ralf, > I needed this on some system but forgot which. AFAICT, the systems which lack socklen_t are: HP-UX 10.20, IRIX 6.5, Interix 3.5, BeOS. > accept4: depend on socklen This patch is incomplete, because according to POSIX, ought to provide socklen_t, even if the user does not use any

Re: Fix malloc, calloc, realloc (was: debugging M4 on AIX 5.3)

2010-08-28 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Sat, Aug 28, 2010 at 09:40:34AM CEST: > The patch series makes M4's own testsuite pass, but in the meantime, > something else broke again so I'm still not completely done. Never mind, that was PEBKAC. M4 1.4.14.6-76d1-dirty works with git gnulib and my patch series on A

Fix malloc, calloc, realloc (was: debugging M4 on AIX 5.3)

2010-08-28 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Wed, Aug 25, 2010 at 11:25:03PM CEST: > Continuing with M4 branch-1.4 failures on AIX 5.3: [...] > *** m4-tmp.569356/m4-xerr Wed Aug 25 19:05:46 2010 > --- m4-tmp.569356/m4-errWed Aug 25 19:05:46 2010 > *** > *** 0 > --- 1,3 > + m4:stdi