1 1.1 christos # eealloc.m4 serial 1 2 1.1 christos dnl Copyright (C) 2003 Free Software Foundation, Inc. 3 1.1 christos dnl This file is free software; the Free Software Foundation 4 1.1 christos dnl gives unlimited permission to copy and/or distribute it, 5 1.1 christos dnl with or without modifications, as long as this notice is preserved. 6 1.1 christos 7 1.1 christos AC_DEFUN([gl_EEALLOC], 8 1.1 christos [ 9 1.1 christos AC_REQUIRE([gl_EEMALLOC]) 10 1.1 christos AC_REQUIRE([gl_EEREALLOC]) 11 1.1 christos AC_REQUIRE([AC_C_INLINE]) 12 1.1 christos ]) 13 1.1 christos 14 1.1 christos AC_DEFUN([gl_EEMALLOC], 15 1.1 christos [ 16 1.1 christos _AC_FUNC_MALLOC_IF( 17 1.1 christos [gl_cv_func_malloc_0_nonnull=1], 18 1.1 christos [gl_cv_func_malloc_0_nonnull=0]) 19 1.1 christos AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], $gl_cv_func_malloc_0_nonnull, 20 1.1 christos [If malloc(0) is != NULL, define this to 1. Otherwise define this 21 1.1 christos to 0.]) 22 1.1 christos ]) 23 1.1 christos 24 1.1 christos AC_DEFUN([gl_EEREALLOC], 25 1.1 christos [ 26 1.1 christos _AC_FUNC_REALLOC_IF( 27 1.1 christos [gl_cv_func_realloc_0_nonnull=1], 28 1.1 christos [gl_cv_func_realloc_0_nonnull=0]) 29 1.1 christos AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], $gl_cv_func_realloc_0_nonnull, 30 1.1 christos [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this 31 1.1 christos to 0.]) 32 1.1 christos ]) 33