On 05/01/2012 03:41 PM, Bruno Haible wrote: > Configure outputs when cross-compiling: > > checking for GNU libc compatible malloc... no > checking for GNU libc compatible realloc... no > > Here's a proposed patch for improving the guess for glibc targets. > Again, the question is whether to modify the macro in Autoconf proper. > > > 2012-05-01 Bruno Haible <br...@clisp.org> > > *alloc-gnu, eealloc: Avoid "guessing no" when cross-compiling to glibc. > * m4/malloc.m4 (_gl_FUNC_MALLOC_IF): New macro. > (gl_FUNC_MALLOC_GNU): Invoke it instead of _AC_FUNC_MALLOC_IF. > * m4/realloc.m4 (_gl_FUNC_REALLOC_IF): New macro. > (gl_FUNC_REALLOC_GNU): Invoke it instead of _AC_FUNC_REALLOC_IF. > * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Require AC_CANONICAL_HOST. When > cross-compiling, choose the first alternative on glibc systems. > * m4/eealloc.m4 (gl_EEMALLOC): Require AC_CANONICAL_HOST. When > cross-compiling, set gl_cv_func_malloc_0_nonnull to 1 on glibc systems. > (gl_EEREALLOC): Require AC_CANONICAL_HOST. When cross-compiling, set > gl_cv_func_realloc_0_nonnull to 1 on glibc systems.
Can we add other known-good systems, like Cygwin? But that can be an incremental improvement in a later patch. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature