Mercurial > hg > octave-kai > gnulib-hg
changeset 13434:3075f4843802
Fix HAVE_MALLOC_POSIX misnomer.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 22 Jun 2010 00:06:29 +0200 |
parents | 7f9b23c2c458 |
children | 90d8e475ab29 |
files | ChangeLog lib/stdlib.in.h m4/malloc.m4 m4/stdlib_h.m4 modules/stdlib |
diffstat | 5 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2010-06-21 Bruno Haible <bruno@clisp.org> + Fix HAVE_MALLOC_POSIX misnomer. + * lib/stdlib.in.h (malloc): Use REPLACE_MALLOC instead of + !HAVE_MALLOC_POSIX. + * m4/malloc.m4 (gl_REPLACE_MALLOC): Set REPLACE_MALLOC instead of + HAVE_MALLOC_POSIX. + * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC + instead of HAVE_MALLOC_POSIX. + * modules/stdlib (Makefile.am): Substitute REPLACE_MALLOC instead of + HAVE_MALLOC_POSIX. + Use modern idiom for malloc() replacement. * modules/malloc (configure.ac): Invoke gl_FUNC_MALLOC_GNU instead of AC_FUNC_MALLOC.
--- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -218,7 +218,7 @@ #endif #if @GNULIB_MALLOC_POSIX@ -# if !@HAVE_MALLOC_POSIX@ +# if @REPLACE_MALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef malloc # define malloc rpl_malloc
--- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -58,5 +58,5 @@ AC_DEFUN([gl_REPLACE_MALLOC], [ AC_LIBOBJ([malloc]) - HAVE_MALLOC_POSIX=0 + REPLACE_MALLOC=1 ])
--- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 28 +# stdlib_h.m4 serial 29 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -81,7 +81,6 @@ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) @@ -101,6 +100,7 @@ HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) + REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
--- a/modules/stdlib +++ b/modules/stdlib @@ -58,7 +58,6 @@ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -79,6 +78,7 @@ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ + -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \