dhcpd-pools  3.0
ISC dhcpd lease usage analyser
stdlib.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A GNU-like <stdlib.h>.
3 
4  Copyright (C) 1995, 2001-2004, 2006-2017 Free Software Foundation, Inc.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 
19 #if __GNUC__ >= 3
20 #pragma GCC system_header
21 #endif
22 
23 
24 #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
25 /* Special invocation conventions inside some gnulib header files,
26  and inside some glibc header files, respectively. */
27 
28 #include_next <stdlib.h>
29 
30 #else
31 /* Normal invocation convention. */
32 
33 #ifndef _GL_STDLIB_H
34 
35 /* The include_next requires a split double-inclusion guard. */
36 #include_next <stdlib.h>
37 
38 #ifndef _GL_STDLIB_H
39 #define _GL_STDLIB_H
40 
41 /* NetBSD 5.0 mis-defines NULL. */
42 #include <stddef.h>
43 
44 /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>. */
45 #if 0 && !defined WEXITSTATUS
46 # include <sys/wait.h>
47 #endif
48 
49 /* Solaris declares getloadavg() in <sys/loadavg.h>. */
50 #if (0 || defined GNULIB_POSIXCHECK) && 0
51 # include <sys/loadavg.h>
52 #endif
53 
54 /* Native Windows platforms declare mktemp() in <io.h>. */
55 #if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
56 # include <io.h>
57 #endif
58 
59 #if 0
60 
61 /* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
62  from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
63  'struct random_data'. */
64 # if 1
65 # include <random.h>
66 # endif
67 
68 # if !1 || 0 || !1
69 # include <stdint.h>
70 # endif
71 
72 # if !1
73 /* Define 'struct random_data'.
74  But allow multiple gnulib generated <stdlib.h> replacements to coexist. */
75 # if !GNULIB_defined_struct_random_data
76 struct random_data
77 {
78  int32_t *fptr; /* Front pointer. */
79  int32_t *rptr; /* Rear pointer. */
80  int32_t *state; /* Array of state values. */
81  int rand_type; /* Type of random number generator. */
82  int rand_deg; /* Degree of random number generator. */
83  int rand_sep; /* Distance between front and rear. */
84  int32_t *end_ptr; /* Pointer behind state table. */
85 };
86 # define GNULIB_defined_struct_random_data 1
87 # endif
88 # endif
89 #endif
90 
91 #if (0 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
92 /* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
93 /* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
94 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
95 /* But avoid namespace pollution on glibc systems and native Windows. */
96 # include <unistd.h>
97 #endif
98 
99 /* The __attribute__ feature is available in gcc versions 2.5 and later.
100  The attribute __pure__ was added in gcc 2.96. */
101 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
102 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
103 #else
104 # define _GL_ATTRIBUTE_PURE /* empty */
105 #endif
106 
107 /* The definition of _Noreturn is copied here. */
108 #if !defined _Noreturn && __STDC_VERSION__ < 201112
109 # if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
110  || 0x5110 <= __SUNPRO_C)
111 # define _Noreturn __attribute__ ((__noreturn__))
112 # elif 1200 <= _MSC_VER
113 # define _Noreturn __declspec (noreturn)
114 # else
115 # define _Noreturn
116 # endif
117 #endif
118 
119 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
120 /* C++ compatible function declaration macros.
121  Copyright (C) 2010-2017 Free Software Foundation, Inc.
122 
123  This program is free software: you can redistribute it and/or modify it
124  under the terms of the GNU General Public License as published
125  by the Free Software Foundation; either version 3 of the License, or
126  (at your option) any later version.
127 
128  This program is distributed in the hope that it will be useful,
129  but WITHOUT ANY WARRANTY; without even the implied warranty of
130  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
131  General Public License for more details.
132 
133  You should have received a copy of the GNU General Public License
134  along with this program. If not, see <https://www.gnu.org/licenses/>. */
135 
136 #ifndef _GL_CXXDEFS_H
137 #define _GL_CXXDEFS_H
138 
139 /* Begin/end the GNULIB_NAMESPACE namespace. */
140 #if defined __cplusplus && defined GNULIB_NAMESPACE
141 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
142 # define _GL_END_NAMESPACE }
143 #else
144 # define _GL_BEGIN_NAMESPACE
145 # define _GL_END_NAMESPACE
146 #endif
147 
148 /* The three most frequent use cases of these macros are:
149 
150  * For providing a substitute for a function that is missing on some
151  platforms, but is declared and works fine on the platforms on which
152  it exists:
153 
154  #if @GNULIB_FOO@
155  # if !@HAVE_FOO@
156  _GL_FUNCDECL_SYS (foo, ...);
157  # endif
158  _GL_CXXALIAS_SYS (foo, ...);
159  _GL_CXXALIASWARN (foo);
160  #elif defined GNULIB_POSIXCHECK
161  ...
162  #endif
163 
164  * For providing a replacement for a function that exists on all platforms,
165  but is broken/insufficient and needs to be replaced on some platforms:
166 
167  #if @GNULIB_FOO@
168  # if @REPLACE_FOO@
169  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
170  # undef foo
171  # define foo rpl_foo
172  # endif
173  _GL_FUNCDECL_RPL (foo, ...);
174  _GL_CXXALIAS_RPL (foo, ...);
175  # else
176  _GL_CXXALIAS_SYS (foo, ...);
177  # endif
178  _GL_CXXALIASWARN (foo);
179  #elif defined GNULIB_POSIXCHECK
180  ...
181  #endif
182 
183  * For providing a replacement for a function that exists on some platforms
184  but is broken/insufficient and needs to be replaced on some of them and
185  is additionally either missing or undeclared on some other platforms:
186 
187  #if @GNULIB_FOO@
188  # if @REPLACE_FOO@
189  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
190  # undef foo
191  # define foo rpl_foo
192  # endif
193  _GL_FUNCDECL_RPL (foo, ...);
194  _GL_CXXALIAS_RPL (foo, ...);
195  # else
196  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
197  _GL_FUNCDECL_SYS (foo, ...);
198  # endif
199  _GL_CXXALIAS_SYS (foo, ...);
200  # endif
201  _GL_CXXALIASWARN (foo);
202  #elif defined GNULIB_POSIXCHECK
203  ...
204  #endif
205 */
206 
207 /* _GL_EXTERN_C declaration;
208  performs the declaration with C linkage. */
209 #if defined __cplusplus
210 # define _GL_EXTERN_C extern "C"
211 #else
212 # define _GL_EXTERN_C extern
213 #endif
214 
215 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
216  declares a replacement function, named rpl_func, with the given prototype,
217  consisting of return type, parameters, and attributes.
218  Example:
219  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
220  _GL_ARG_NONNULL ((1)));
221  */
222 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
223  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
224 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
225  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
226 
227 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
228  declares the system function, named func, with the given prototype,
229  consisting of return type, parameters, and attributes.
230  Example:
231  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
232  _GL_ARG_NONNULL ((1)));
233  */
234 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
235  _GL_EXTERN_C rettype func parameters_and_attributes
236 
237 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
238  declares a C++ alias called GNULIB_NAMESPACE::func
239  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
240  Example:
241  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
242 
243  Wrapping rpl_func in an object with an inline conversion operator
244  avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
245  actually used in the program. */
246 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
247  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
248 #if defined __cplusplus && defined GNULIB_NAMESPACE
249 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
250  namespace GNULIB_NAMESPACE \
251  { \
252  static const struct _gl_ ## func ## _wrapper \
253  { \
254  typedef rettype (*type) parameters; \
255  \
256  inline operator type () const \
257  { \
258  return ::rpl_func; \
259  } \
260  } func = {}; \
261  } \
262  _GL_EXTERN_C int _gl_cxxalias_dummy
263 #else
264 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
265  _GL_EXTERN_C int _gl_cxxalias_dummy
266 #endif
267 
268 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
269  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
270  except that the C function rpl_func may have a slightly different
271  declaration. A cast is used to silence the "invalid conversion" error
272  that would otherwise occur. */
273 #if defined __cplusplus && defined GNULIB_NAMESPACE
274 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
275  namespace GNULIB_NAMESPACE \
276  { \
277  static const struct _gl_ ## func ## _wrapper \
278  { \
279  typedef rettype (*type) parameters; \
280  \
281  inline operator type () const \
282  { \
283  return reinterpret_cast<type>(::rpl_func); \
284  } \
285  } func = {}; \
286  } \
287  _GL_EXTERN_C int _gl_cxxalias_dummy
288 #else
289 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
290  _GL_EXTERN_C int _gl_cxxalias_dummy
291 #endif
292 
293 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
294  declares a C++ alias called GNULIB_NAMESPACE::func
295  that redirects to the system provided function func, if GNULIB_NAMESPACE
296  is defined.
297  Example:
298  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
299 
300  Wrapping func in an object with an inline conversion operator
301  avoids a reference to func unless GNULIB_NAMESPACE::func is
302  actually used in the program. */
303 #if defined __cplusplus && defined GNULIB_NAMESPACE
304 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
305  namespace GNULIB_NAMESPACE \
306  { \
307  static const struct _gl_ ## func ## _wrapper \
308  { \
309  typedef rettype (*type) parameters; \
310  \
311  inline operator type () const \
312  { \
313  return ::func; \
314  } \
315  } func = {}; \
316  } \
317  _GL_EXTERN_C int _gl_cxxalias_dummy
318 #else
319 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
320  _GL_EXTERN_C int _gl_cxxalias_dummy
321 #endif
322 
323 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
324  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
325  except that the C function func may have a slightly different declaration.
326  A cast is used to silence the "invalid conversion" error that would
327  otherwise occur. */
328 #if defined __cplusplus && defined GNULIB_NAMESPACE
329 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
330  namespace GNULIB_NAMESPACE \
331  { \
332  static const struct _gl_ ## func ## _wrapper \
333  { \
334  typedef rettype (*type) parameters; \
335  \
336  inline operator type () const \
337  { \
338  return reinterpret_cast<type>(::func); \
339  } \
340  } func = {}; \
341  } \
342  _GL_EXTERN_C int _gl_cxxalias_dummy
343 #else
344 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
345  _GL_EXTERN_C int _gl_cxxalias_dummy
346 #endif
347 
348 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
349  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
350  except that the C function is picked among a set of overloaded functions,
351  namely the one with rettype2 and parameters2. Two consecutive casts
352  are used to silence the "cannot find a match" and "invalid conversion"
353  errors that would otherwise occur. */
354 #if defined __cplusplus && defined GNULIB_NAMESPACE
355  /* The outer cast must be a reinterpret_cast.
356  The inner cast: When the function is defined as a set of overloaded
357  functions, it works as a static_cast<>, choosing the designated variant.
358  When the function is defined as a single variant, it works as a
359  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
360 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
361  namespace GNULIB_NAMESPACE \
362  { \
363  static const struct _gl_ ## func ## _wrapper \
364  { \
365  typedef rettype (*type) parameters; \
366  \
367  inline operator type () const \
368  { \
369  return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
370  } \
371  } func = {}; \
372  } \
373  _GL_EXTERN_C int _gl_cxxalias_dummy
374 #else
375 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
376  _GL_EXTERN_C int _gl_cxxalias_dummy
377 #endif
378 
379 /* _GL_CXXALIASWARN (func);
380  causes a warning to be emitted when ::func is used but not when
381  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
382  variants. */
383 #if defined __cplusplus && defined GNULIB_NAMESPACE
384 # define _GL_CXXALIASWARN(func) \
385  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
386 # define _GL_CXXALIASWARN_1(func,namespace) \
387  _GL_CXXALIASWARN_2 (func, namespace)
388 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
389  we enable the warning only when not optimizing. */
390 # if !__OPTIMIZE__
391 # define _GL_CXXALIASWARN_2(func,namespace) \
392  _GL_WARN_ON_USE (func, \
393  "The symbol ::" #func " refers to the system function. " \
394  "Use " #namespace "::" #func " instead.")
395 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
396 # define _GL_CXXALIASWARN_2(func,namespace) \
397  extern __typeof__ (func) func
398 # else
399 # define _GL_CXXALIASWARN_2(func,namespace) \
400  _GL_EXTERN_C int _gl_cxxalias_dummy
401 # endif
402 #else
403 # define _GL_CXXALIASWARN(func) \
404  _GL_EXTERN_C int _gl_cxxalias_dummy
405 #endif
406 
407 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
408  causes a warning to be emitted when the given overloaded variant of ::func
409  is used but not when GNULIB_NAMESPACE::func is used. */
410 #if defined __cplusplus && defined GNULIB_NAMESPACE
411 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
412  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
413  GNULIB_NAMESPACE)
414 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
415  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
416 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
417  we enable the warning only when not optimizing. */
418 # if !__OPTIMIZE__
419 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
420  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
421  "The symbol ::" #func " refers to the system function. " \
422  "Use " #namespace "::" #func " instead.")
423 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
424 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
425  extern __typeof__ (func) func
426 # else
427 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
428  _GL_EXTERN_C int _gl_cxxalias_dummy
429 # endif
430 #else
431 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
432  _GL_EXTERN_C int _gl_cxxalias_dummy
433 #endif
434 
435 #endif /* _GL_CXXDEFS_H */
436 
437 /* The definition of _GL_ARG_NONNULL is copied here. */
438 /* A C macro for declaring that specific arguments must not be NULL.
439  Copyright (C) 2009-2017 Free Software Foundation, Inc.
440 
441  This program is free software: you can redistribute it and/or modify it
442  under the terms of the GNU General Public License as published
443  by the Free Software Foundation; either version 3 of the License, or
444  (at your option) any later version.
445 
446  This program is distributed in the hope that it will be useful,
447  but WITHOUT ANY WARRANTY; without even the implied warranty of
448  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
449  General Public License for more details.
450 
451  You should have received a copy of the GNU General Public License
452  along with this program. If not, see <https://www.gnu.org/licenses/>. */
453 
454 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
455  that the values passed as arguments n, ..., m must be non-NULL pointers.
456  n = 1 stands for the first argument, n = 2 for the second argument etc. */
457 #ifndef _GL_ARG_NONNULL
458 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
459 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
460 # else
461 # define _GL_ARG_NONNULL(params)
462 # endif
463 #endif
464 
465 /* The definition of _GL_WARN_ON_USE is copied here. */
466 /* A C macro for emitting warnings if a function is used.
467  Copyright (C) 2010-2017 Free Software Foundation, Inc.
468 
469  This program is free software: you can redistribute it and/or modify it
470  under the terms of the GNU General Public License as published
471  by the Free Software Foundation; either version 3 of the License, or
472  (at your option) any later version.
473 
474  This program is distributed in the hope that it will be useful,
475  but WITHOUT ANY WARRANTY; without even the implied warranty of
476  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
477  General Public License for more details.
478 
479  You should have received a copy of the GNU General Public License
480  along with this program. If not, see <https://www.gnu.org/licenses/>. */
481 
482 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
483  for FUNCTION which will then trigger a compiler warning containing
484  the text of "literal string" anywhere that function is called, if
485  supported by the compiler. If the compiler does not support this
486  feature, the macro expands to an unused extern declaration.
487 
488  This macro is useful for marking a function as a potential
489  portability trap, with the intent that "literal string" include
490  instructions on the replacement function that should be used
491  instead. However, one of the reasons that a function is a
492  portability trap is if it has the wrong signature. Declaring
493  FUNCTION with a different signature in C is a compilation error, so
494  this macro must use the same type as any existing declaration so
495  that programs that avoid the problematic FUNCTION do not fail to
496  compile merely because they included a header that poisoned the
497  function. But this implies that _GL_WARN_ON_USE is only safe to
498  use if FUNCTION is known to already have a declaration. Use of
499  this macro implies that there must not be any other macro hiding
500  the declaration of FUNCTION; but undefining FUNCTION first is part
501  of the poisoning process anyway (although for symbols that are
502  provided only via a macro, the result is a compilation error rather
503  than a warning containing "literal string"). Also note that in
504  C++, it is only safe to use if FUNCTION has no overloads.
505 
506  For an example, it is possible to poison 'getline' by:
507  - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
508  [getline]) in configure.ac, which potentially defines
509  HAVE_RAW_DECL_GETLINE
510  - adding this code to a header that wraps the system <stdio.h>:
511  #undef getline
512  #if HAVE_RAW_DECL_GETLINE
513  _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
514  "not universally present; use the gnulib module getline");
515  #endif
516 
517  It is not possible to directly poison global variables. But it is
518  possible to write a wrapper accessor function, and poison that
519  (less common usage, like &environ, will cause a compilation error
520  rather than issue the nice warning, but the end result of informing
521  the developer about their portability problem is still achieved):
522  #if HAVE_RAW_DECL_ENVIRON
523  static char ***rpl_environ (void) { return &environ; }
524  _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
525  # undef environ
526  # define environ (*rpl_environ ())
527  #endif
528  */
529 #ifndef _GL_WARN_ON_USE
530 
531 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
532 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
533 # define _GL_WARN_ON_USE(function, message) \
534 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
535 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
536 /* Verify the existence of the function. */
537 # define _GL_WARN_ON_USE(function, message) \
538 extern __typeof__ (function) function
539 # else /* Unsupported. */
540 # define _GL_WARN_ON_USE(function, message) \
541 _GL_WARN_EXTERN_C int _gl_warn_on_use
542 # endif
543 #endif
544 
545 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
546  is like _GL_WARN_ON_USE (function, "string"), except that the function is
547  declared with the given prototype, consisting of return type, parameters,
548  and attributes.
549  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
550  not work in this case. */
551 #ifndef _GL_WARN_ON_USE_CXX
552 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
553 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
554 extern rettype function parameters_and_attributes \
555  __attribute__ ((__warning__ (msg)))
556 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
557 /* Verify the existence of the function. */
558 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
559 extern rettype function parameters_and_attributes
560 # else /* Unsupported. */
561 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
562 _GL_WARN_EXTERN_C int _gl_warn_on_use
563 # endif
564 #endif
565 
566 /* _GL_WARN_EXTERN_C declaration;
567  performs the declaration with C linkage. */
568 #ifndef _GL_WARN_EXTERN_C
569 # if defined __cplusplus
570 # define _GL_WARN_EXTERN_C extern "C"
571 # else
572 # define _GL_WARN_EXTERN_C extern
573 # endif
574 #endif
575 
576 
577 /* Some systems do not define EXIT_*, despite otherwise supporting C89. */
578 #ifndef EXIT_SUCCESS
579 # define EXIT_SUCCESS 0
580 #endif
581 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
582  with proper operation of xargs. */
583 #ifndef EXIT_FAILURE
584 # define EXIT_FAILURE 1
585 #elif EXIT_FAILURE != 1
586 # undef EXIT_FAILURE
587 # define EXIT_FAILURE 1
588 #endif
589 
590 
591 #if 0
592 /* Terminate the current process with the given return code, without running
593  the 'atexit' handlers. */
594 # if !1
595 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
596 # endif
597 _GL_CXXALIAS_SYS (_Exit, void, (int status));
598 _GL_CXXALIASWARN (_Exit);
599 #elif defined GNULIB_POSIXCHECK
600 # undef _Exit
601 # if HAVE_RAW_DECL__EXIT
602 _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
603  "use gnulib module _Exit for portability");
604 # endif
605 #endif
606 
607 
608 #if 0
609 /* Parse a signed decimal integer.
610  Returns the value of the integer. Errors are not detected. */
611 # if !1
612 _GL_FUNCDECL_SYS (atoll, long long, (const char *string)
614  _GL_ARG_NONNULL ((1)));
615 # endif
616 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
617 _GL_CXXALIASWARN (atoll);
618 #elif defined GNULIB_POSIXCHECK
619 # undef atoll
620 # if HAVE_RAW_DECL_ATOLL
621 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
622  "use gnulib module atoll for portability");
623 # endif
624 #endif
625 
626 #if 0
627 # if 0
628 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
629 # undef calloc
630 # define calloc rpl_calloc
631 # endif
632 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
633 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
634 # else
635 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
636 # endif
637 _GL_CXXALIASWARN (calloc);
638 #elif defined GNULIB_POSIXCHECK
639 # undef calloc
640 /* Assume calloc is always declared. */
641 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
642  "use gnulib module calloc-posix for portability");
643 #endif
644 
645 #if 0
646 # if 0
647 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
648 # define canonicalize_file_name rpl_canonicalize_file_name
649 # endif
650 _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
651  _GL_ARG_NONNULL ((1)));
652 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
653 # else
654 # if !1
655 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
656  _GL_ARG_NONNULL ((1)));
657 # endif
658 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
659 # endif
660 _GL_CXXALIASWARN (canonicalize_file_name);
661 #elif defined GNULIB_POSIXCHECK
662 # undef canonicalize_file_name
663 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
664 _GL_WARN_ON_USE (canonicalize_file_name,
665  "canonicalize_file_name is unportable - "
666  "use gnulib module canonicalize-lgpl for portability");
667 # endif
668 #endif
669 
670 #if 0
671 /* Store max(NELEM,3) load average numbers in LOADAVG[].
672  The three numbers are the load average of the last 1 minute, the last 5
673  minutes, and the last 15 minutes, respectively.
674  LOADAVG is an array of NELEM numbers. */
675 # if !1
676 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
677  _GL_ARG_NONNULL ((1)));
678 # endif
679 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
680 _GL_CXXALIASWARN (getloadavg);
681 #elif defined GNULIB_POSIXCHECK
682 # undef getloadavg
683 # if HAVE_RAW_DECL_GETLOADAVG
684 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
685  "use gnulib module getloadavg for portability");
686 # endif
687 #endif
688 
689 #if 0
690 /* Assuming *OPTIONP is a comma separated list of elements of the form
691  "token" or "token=value", getsubopt parses the first of these elements.
692  If the first element refers to a "token" that is member of the given
693  NULL-terminated array of tokens:
694  - It replaces the comma with a NUL byte, updates *OPTIONP to point past
695  the first option and the comma, sets *VALUEP to the value of the
696  element (or NULL if it doesn't contain an "=" sign),
697  - It returns the index of the "token" in the given array of tokens.
698  Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
699  For more details see the POSIX:2001 specification.
700  http://www.opengroup.org/susv3xsh/getsubopt.html */
701 # if !1
702 _GL_FUNCDECL_SYS (getsubopt, int,
703  (char **optionp, char *const *tokens, char **valuep)
704  _GL_ARG_NONNULL ((1, 2, 3)));
705 # endif
706 _GL_CXXALIAS_SYS (getsubopt, int,
707  (char **optionp, char *const *tokens, char **valuep));
708 _GL_CXXALIASWARN (getsubopt);
709 #elif defined GNULIB_POSIXCHECK
710 # undef getsubopt
711 # if HAVE_RAW_DECL_GETSUBOPT
712 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
713  "use gnulib module getsubopt for portability");
714 # endif
715 #endif
716 
717 #if 0
718 /* Change the ownership and access permission of the slave side of the
719  pseudo-terminal whose master side is specified by FD. */
720 # if !1
721 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
722 # endif
723 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
724 _GL_CXXALIASWARN (grantpt);
725 #elif defined GNULIB_POSIXCHECK
726 # undef grantpt
727 # if HAVE_RAW_DECL_GRANTPT
728 _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
729  "use gnulib module grantpt for portability");
730 # endif
731 #endif
732 
733 /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
734  rely on GNU or POSIX semantics for malloc and realloc (for example,
735  by never specifying a zero size), so it does not need malloc or
736  realloc to be redefined. */
737 #if 1
738 # if 0
739 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
740  || _GL_USE_STDLIB_ALLOC)
741 # undef malloc
742 # define malloc rpl_malloc
743 # endif
744 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
745 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
746 # else
747 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
748 # endif
749 _GL_CXXALIASWARN (malloc);
750 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
751 # undef malloc
752 /* Assume malloc is always declared. */
753 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
754  "use gnulib module malloc-posix for portability");
755 #endif
756 
757 /* Convert a multibyte character to a wide character. */
758 #if 0
759 # if 0
760 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
761 # undef mbtowc
762 # define mbtowc rpl_mbtowc
763 # endif
764 _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
765 _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
766 # else
767 _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
768 # endif
769 _GL_CXXALIASWARN (mbtowc);
770 #endif
771 
772 #if 0
773 /* Create a unique temporary directory from TEMPLATE.
774  The last six characters of TEMPLATE must be "XXXXXX";
775  they are replaced with a string that makes the directory name unique.
776  Returns TEMPLATE, or a null pointer if it cannot get a unique name.
777  The directory is created mode 700. */
778 # if !1
779 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
780 # endif
781 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
782 _GL_CXXALIASWARN (mkdtemp);
783 #elif defined GNULIB_POSIXCHECK
784 # undef mkdtemp
785 # if HAVE_RAW_DECL_MKDTEMP
786 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
787  "use gnulib module mkdtemp for portability");
788 # endif
789 #endif
790 
791 #if 0
792 /* Create a unique temporary file from TEMPLATE.
793  The last six characters of TEMPLATE must be "XXXXXX";
794  they are replaced with a string that makes the file name unique.
795  The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
796  and O_TEXT, O_BINARY (defined in "binary-io.h").
797  The file is then created, with the specified flags, ensuring it didn't exist
798  before.
799  The file is created read-write (mask at least 0600 & ~umask), but it may be
800  world-readable and world-writable (mask 0666 & ~umask), depending on the
801  implementation.
802  Returns the open file descriptor if successful, otherwise -1 and errno
803  set. */
804 # if !1
805 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
806  _GL_ARG_NONNULL ((1)));
807 # endif
808 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
809 _GL_CXXALIASWARN (mkostemp);
810 #elif defined GNULIB_POSIXCHECK
811 # undef mkostemp
812 # if HAVE_RAW_DECL_MKOSTEMP
813 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
814  "use gnulib module mkostemp for portability");
815 # endif
816 #endif
817 
818 #if 0
819 /* Create a unique temporary file from TEMPLATE.
820  The last six characters of TEMPLATE before a suffix of length
821  SUFFIXLEN must be "XXXXXX";
822  they are replaced with a string that makes the file name unique.
823  The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
824  and O_TEXT, O_BINARY (defined in "binary-io.h").
825  The file is then created, with the specified flags, ensuring it didn't exist
826  before.
827  The file is created read-write (mask at least 0600 & ~umask), but it may be
828  world-readable and world-writable (mask 0666 & ~umask), depending on the
829  implementation.
830  Returns the open file descriptor if successful, otherwise -1 and errno
831  set. */
832 # if !1
833 _GL_FUNCDECL_SYS (mkostemps, int,
834  (char * /*template*/, int /*suffixlen*/, int /*flags*/)
835  _GL_ARG_NONNULL ((1)));
836 # endif
837 _GL_CXXALIAS_SYS (mkostemps, int,
838  (char * /*template*/, int /*suffixlen*/, int /*flags*/));
839 _GL_CXXALIASWARN (mkostemps);
840 #elif defined GNULIB_POSIXCHECK
841 # undef mkostemps
842 # if HAVE_RAW_DECL_MKOSTEMPS
843 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
844  "use gnulib module mkostemps for portability");
845 # endif
846 #endif
847 
848 #if 0
849 /* Create a unique temporary file from TEMPLATE.
850  The last six characters of TEMPLATE must be "XXXXXX";
851  they are replaced with a string that makes the file name unique.
852  The file is then created, ensuring it didn't exist before.
853  The file is created read-write (mask at least 0600 & ~umask), but it may be
854  world-readable and world-writable (mask 0666 & ~umask), depending on the
855  implementation.
856  Returns the open file descriptor if successful, otherwise -1 and errno
857  set. */
858 # if 0
859 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
860 # define mkstemp rpl_mkstemp
861 # endif
862 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
863 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
864 # else
865 # if ! 1
866 _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
867 # endif
868 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
869 # endif
870 _GL_CXXALIASWARN (mkstemp);
871 #elif defined GNULIB_POSIXCHECK
872 # undef mkstemp
873 # if HAVE_RAW_DECL_MKSTEMP
874 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
875  "use gnulib module mkstemp for portability");
876 # endif
877 #endif
878 
879 #if 0
880 /* Create a unique temporary file from TEMPLATE.
881  The last six characters of TEMPLATE prior to a suffix of length
882  SUFFIXLEN must be "XXXXXX";
883  they are replaced with a string that makes the file name unique.
884  The file is then created, ensuring it didn't exist before.
885  The file is created read-write (mask at least 0600 & ~umask), but it may be
886  world-readable and world-writable (mask 0666 & ~umask), depending on the
887  implementation.
888  Returns the open file descriptor if successful, otherwise -1 and errno
889  set. */
890 # if !1
891 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
892  _GL_ARG_NONNULL ((1)));
893 # endif
894 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
895 _GL_CXXALIASWARN (mkstemps);
896 #elif defined GNULIB_POSIXCHECK
897 # undef mkstemps
898 # if HAVE_RAW_DECL_MKSTEMPS
899 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
900  "use gnulib module mkstemps for portability");
901 # endif
902 #endif
903 
904 #if 0
905 /* Return an FD open to the master side of a pseudo-terminal. Flags should
906  include O_RDWR, and may also include O_NOCTTY. */
907 # if !1
908 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
909 # endif
910 _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
911 _GL_CXXALIASWARN (posix_openpt);
912 #elif defined GNULIB_POSIXCHECK
913 # undef posix_openpt
914 # if HAVE_RAW_DECL_POSIX_OPENPT
915 _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
916  "use gnulib module posix_openpt for portability");
917 # endif
918 #endif
919 
920 #if 0
921 /* Return the pathname of the pseudo-terminal slave associated with
922  the master FD is open on, or NULL on errors. */
923 # if 0
924 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
925 # undef ptsname
926 # define ptsname rpl_ptsname
927 # endif
928 _GL_FUNCDECL_RPL (ptsname, char *, (int fd));
929 _GL_CXXALIAS_RPL (ptsname, char *, (int fd));
930 # else
931 # if !1
932 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
933 # endif
934 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
935 # endif
936 _GL_CXXALIASWARN (ptsname);
937 #elif defined GNULIB_POSIXCHECK
938 # undef ptsname
939 # if HAVE_RAW_DECL_PTSNAME
940 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
941  "use gnulib module ptsname for portability");
942 # endif
943 #endif
944 
945 #if 0
946 /* Set the pathname of the pseudo-terminal slave associated with
947  the master FD is open on and return 0, or set errno and return
948  non-zero on errors. */
949 # if 0
950 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
951 # undef ptsname_r
952 # define ptsname_r rpl_ptsname_r
953 # endif
954 _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
955 _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
956 # else
957 # if !1
958 _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
959 # endif
960 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
961 # endif
962 _GL_CXXALIASWARN (ptsname_r);
963 #elif defined GNULIB_POSIXCHECK
964 # undef ptsname_r
965 # if HAVE_RAW_DECL_PTSNAME_R
966 _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
967  "use gnulib module ptsname_r for portability");
968 # endif
969 #endif
970 
971 #if 0
972 # if 0
973 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
974 # undef putenv
975 # define putenv rpl_putenv
976 # endif
977 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
978 _GL_CXXALIAS_RPL (putenv, int, (char *string));
979 # else
980 _GL_CXXALIAS_SYS (putenv, int, (char *string));
981 # endif
982 _GL_CXXALIASWARN (putenv);
983 #endif
984 
985 #if 0
986 /* Sort an array of NMEMB elements, starting at address BASE, each element
987  occupying SIZE bytes, in ascending order according to the comparison
988  function COMPARE. */
989 # if 0
990 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
991 # undef qsort_r
992 # define qsort_r rpl_qsort_r
993 # endif
994 _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
995  int (*compare) (void const *, void const *,
996  void *),
997  void *arg) _GL_ARG_NONNULL ((1, 4)));
998 _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
999  int (*compare) (void const *, void const *,
1000  void *),
1001  void *arg));
1002 # else
1003 # if !1
1004 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1005  int (*compare) (void const *, void const *,
1006  void *),
1007  void *arg) _GL_ARG_NONNULL ((1, 4)));
1008 # endif
1009 _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1010  int (*compare) (void const *, void const *,
1011  void *),
1012  void *arg));
1013 # endif
1014 _GL_CXXALIASWARN (qsort_r);
1015 #elif defined GNULIB_POSIXCHECK
1016 # undef qsort_r
1017 # if HAVE_RAW_DECL_QSORT_R
1018 _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
1019  "use gnulib module qsort_r for portability");
1020 # endif
1021 #endif
1022 
1023 
1024 #if 0
1025 # if !1
1026 # ifndef RAND_MAX
1027 # define RAND_MAX 2147483647
1028 # endif
1029 # endif
1030 #endif
1031 
1032 
1033 #if 0
1034 # if !1
1035 _GL_FUNCDECL_SYS (random, long, (void));
1036 # endif
1037 _GL_CXXALIAS_SYS (random, long, (void));
1038 _GL_CXXALIASWARN (random);
1039 #elif defined GNULIB_POSIXCHECK
1040 # undef random
1041 # if HAVE_RAW_DECL_RANDOM
1042 _GL_WARN_ON_USE (random, "random is unportable - "
1043  "use gnulib module random for portability");
1044 # endif
1045 #endif
1046 
1047 #if 0
1048 # if !1
1049 _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
1050 # endif
1051 _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
1052 _GL_CXXALIASWARN (srandom);
1053 #elif defined GNULIB_POSIXCHECK
1054 # undef srandom
1055 # if HAVE_RAW_DECL_SRANDOM
1056 _GL_WARN_ON_USE (srandom, "srandom is unportable - "
1057  "use gnulib module random for portability");
1058 # endif
1059 #endif
1060 
1061 #if 0
1062 # if !1 || !1
1063 _GL_FUNCDECL_SYS (initstate, char *,
1064  (unsigned int seed, char *buf, size_t buf_size)
1065  _GL_ARG_NONNULL ((2)));
1066 # endif
1067 _GL_CXXALIAS_SYS (initstate, char *,
1068  (unsigned int seed, char *buf, size_t buf_size));
1069 _GL_CXXALIASWARN (initstate);
1070 #elif defined GNULIB_POSIXCHECK
1071 # undef initstate
1072 # if HAVE_RAW_DECL_INITSTATE_R
1073 _GL_WARN_ON_USE (initstate, "initstate is unportable - "
1074  "use gnulib module random for portability");
1075 # endif
1076 #endif
1077 
1078 #if 0
1079 # if !1 || !1
1080 _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
1081 # endif
1082 _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
1083 _GL_CXXALIASWARN (setstate);
1084 #elif defined GNULIB_POSIXCHECK
1085 # undef setstate
1086 # if HAVE_RAW_DECL_SETSTATE_R
1087 _GL_WARN_ON_USE (setstate, "setstate is unportable - "
1088  "use gnulib module random for portability");
1089 # endif
1090 #endif
1091 
1092 
1093 #if 0
1094 # if 0
1095 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1096 # undef random_r
1097 # define random_r rpl_random_r
1098 # endif
1099 _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
1100  _GL_ARG_NONNULL ((1, 2)));
1101 _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
1102 # else
1103 # if !1
1104 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
1105  _GL_ARG_NONNULL ((1, 2)));
1106 # endif
1107 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
1108 # endif
1109 _GL_CXXALIASWARN (random_r);
1110 #elif defined GNULIB_POSIXCHECK
1111 # undef random_r
1112 # if HAVE_RAW_DECL_RANDOM_R
1113 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
1114  "use gnulib module random_r for portability");
1115 # endif
1116 #endif
1117 
1118 #if 0
1119 # if 0
1120 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1121 # undef srandom_r
1122 # define srandom_r rpl_srandom_r
1123 # endif
1124 _GL_FUNCDECL_RPL (srandom_r, int,
1125  (unsigned int seed, struct random_data *rand_state)
1126  _GL_ARG_NONNULL ((2)));
1127 _GL_CXXALIAS_RPL (srandom_r, int,
1128  (unsigned int seed, struct random_data *rand_state));
1129 # else
1130 # if !1
1131 _GL_FUNCDECL_SYS (srandom_r, int,
1132  (unsigned int seed, struct random_data *rand_state)
1133  _GL_ARG_NONNULL ((2)));
1134 # endif
1135 _GL_CXXALIAS_SYS (srandom_r, int,
1136  (unsigned int seed, struct random_data *rand_state));
1137 # endif
1138 _GL_CXXALIASWARN (srandom_r);
1139 #elif defined GNULIB_POSIXCHECK
1140 # undef srandom_r
1141 # if HAVE_RAW_DECL_SRANDOM_R
1142 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
1143  "use gnulib module random_r for portability");
1144 # endif
1145 #endif
1146 
1147 #if 0
1148 # if 0
1149 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1150 # undef initstate_r
1151 # define initstate_r rpl_initstate_r
1152 # endif
1153 _GL_FUNCDECL_RPL (initstate_r, int,
1154  (unsigned int seed, char *buf, size_t buf_size,
1155  struct random_data *rand_state)
1156  _GL_ARG_NONNULL ((2, 4)));
1157 _GL_CXXALIAS_RPL (initstate_r, int,
1158  (unsigned int seed, char *buf, size_t buf_size,
1159  struct random_data *rand_state));
1160 # else
1161 # if !1
1162 _GL_FUNCDECL_SYS (initstate_r, int,
1163  (unsigned int seed, char *buf, size_t buf_size,
1164  struct random_data *rand_state)
1165  _GL_ARG_NONNULL ((2, 4)));
1166 # endif
1167 _GL_CXXALIAS_SYS (initstate_r, int,
1168  (unsigned int seed, char *buf, size_t buf_size,
1169  struct random_data *rand_state));
1170 # endif
1171 _GL_CXXALIASWARN (initstate_r);
1172 #elif defined GNULIB_POSIXCHECK
1173 # undef initstate_r
1174 # if HAVE_RAW_DECL_INITSTATE_R
1175 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
1176  "use gnulib module random_r for portability");
1177 # endif
1178 #endif
1179 
1180 #if 0
1181 # if 0
1182 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1183 # undef setstate_r
1184 # define setstate_r rpl_setstate_r
1185 # endif
1186 _GL_FUNCDECL_RPL (setstate_r, int,
1187  (char *arg_state, struct random_data *rand_state)
1188  _GL_ARG_NONNULL ((1, 2)));
1189 _GL_CXXALIAS_RPL (setstate_r, int,
1190  (char *arg_state, struct random_data *rand_state));
1191 # else
1192 # if !1
1193 _GL_FUNCDECL_SYS (setstate_r, int,
1194  (char *arg_state, struct random_data *rand_state)
1195  _GL_ARG_NONNULL ((1, 2)));
1196 # endif
1197 _GL_CXXALIAS_SYS (setstate_r, int,
1198  (char *arg_state, struct random_data *rand_state));
1199 # endif
1200 _GL_CXXALIASWARN (setstate_r);
1201 #elif defined GNULIB_POSIXCHECK
1202 # undef setstate_r
1203 # if HAVE_RAW_DECL_SETSTATE_R
1204 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1205  "use gnulib module random_r for portability");
1206 # endif
1207 #endif
1208 
1209 
1210 #if 1
1211 # if 0
1212 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1213  || _GL_USE_STDLIB_ALLOC)
1214 # undef realloc
1215 # define realloc rpl_realloc
1216 # endif
1217 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
1218 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
1219 # else
1220 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
1221 # endif
1222 _GL_CXXALIASWARN (realloc);
1223 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1224 # undef realloc
1225 /* Assume realloc is always declared. */
1226 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
1227  "use gnulib module realloc-posix for portability");
1228 #endif
1229 
1230 
1231 #if 0
1232 # if ! 1
1233 _GL_FUNCDECL_SYS (reallocarray, void *,
1234  (void *ptr, size_t nmemb, size_t size));
1235 # endif
1236 _GL_CXXALIAS_SYS (reallocarray, void *,
1237  (void *ptr, size_t nmemb, size_t size));
1238 _GL_CXXALIASWARN (reallocarray);
1239 #elif defined GNULIB_POSIXCHECK
1240 # undef reallocarray
1241 # if HAVE_RAW_DECL_REALLOCARRAY
1242 _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
1243  "use gnulib module reallocarray for portability");
1244 # endif
1245 #endif
1246 
1247 #if 0
1248 # if 0
1249 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1250 # define realpath rpl_realpath
1251 # endif
1252 _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
1253  _GL_ARG_NONNULL ((1)));
1254 _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
1255 # else
1256 # if !1
1257 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
1258  _GL_ARG_NONNULL ((1)));
1259 # endif
1260 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
1261 # endif
1262 _GL_CXXALIASWARN (realpath);
1263 #elif defined GNULIB_POSIXCHECK
1264 # undef realpath
1265 # if HAVE_RAW_DECL_REALPATH
1266 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
1267  "canonicalize or canonicalize-lgpl for portability");
1268 # endif
1269 #endif
1270 
1271 #if 0
1272 /* Test a user response to a question.
1273  Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
1274 # if !1
1275 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
1276 # endif
1277 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
1278 _GL_CXXALIASWARN (rpmatch);
1279 #elif defined GNULIB_POSIXCHECK
1280 # undef rpmatch
1281 # if HAVE_RAW_DECL_RPMATCH
1282 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
1283  "use gnulib module rpmatch for portability");
1284 # endif
1285 #endif
1286 
1287 #if 0
1288 /* Look up NAME in the environment, returning 0 in insecure situations. */
1289 # if !1
1290 _GL_FUNCDECL_SYS (secure_getenv, char *,
1291  (char const *name) _GL_ARG_NONNULL ((1)));
1292 # endif
1293 _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
1294 _GL_CXXALIASWARN (secure_getenv);
1295 #elif defined GNULIB_POSIXCHECK
1296 # undef secure_getenv
1297 # if HAVE_RAW_DECL_SECURE_GETENV
1298 _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
1299  "use gnulib module secure_getenv for portability");
1300 # endif
1301 #endif
1302 
1303 #if 1
1304 /* Set NAME to VALUE in the environment.
1305  If REPLACE is nonzero, overwrite an existing value. */
1306 # if 0
1307 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1308 # undef setenv
1309 # define setenv rpl_setenv
1310 # endif
1311 _GL_FUNCDECL_RPL (setenv, int,
1312  (const char *name, const char *value, int replace)
1313  _GL_ARG_NONNULL ((1)));
1314 _GL_CXXALIAS_RPL (setenv, int,
1315  (const char *name, const char *value, int replace));
1316 # else
1317 # if !1
1318 _GL_FUNCDECL_SYS (setenv, int,
1319  (const char *name, const char *value, int replace)
1320  _GL_ARG_NONNULL ((1)));
1321 # endif
1322 _GL_CXXALIAS_SYS (setenv, int,
1323  (const char *name, const char *value, int replace));
1324 # endif
1325 # if !(0 && !1)
1327 # endif
1328 #elif defined GNULIB_POSIXCHECK
1329 # undef setenv
1330 # if HAVE_RAW_DECL_SETENV
1331 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
1332  "use gnulib module setenv for portability");
1333 # endif
1334 #endif
1335 
1336 #if 1
1337  /* Parse a double from STRING, updating ENDP if appropriate. */
1338 # if 0
1339 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1340 # define strtod rpl_strtod
1341 # endif
1342 _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
1343  _GL_ARG_NONNULL ((1)));
1344 _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
1345 # else
1346 # if !1
1347 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
1348  _GL_ARG_NONNULL ((1)));
1349 # endif
1350 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
1351 # endif
1353 #elif defined GNULIB_POSIXCHECK
1354 # undef strtod
1355 # if HAVE_RAW_DECL_STRTOD
1356 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
1357  "use gnulib module strtod for portability");
1358 # endif
1359 #endif
1360 
1361 #if 0
1362 /* Parse a signed integer whose textual representation starts at STRING.
1363  The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1364  it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1365  "0x").
1366  If ENDPTR is not NULL, the address of the first byte after the integer is
1367  stored in *ENDPTR.
1368  Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
1369  to ERANGE. */
1370 # if !1
1371 _GL_FUNCDECL_SYS (strtoll, long long,
1372  (const char *string, char **endptr, int base)
1373  _GL_ARG_NONNULL ((1)));
1374 # endif
1375 _GL_CXXALIAS_SYS (strtoll, long long,
1376  (const char *string, char **endptr, int base));
1377 _GL_CXXALIASWARN (strtoll);
1378 #elif defined GNULIB_POSIXCHECK
1379 # undef strtoll
1380 # if HAVE_RAW_DECL_STRTOLL
1381 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
1382  "use gnulib module strtoll for portability");
1383 # endif
1384 #endif
1385 
1386 #if 0
1387 /* Parse an unsigned integer whose textual representation starts at STRING.
1388  The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1389  it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1390  "0x").
1391  If ENDPTR is not NULL, the address of the first byte after the integer is
1392  stored in *ENDPTR.
1393  Upon overflow, the return value is ULLONG_MAX, and errno is set to
1394  ERANGE. */
1395 # if !1
1396 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
1397  (const char *string, char **endptr, int base)
1398  _GL_ARG_NONNULL ((1)));
1399 # endif
1400 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
1401  (const char *string, char **endptr, int base));
1402 _GL_CXXALIASWARN (strtoull);
1403 #elif defined GNULIB_POSIXCHECK
1404 # undef strtoull
1405 # if HAVE_RAW_DECL_STRTOULL
1406 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
1407  "use gnulib module strtoull for portability");
1408 # endif
1409 #endif
1410 
1411 #if 0
1412 /* Unlock the slave side of the pseudo-terminal whose master side is specified
1413  by FD, so that it can be opened. */
1414 # if !1
1415 _GL_FUNCDECL_SYS (unlockpt, int, (int fd));
1416 # endif
1417 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
1418 _GL_CXXALIASWARN (unlockpt);
1419 #elif defined GNULIB_POSIXCHECK
1420 # undef unlockpt
1421 # if HAVE_RAW_DECL_UNLOCKPT
1422 _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
1423  "use gnulib module unlockpt for portability");
1424 # endif
1425 #endif
1426 
1427 #if 1
1428 /* Remove the variable NAME from the environment. */
1429 # if 0
1430 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1431 # undef unsetenv
1432 # define unsetenv rpl_unsetenv
1433 # endif
1434 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1435 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
1436 # else
1437 # if !1
1438 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1439 # endif
1440 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
1441 # endif
1442 # if !(0 && !1)
1444 # endif
1445 #elif defined GNULIB_POSIXCHECK
1446 # undef unsetenv
1447 # if HAVE_RAW_DECL_UNSETENV
1448 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
1449  "use gnulib module unsetenv for portability");
1450 # endif
1451 #endif
1452 
1453 /* Convert a wide character to a multibyte character. */
1454 #if 0
1455 # if 0
1456 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1457 # undef wctomb
1458 # define wctomb rpl_wctomb
1459 # endif
1460 _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
1461 _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
1462 # else
1463 _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
1464 # endif
1465 _GL_CXXALIASWARN (wctomb);
1466 #endif
1467 
1468 
1469 #endif /* _GL_STDLIB_H */
1470 #endif /* _GL_STDLIB_H */
1471 #endif
#define _GL_ARG_NONNULL(params)
Definition: stdlib.h:461
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: stdlib.h:222
#define _GL_CXXALIASWARN(func)
Definition: stdlib.h:403
#define _Noreturn
Definition: stdlib.h:115
int unsetenv(const char *name)
Definition: unsetenv.c:57
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: stdlib.h:234
double strtod(const char *nptr, char **endptr)
Definition: strtod.c:208
#define _GL_WARN_ON_USE(function, message)
Definition: stdlib.h:540
#define _GL_ATTRIBUTE_PURE
Definition: stdlib.h:104
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: stdlib.h:246
int setenv(const char *name, const char *value, int replace)
Definition: setenv.c:291
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: stdlib.h:319
#define int32_t
Definition: stdint.in.h:167