annotate m4/malloc.m4 @ 400:573ed4940625 3.0-beta1 3.0-beta1

Fixed inclusion of documentation in make dist
author lost@l-w.ca
date Fri, 23 Jul 2010 17:32:29 -0600
parents 7987ee447833
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
1 # malloc.m4 serial 9
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
2 dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
6
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
7 # gl_FUNC_MALLOC_POSIX
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
8 # --------------------
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
9 # Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
10 # fails), and replace malloc if it is not.
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
11 AC_DEFUN([gl_FUNC_MALLOC_POSIX],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
12 [
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
13 AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
14 if test $gl_cv_func_malloc_posix = yes; then
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
15 HAVE_MALLOC_POSIX=1
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
16 AC_DEFINE([HAVE_MALLOC_POSIX], [1],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
17 [Define if the 'malloc' function is POSIX compliant.])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
18 else
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
19 AC_LIBOBJ([malloc])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
20 HAVE_MALLOC_POSIX=0
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
21 fi
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
22 AC_SUBST([HAVE_MALLOC_POSIX])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
23 ])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
24
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
25 # Test whether malloc, realloc, calloc are POSIX compliant,
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
26 # Set gl_cv_func_malloc_posix to yes or no accordingly.
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
27 AC_DEFUN([gl_CHECK_MALLOC_POSIX],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
28 [
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
29 AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
30 [gl_cv_func_malloc_posix],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
31 [
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
32 dnl It is too dangerous to try to allocate a large amount of memory:
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
33 dnl some systems go to their knees when you do that. So assume that
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
34 dnl all Unix implementations of the function are POSIX compliant.
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
35 AC_TRY_COMPILE([],
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
36 [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
37 choke me
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
38 #endif
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
39 ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
40 ])
7987ee447833 Added generated files for release
lost@l-w.ca
parents:
diff changeset
41 ])