eealloc.m4 974 B

1234567891011121314151617181920212223242526272829303132
  1. # eealloc.m4 serial 2
  2. dnl Copyright (C) 2003, 2009 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.
  6. AC_DEFUN([gl_EEALLOC],
  7. [
  8. AC_REQUIRE([gl_EEMALLOC])
  9. AC_REQUIRE([gl_EEREALLOC])
  10. AC_REQUIRE([AC_C_INLINE])
  11. ])
  12. AC_DEFUN([gl_EEMALLOC],
  13. [
  14. _AC_FUNC_MALLOC_IF(
  15. [gl_cv_func_malloc_0_nonnull=1],
  16. [gl_cv_func_malloc_0_nonnull=0])
  17. AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
  18. [If malloc(0) is != NULL, define this to 1. Otherwise define this
  19. to 0.])
  20. ])
  21. AC_DEFUN([gl_EEREALLOC],
  22. [
  23. _AC_FUNC_REALLOC_IF(
  24. [gl_cv_func_realloc_0_nonnull=1],
  25. [gl_cv_func_realloc_0_nonnull=0])
  26. AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
  27. [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
  28. to 0.])
  29. ])