annotate m4/malloc.m4 @ 267:bec6d2480f08 2.6

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