mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
Make the module 'malloc-gnu' work again on AIX and OSF/1.
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2010-08-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
|
Make the module 'malloc-gnu' work again on AIX and OSF/1.
|
||||||
|
* m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Define HAVE_MALLOC_GNU instead of
|
||||||
|
HAVE_MALLOC.
|
||||||
|
* lib/malloc.c (NEED_MALLOC_GNU): Enable behaviour also when
|
||||||
|
GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU.
|
||||||
|
* modules/malloc-gnu (configure.ac): Use gl_MODULE_INDICATOR.
|
||||||
|
|
||||||
2010-08-29 Bruno Haible <bruno@clisp.org>
|
2010-08-29 Bruno Haible <bruno@clisp.org>
|
||||||
|
|
||||||
Update modules list.
|
Update modules list.
|
||||||
|
@@ -21,8 +21,11 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
|
/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
|
||||||
#ifdef malloc
|
#ifdef malloc
|
||||||
# define NEED_MALLOC_GNU
|
# define NEED_MALLOC_GNU 1
|
||||||
# undef malloc
|
# undef malloc
|
||||||
|
/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */
|
||||||
|
#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU
|
||||||
|
# define NEED_MALLOC_GNU 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specification. */
|
/* Specification. */
|
||||||
@@ -41,7 +44,7 @@ rpl_malloc (size_t n)
|
|||||||
{
|
{
|
||||||
void *result;
|
void *result;
|
||||||
|
|
||||||
#ifdef NEED_MALLOC_GNU
|
#if NEED_MALLOC_GNU
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
n = 1;
|
n = 1;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# malloc.m4 serial 11
|
# malloc.m4 serial 12
|
||||||
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
dnl gives unlimited permission to copy and/or distribute it,
|
||||||
@@ -13,10 +13,10 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU],
|
|||||||
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
|
||||||
dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
|
dnl _AC_FUNC_MALLOC_IF is defined in Autoconf.
|
||||||
_AC_FUNC_MALLOC_IF(
|
_AC_FUNC_MALLOC_IF(
|
||||||
[AC_DEFINE([HAVE_MALLOC], [1],
|
[AC_DEFINE([HAVE_MALLOC_GNU], [1],
|
||||||
[Define to 1 if your system has a GNU libc compatible 'malloc'
|
[Define to 1 if your system has a GNU libc compatible 'malloc'
|
||||||
function, and to 0 otherwise.])],
|
function, and to 0 otherwise.])],
|
||||||
[AC_DEFINE([HAVE_MALLOC], [0])
|
[AC_DEFINE([HAVE_MALLOC_GNU], [0])
|
||||||
gl_REPLACE_MALLOC
|
gl_REPLACE_MALLOC
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
@@ -14,7 +14,7 @@ malloc-posix
|
|||||||
|
|
||||||
configure.ac:
|
configure.ac:
|
||||||
gl_FUNC_MALLOC_GNU
|
gl_FUNC_MALLOC_GNU
|
||||||
AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
|
gl_MODULE_INDICATOR([malloc-gnu])
|
||||||
|
|
||||||
Makefile.am:
|
Makefile.am:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user