Mercurial > hg > octave-kai > gnulib-hg
changeset 13438:425a8899539e
Fix HAVE_CALLOC_POSIX misnomer.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 22 Jun 2010 00:20:46 +0200 |
parents | 24728c5de40b |
children | c963a3816969 |
files | ChangeLog lib/stdlib.in.h m4/calloc.m4 m4/stdlib_h.m4 modules/stdlib |
diffstat | 5 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2010-06-21 Bruno Haible <bruno@clisp.org> + Fix HAVE_CALLOC_POSIX misnomer. + * lib/stdlib.in.h (calloc): Use REPLACE_CALLOC instead of + !HAVE_CALLOC_POSIX. + * m4/calloc.m4 (gl_REPLACE_CALLOC): Set REPLACE_CALLOC instead of + HAVE_CALLOC_POSIX. + * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC + instead of HAVE_CALLOC_POSIX. + * modules/stdlib (Makefile.am): Substitute REPLACE_CALLOC instead of + HAVE_CALLOC_POSIX. + Use modern idiom for calloc() replacement. * modules/calloc (configure.ac): Invoke gl_FUNC_CALLOC_GNU instead of AC_FUNC_CALLOC.
--- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -112,7 +112,7 @@ #endif #if @GNULIB_CALLOC_POSIX@ -# if !@HAVE_CALLOC_POSIX@ +# if @REPLACE_CALLOC@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef calloc # define calloc rpl_calloc
--- a/m4/calloc.m4 +++ b/m4/calloc.m4 @@ -63,5 +63,5 @@ AC_DEFUN([gl_REPLACE_CALLOC], [ AC_LIBOBJ([calloc]) - HAVE_CALLOC_POSIX=0 + REPLACE_CALLOC=1 ])
--- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -76,7 +76,6 @@ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) @@ -98,6 +97,7 @@ HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) + REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) 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])
--- a/modules/stdlib +++ b/modules/stdlib @@ -53,7 +53,6 @@ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ @@ -76,6 +75,7 @@ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \ + -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|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' \