warnings: fix compilation with old autoconf
[gnulib/ericb.git] / m4 / eealloc.m4
blob96b9bca5ae00644cae93a4c24f3f3f64815edc13
1 # eealloc.m4 serial 3
2 dnl Copyright (C) 2003, 2009-2017 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_EEALLOC],
9   AC_REQUIRE([gl_EEMALLOC])
10   AC_REQUIRE([gl_EEREALLOC])
13 AC_DEFUN([gl_EEMALLOC],
15   _AC_FUNC_MALLOC_IF(
16     [gl_cv_func_malloc_0_nonnull=1],
17     [gl_cv_func_malloc_0_nonnull=0])
18   AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
19     [If malloc(0) is != NULL, define this to 1.  Otherwise define this
20      to 0.])
23 AC_DEFUN([gl_EEREALLOC],
25   _AC_FUNC_REALLOC_IF(
26     [gl_cv_func_realloc_0_nonnull=1],
27     [gl_cv_func_realloc_0_nonnull=0])
28   AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
29     [If realloc(NULL,0) is != NULL, define this to 1.  Otherwise define this
30      to 0.])