1 # stdlib_h.m4 serial 37
2 dnl Copyright (C) 2007-2011 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.
7 AC_DEFUN([gl_STDLIB_H],
9 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
10 gl_NEXT_HEADERS([stdlib.h])
12 dnl Check for declarations of anything we want to poison if the
13 dnl corresponding gnulib module is not in use, and which is not
14 dnl guaranteed by C89.
15 gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
16 #if HAVE_SYS_LOADAVG_H
17 # include <sys/loadavg.h>
22 ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp
23 mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r
24 setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt
28 AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
30 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
31 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
32 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
33 dnl Define it also as a C macro, for the benefit of the unit tests.
34 gl_MODULE_INDICATOR_FOR_TESTS([$1])
37 AC_DEFUN([gl_STDLIB_H_DEFAULTS],
39 GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT])
40 GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
41 GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
42 GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
43 GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
44 GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
45 GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT])
46 GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
47 GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC])
48 GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
49 GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
50 GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
51 GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
52 GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
53 GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME])
54 GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
55 GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
56 GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
57 GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
58 GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
59 GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
60 GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
61 GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
62 GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
63 GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX])
64 GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT])
65 GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
66 GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB])
67 dnl Assume proper GNU behavior unless another module says otherwise.
68 HAVE__EXIT=1; AC_SUBST([HAVE__EXIT])
69 HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
70 HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
71 HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
72 HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
73 HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
74 HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
75 HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
76 HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
77 HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP])
78 HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
79 HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
80 HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
81 HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
82 HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
83 HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
84 HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
85 HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
86 HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
87 HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
88 HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
89 HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
90 HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
91 HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
92 HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
93 REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC])
94 REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
95 REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC])
96 REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
97 REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
98 REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
99 REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC])
100 REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
101 REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
102 REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
103 REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
104 REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])