annotate lib/stdlib.in.h @ 265:68fbca173508 2.6

Added generated files for release
author lost
date Tue, 22 Dec 2009 05:31:23 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
68fbca173508 Added generated files for release
lost
parents:
diff changeset
1 /* A GNU-like <stdlib.h>.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
2
68fbca173508 Added generated files for release
lost
parents:
diff changeset
3 Copyright (C) 1995, 2001-2004, 2006-2009 Free Software Foundation, Inc.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
4
68fbca173508 Added generated files for release
lost
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify
68fbca173508 Added generated files for release
lost
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
68fbca173508 Added generated files for release
lost
parents:
diff changeset
7 the Free Software Foundation; either version 3 of the License, or
68fbca173508 Added generated files for release
lost
parents:
diff changeset
8 (at your option) any later version.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
9
68fbca173508 Added generated files for release
lost
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
68fbca173508 Added generated files for release
lost
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68fbca173508 Added generated files for release
lost
parents:
diff changeset
13 GNU General Public License for more details.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
14
68fbca173508 Added generated files for release
lost
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
68fbca173508 Added generated files for release
lost
parents:
diff changeset
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
17
68fbca173508 Added generated files for release
lost
parents:
diff changeset
18 #if __GNUC__ >= 3
68fbca173508 Added generated files for release
lost
parents:
diff changeset
19 @PRAGMA_SYSTEM_HEADER@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
20 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
21
68fbca173508 Added generated files for release
lost
parents:
diff changeset
22 #if defined __need_malloc_and_calloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
23 /* Special invocation convention inside glibc header files. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
24
68fbca173508 Added generated files for release
lost
parents:
diff changeset
25 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
26
68fbca173508 Added generated files for release
lost
parents:
diff changeset
27 #else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
28 /* Normal invocation convention. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
29
68fbca173508 Added generated files for release
lost
parents:
diff changeset
30 #ifndef _GL_STDLIB_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
31
68fbca173508 Added generated files for release
lost
parents:
diff changeset
32 /* The include_next requires a split double-inclusion guard. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
33 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
34
68fbca173508 Added generated files for release
lost
parents:
diff changeset
35 #ifndef _GL_STDLIB_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
36 #define _GL_STDLIB_H
68fbca173508 Added generated files for release
lost
parents:
diff changeset
37
68fbca173508 Added generated files for release
lost
parents:
diff changeset
38
68fbca173508 Added generated files for release
lost
parents:
diff changeset
39 /* Solaris declares getloadavg() in <sys/loadavg.h>. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
40 #if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
41 # include <sys/loadavg.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
42 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
43
68fbca173508 Added generated files for release
lost
parents:
diff changeset
44 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
68fbca173508 Added generated files for release
lost
parents:
diff changeset
45 from <stdlib.h> if _REENTRANT is defined. Include it always. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
46 #if @HAVE_RANDOM_H@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
47 # include <random.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
48 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
49
68fbca173508 Added generated files for release
lost
parents:
diff changeset
50 #if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
51 # include <stdint.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
52 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
53
68fbca173508 Added generated files for release
lost
parents:
diff changeset
54 #if !@HAVE_STRUCT_RANDOM_DATA@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
55 struct random_data
68fbca173508 Added generated files for release
lost
parents:
diff changeset
56 {
68fbca173508 Added generated files for release
lost
parents:
diff changeset
57 int32_t *fptr; /* Front pointer. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
58 int32_t *rptr; /* Rear pointer. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
59 int32_t *state; /* Array of state values. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
60 int rand_type; /* Type of random number generator. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
61 int rand_deg; /* Degree of random number generator. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
62 int rand_sep; /* Distance between front and rear. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
63 int32_t *end_ptr; /* Pointer behind state table. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
64 };
68fbca173508 Added generated files for release
lost
parents:
diff changeset
65 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
66
68fbca173508 Added generated files for release
lost
parents:
diff changeset
67 /* The definition of GL_LINK_WARNING is copied here. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
68
68fbca173508 Added generated files for release
lost
parents:
diff changeset
69
68fbca173508 Added generated files for release
lost
parents:
diff changeset
70 /* Some systems do not define EXIT_*, despite otherwise supporting C89. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
71 #ifndef EXIT_SUCCESS
68fbca173508 Added generated files for release
lost
parents:
diff changeset
72 # define EXIT_SUCCESS 0
68fbca173508 Added generated files for release
lost
parents:
diff changeset
73 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
74 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
68fbca173508 Added generated files for release
lost
parents:
diff changeset
75 with proper operation of xargs. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
76 #ifndef EXIT_FAILURE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
77 # define EXIT_FAILURE 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
78 #elif EXIT_FAILURE != 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
79 # undef EXIT_FAILURE
68fbca173508 Added generated files for release
lost
parents:
diff changeset
80 # define EXIT_FAILURE 1
68fbca173508 Added generated files for release
lost
parents:
diff changeset
81 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
82
68fbca173508 Added generated files for release
lost
parents:
diff changeset
83
68fbca173508 Added generated files for release
lost
parents:
diff changeset
84 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
85 extern "C" {
68fbca173508 Added generated files for release
lost
parents:
diff changeset
86 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
87
68fbca173508 Added generated files for release
lost
parents:
diff changeset
88
68fbca173508 Added generated files for release
lost
parents:
diff changeset
89 #if @GNULIB_MALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
90 # if !@HAVE_MALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
91 # undef malloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
92 # define malloc rpl_malloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
93 extern void * malloc (size_t size);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
94 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
95 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
96 # undef malloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
97 # define malloc(s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
98 (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
99 "use gnulib module malloc-posix for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
100 malloc (s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
101 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
102
68fbca173508 Added generated files for release
lost
parents:
diff changeset
103
68fbca173508 Added generated files for release
lost
parents:
diff changeset
104 #if @GNULIB_REALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
105 # if !@HAVE_REALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
106 # undef realloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
107 # define realloc rpl_realloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
108 extern void * realloc (void *ptr, size_t size);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
109 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
110 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
111 # undef realloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
112 # define realloc(p,s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
113 (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
114 "use gnulib module realloc-posix for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
115 realloc (p, s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
116 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
117
68fbca173508 Added generated files for release
lost
parents:
diff changeset
118
68fbca173508 Added generated files for release
lost
parents:
diff changeset
119 #if @GNULIB_CALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
120 # if !@HAVE_CALLOC_POSIX@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
121 # undef calloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
122 # define calloc rpl_calloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
123 extern void * calloc (size_t nmemb, size_t size);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
124 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
125 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
126 # undef calloc
68fbca173508 Added generated files for release
lost
parents:
diff changeset
127 # define calloc(n,s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
128 (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
129 "use gnulib module calloc-posix for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
130 calloc (n, s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
131 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
132
68fbca173508 Added generated files for release
lost
parents:
diff changeset
133
68fbca173508 Added generated files for release
lost
parents:
diff changeset
134 #if @GNULIB_ATOLL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
135 # if !@HAVE_ATOLL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
136 /* Parse a signed decimal integer.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
137 Returns the value of the integer. Errors are not detected. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
138 extern long long atoll (const char *string);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
139 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
140 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
141 # undef atoll
68fbca173508 Added generated files for release
lost
parents:
diff changeset
142 # define atoll(s) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
143 (GL_LINK_WARNING ("atoll is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
144 "use gnulib module atoll for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
145 atoll (s))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
146 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
147
68fbca173508 Added generated files for release
lost
parents:
diff changeset
148
68fbca173508 Added generated files for release
lost
parents:
diff changeset
149 #if @GNULIB_GETLOADAVG@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
150 # if !@HAVE_DECL_GETLOADAVG@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
151 /* Store max(NELEM,3) load average numbers in LOADAVG[].
68fbca173508 Added generated files for release
lost
parents:
diff changeset
152 The three numbers are the load average of the last 1 minute, the last 5
68fbca173508 Added generated files for release
lost
parents:
diff changeset
153 minutes, and the last 15 minutes, respectively.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
154 LOADAVG is an array of NELEM numbers. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
155 extern int getloadavg (double loadavg[], int nelem);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
156 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
157 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
158 # undef getloadavg
68fbca173508 Added generated files for release
lost
parents:
diff changeset
159 # define getloadavg(l,n) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
160 (GL_LINK_WARNING ("getloadavg is not portable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
161 "use gnulib module getloadavg for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
162 getloadavg (l, n))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
163 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
164
68fbca173508 Added generated files for release
lost
parents:
diff changeset
165
68fbca173508 Added generated files for release
lost
parents:
diff changeset
166 #if @GNULIB_GETSUBOPT@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
167 /* Assuming *OPTIONP is a comma separated list of elements of the form
68fbca173508 Added generated files for release
lost
parents:
diff changeset
168 "token" or "token=value", getsubopt parses the first of these elements.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
169 If the first element refers to a "token" that is member of the given
68fbca173508 Added generated files for release
lost
parents:
diff changeset
170 NULL-terminated array of tokens:
68fbca173508 Added generated files for release
lost
parents:
diff changeset
171 - It replaces the comma with a NUL byte, updates *OPTIONP to point past
68fbca173508 Added generated files for release
lost
parents:
diff changeset
172 the first option and the comma, sets *VALUEP to the value of the
68fbca173508 Added generated files for release
lost
parents:
diff changeset
173 element (or NULL if it doesn't contain an "=" sign),
68fbca173508 Added generated files for release
lost
parents:
diff changeset
174 - It returns the index of the "token" in the given array of tokens.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
175 Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
176 For more details see the POSIX:2001 specification.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
177 http://www.opengroup.org/susv3xsh/getsubopt.html */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
178 # if !@HAVE_GETSUBOPT@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
179 extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
180 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
181 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
182 # undef getsubopt
68fbca173508 Added generated files for release
lost
parents:
diff changeset
183 # define getsubopt(o,t,v) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
184 (GL_LINK_WARNING ("getsubopt is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
185 "use gnulib module getsubopt for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
186 getsubopt (o, t, v))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
187 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
188
68fbca173508 Added generated files for release
lost
parents:
diff changeset
189
68fbca173508 Added generated files for release
lost
parents:
diff changeset
190 #if @GNULIB_MKDTEMP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
191 # if !@HAVE_MKDTEMP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
192 /* Create a unique temporary directory from TEMPLATE.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
193 The last six characters of TEMPLATE must be "XXXXXX";
68fbca173508 Added generated files for release
lost
parents:
diff changeset
194 they are replaced with a string that makes the directory name unique.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
195 Returns TEMPLATE, or a null pointer if it cannot get a unique name.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
196 The directory is created mode 700. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
197 extern char * mkdtemp (char * /*template*/);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
198 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
199 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
200 # undef mkdtemp
68fbca173508 Added generated files for release
lost
parents:
diff changeset
201 # define mkdtemp(t) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
202 (GL_LINK_WARNING ("mkdtemp is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
203 "use gnulib module mkdtemp for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
204 mkdtemp (t))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
205 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
206
68fbca173508 Added generated files for release
lost
parents:
diff changeset
207
68fbca173508 Added generated files for release
lost
parents:
diff changeset
208 #if @GNULIB_MKSTEMP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
209 # if @REPLACE_MKSTEMP@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
210 /* Create a unique temporary file from TEMPLATE.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
211 The last six characters of TEMPLATE must be "XXXXXX";
68fbca173508 Added generated files for release
lost
parents:
diff changeset
212 they are replaced with a string that makes the file name unique.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
213 The file is then created, ensuring it didn't exist before.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
214 The file is created read-write (mask at least 0600 & ~umask), but it may be
68fbca173508 Added generated files for release
lost
parents:
diff changeset
215 world-readable and world-writable (mask 0666 & ~umask), depending on the
68fbca173508 Added generated files for release
lost
parents:
diff changeset
216 implementation.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
217 Returns the open file descriptor if successful, otherwise -1 and errno
68fbca173508 Added generated files for release
lost
parents:
diff changeset
218 set. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
219 # define mkstemp rpl_mkstemp
68fbca173508 Added generated files for release
lost
parents:
diff changeset
220 extern int mkstemp (char * /*template*/);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
221 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
222 /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
223 # include <unistd.h>
68fbca173508 Added generated files for release
lost
parents:
diff changeset
224 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
225 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
226 # undef mkstemp
68fbca173508 Added generated files for release
lost
parents:
diff changeset
227 # define mkstemp(t) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
228 (GL_LINK_WARNING ("mkstemp is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
229 "use gnulib module mkstemp for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
230 mkstemp (t))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
231 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
232
68fbca173508 Added generated files for release
lost
parents:
diff changeset
233
68fbca173508 Added generated files for release
lost
parents:
diff changeset
234 #if @GNULIB_PUTENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
235 # if @REPLACE_PUTENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
236 # undef putenv
68fbca173508 Added generated files for release
lost
parents:
diff changeset
237 # define putenv rpl_putenv
68fbca173508 Added generated files for release
lost
parents:
diff changeset
238 extern int putenv (char *string);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
239 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
240 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
241
68fbca173508 Added generated files for release
lost
parents:
diff changeset
242
68fbca173508 Added generated files for release
lost
parents:
diff changeset
243 #if @GNULIB_RANDOM_R@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
244 # if !@HAVE_RANDOM_R@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
245
68fbca173508 Added generated files for release
lost
parents:
diff changeset
246 # ifndef RAND_MAX
68fbca173508 Added generated files for release
lost
parents:
diff changeset
247 # define RAND_MAX 2147483647
68fbca173508 Added generated files for release
lost
parents:
diff changeset
248 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
249
68fbca173508 Added generated files for release
lost
parents:
diff changeset
250 int srandom_r (unsigned int seed, struct random_data *rand_state);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
251 int initstate_r (unsigned int seed, char *buf, size_t buf_size,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
252 struct random_data *rand_state);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
253 int setstate_r (char *arg_state, struct random_data *rand_state);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
254 int random_r (struct random_data *buf, int32_t *result);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
255 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
256 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
257 # undef random_r
68fbca173508 Added generated files for release
lost
parents:
diff changeset
258 # define random_r(b,r) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
259 (GL_LINK_WARNING ("random_r is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
260 "use gnulib module random_r for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
261 random_r (b,r))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
262 # undef initstate_r
68fbca173508 Added generated files for release
lost
parents:
diff changeset
263 # define initstate_r(s,b,sz,r) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
264 (GL_LINK_WARNING ("initstate_r is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
265 "use gnulib module random_r for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
266 initstate_r (s,b,sz,r))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
267 # undef srandom_r
68fbca173508 Added generated files for release
lost
parents:
diff changeset
268 # define srandom_r(s,r) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
269 (GL_LINK_WARNING ("srandom_r is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
270 "use gnulib module random_r for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
271 srandom_r (s,r))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
272 # undef setstate_r
68fbca173508 Added generated files for release
lost
parents:
diff changeset
273 # define setstate_r(a,r) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
274 (GL_LINK_WARNING ("setstate_r is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
275 "use gnulib module random_r for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
276 setstate_r (a,r))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
277 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
278
68fbca173508 Added generated files for release
lost
parents:
diff changeset
279
68fbca173508 Added generated files for release
lost
parents:
diff changeset
280 #if @GNULIB_RPMATCH@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
281 # if !@HAVE_RPMATCH@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
282 /* Test a user response to a question.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
283 Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
284 extern int rpmatch (const char *response);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
285 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
286 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
287 # undef rpmatch
68fbca173508 Added generated files for release
lost
parents:
diff changeset
288 # define rpmatch(r) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
289 (GL_LINK_WARNING ("rpmatch is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
290 "use gnulib module rpmatch for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
291 rpmatch (r))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
292 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
293
68fbca173508 Added generated files for release
lost
parents:
diff changeset
294
68fbca173508 Added generated files for release
lost
parents:
diff changeset
295 #if @GNULIB_SETENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
296 # if !@HAVE_SETENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
297 /* Set NAME to VALUE in the environment.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
298 If REPLACE is nonzero, overwrite an existing value. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
299 extern int setenv (const char *name, const char *value, int replace);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
300 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
301 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
302
68fbca173508 Added generated files for release
lost
parents:
diff changeset
303
68fbca173508 Added generated files for release
lost
parents:
diff changeset
304 #if @GNULIB_UNSETENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
305 # if @HAVE_UNSETENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
306 # if @VOID_UNSETENV@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
307 /* On some systems, unsetenv() returns void.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
308 This is the case for MacOS X 10.3, FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
309 # define unsetenv(name) ((unsetenv)(name), 0)
68fbca173508 Added generated files for release
lost
parents:
diff changeset
310 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
311 # else
68fbca173508 Added generated files for release
lost
parents:
diff changeset
312 /* Remove the variable NAME from the environment. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
313 extern int unsetenv (const char *name);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
314 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
315 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
316
68fbca173508 Added generated files for release
lost
parents:
diff changeset
317
68fbca173508 Added generated files for release
lost
parents:
diff changeset
318 #if @GNULIB_STRTOD@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
319 # if @REPLACE_STRTOD@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
320 # define strtod rpl_strtod
68fbca173508 Added generated files for release
lost
parents:
diff changeset
321 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
322 # if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
323 /* Parse a double from STRING, updating ENDP if appropriate. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
324 extern double strtod (const char *str, char **endp);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
325 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
326 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
327 # undef strtod
68fbca173508 Added generated files for release
lost
parents:
diff changeset
328 # define strtod(s, e) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
329 (GL_LINK_WARNING ("strtod is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
330 "use gnulib module strtod for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
331 strtod (s, e))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
332 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
333
68fbca173508 Added generated files for release
lost
parents:
diff changeset
334
68fbca173508 Added generated files for release
lost
parents:
diff changeset
335 #if @GNULIB_STRTOLL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
336 # if !@HAVE_STRTOLL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
337 /* Parse a signed integer whose textual representation starts at STRING.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
338 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
339 it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
68fbca173508 Added generated files for release
lost
parents:
diff changeset
340 "0x").
68fbca173508 Added generated files for release
lost
parents:
diff changeset
341 If ENDPTR is not NULL, the address of the first byte after the integer is
68fbca173508 Added generated files for release
lost
parents:
diff changeset
342 stored in *ENDPTR.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
343 Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
68fbca173508 Added generated files for release
lost
parents:
diff changeset
344 to ERANGE. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
345 extern long long strtoll (const char *string, char **endptr, int base);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
346 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
347 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
348 # undef strtoll
68fbca173508 Added generated files for release
lost
parents:
diff changeset
349 # define strtoll(s,e,b) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
350 (GL_LINK_WARNING ("strtoll is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
351 "use gnulib module strtoll for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
352 strtoll (s, e, b))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
353 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
354
68fbca173508 Added generated files for release
lost
parents:
diff changeset
355
68fbca173508 Added generated files for release
lost
parents:
diff changeset
356 #if @GNULIB_STRTOULL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
357 # if !@HAVE_STRTOULL@
68fbca173508 Added generated files for release
lost
parents:
diff changeset
358 /* Parse an unsigned integer whose textual representation starts at STRING.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
359 The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
68fbca173508 Added generated files for release
lost
parents:
diff changeset
360 it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
68fbca173508 Added generated files for release
lost
parents:
diff changeset
361 "0x").
68fbca173508 Added generated files for release
lost
parents:
diff changeset
362 If ENDPTR is not NULL, the address of the first byte after the integer is
68fbca173508 Added generated files for release
lost
parents:
diff changeset
363 stored in *ENDPTR.
68fbca173508 Added generated files for release
lost
parents:
diff changeset
364 Upon overflow, the return value is ULLONG_MAX, and errno is set to
68fbca173508 Added generated files for release
lost
parents:
diff changeset
365 ERANGE. */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
366 extern unsigned long long strtoull (const char *string, char **endptr, int base);
68fbca173508 Added generated files for release
lost
parents:
diff changeset
367 # endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
368 #elif defined GNULIB_POSIXCHECK
68fbca173508 Added generated files for release
lost
parents:
diff changeset
369 # undef strtoull
68fbca173508 Added generated files for release
lost
parents:
diff changeset
370 # define strtoull(s,e,b) \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
371 (GL_LINK_WARNING ("strtoull is unportable - " \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
372 "use gnulib module strtoull for portability"), \
68fbca173508 Added generated files for release
lost
parents:
diff changeset
373 strtoull (s, e, b))
68fbca173508 Added generated files for release
lost
parents:
diff changeset
374 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
375
68fbca173508 Added generated files for release
lost
parents:
diff changeset
376
68fbca173508 Added generated files for release
lost
parents:
diff changeset
377 #ifdef __cplusplus
68fbca173508 Added generated files for release
lost
parents:
diff changeset
378 }
68fbca173508 Added generated files for release
lost
parents:
diff changeset
379 #endif
68fbca173508 Added generated files for release
lost
parents:
diff changeset
380
68fbca173508 Added generated files for release
lost
parents:
diff changeset
381 #endif /* _GL_STDLIB_H */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
382 #endif /* _GL_STDLIB_H */
68fbca173508 Added generated files for release
lost
parents:
diff changeset
383 #endif