summaryrefslogtreecommitdiffstats
path: root/gl/m4/stdlib_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/stdlib_h.m4')
-rw-r--r--gl/m4/stdlib_h.m455
1 files changed, 46 insertions, 9 deletions
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index b295f16..dd84796 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
1# stdlib_h.m4 serial 15 1# stdlib_h.m4 serial 28
2dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. 2dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -22,41 +22,75 @@ AC_DEFUN([gl_STDLIB_H],
22 # include <random.h> 22 # include <random.h>
23 #endif 23 #endif
24 ]]) 24 ]])
25
26 dnl Check for declarations of anything we want to poison if the
27 dnl corresponding gnulib module is not in use, and which is not
28 dnl guaranteed by C89.
29 gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
30#if HAVE_SYS_LOADAVG_H
31# include <sys/loadavg.h>
32#endif
33#if HAVE_RANDOM_H
34# include <random.h>
35#endif
36 ]], [atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
37 mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
38 setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
39 unsetenv])
25]) 40])
26 41
27AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], 42AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
28[ 43[
29 dnl Use AC_REQUIRE here, so that the default settings are expanded once only. 44 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
30 AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) 45 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
31 GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 46 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
47 dnl Define it also as a C macro, for the benefit of the unit tests.
48 gl_MODULE_INDICATOR_FOR_TESTS([$1])
32]) 49])
33 50
34AC_DEFUN([gl_STDLIB_H_DEFAULTS], 51AC_DEFUN([gl_STDLIB_H_DEFAULTS],
35[ 52[
36 GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
37 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
38 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
39 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) 53 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
54 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
55 GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
40 GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) 56 GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
41 GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) 57 GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
58 GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT])
59 GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
42 GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) 60 GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
61 GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
62 GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
43 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) 63 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
64 GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
65 GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
44 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) 66 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
45 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) 67 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
68 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
69 GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
46 GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) 70 GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
47 GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) 71 GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
48 GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) 72 GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
49 GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) 73 GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
50 GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) 74 GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
75 GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
51 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) 76 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
52 dnl Assume proper GNU behavior unless another module says otherwise. 77 dnl Assume proper GNU behavior unless another module says otherwise.
53 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) 78 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
54 HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX]) 79 HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
80 HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
81 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
55 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) 82 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
83 HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
56 HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX]) 84 HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
57 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) 85 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
58 HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX]) 86 HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
87 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
88 HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP])
89 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
90 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
59 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) 91 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
92 HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
93 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
60 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) 94 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
61 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) 95 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
62 HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) 96 HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
@@ -64,10 +98,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
64 HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) 98 HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
65 HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) 99 HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
66 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) 100 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
101 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
67 HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV]) 102 HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
68 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) 103 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
69 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) 104 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
70 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) 105 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
106 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
107 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
71 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) 108 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
72 VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) 109 REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
73]) 110])