Complete upgrade of gnu grep 2.14 => 2.20
[dragonfly.git] / gnu / usr.bin / grep / libgreputils / stdlib.h
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A GNU-like <stdlib.h>.
3
4    Copyright (C) 1995, 2001-2004, 2006-2014 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 <http://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 #ifndef _GL_CXXDEFS_H
121 #define _GL_CXXDEFS_H
122
123 /* The three most frequent use cases of these macros are:
124
125    * For providing a substitute for a function that is missing on some
126      platforms, but is declared and works fine on the platforms on which
127      it exists:
128
129        #if @GNULIB_FOO@
130        # if !@HAVE_FOO@
131        _GL_FUNCDECL_SYS (foo, ...);
132        # endif
133        _GL_CXXALIAS_SYS (foo, ...);
134        _GL_CXXALIASWARN (foo);
135        #elif defined GNULIB_POSIXCHECK
136        ...
137        #endif
138
139    * For providing a replacement for a function that exists on all platforms,
140      but is broken/insufficient and needs to be replaced on some platforms:
141
142        #if @GNULIB_FOO@
143        # if @REPLACE_FOO@
144        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
145        #   undef foo
146        #   define foo rpl_foo
147        #  endif
148        _GL_FUNCDECL_RPL (foo, ...);
149        _GL_CXXALIAS_RPL (foo, ...);
150        # else
151        _GL_CXXALIAS_SYS (foo, ...);
152        # endif
153        _GL_CXXALIASWARN (foo);
154        #elif defined GNULIB_POSIXCHECK
155        ...
156        #endif
157
158    * For providing a replacement for a function that exists on some platforms
159      but is broken/insufficient and needs to be replaced on some of them and
160      is additionally either missing or undeclared on some other platforms:
161
162        #if @GNULIB_FOO@
163        # if @REPLACE_FOO@
164        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
165        #   undef foo
166        #   define foo rpl_foo
167        #  endif
168        _GL_FUNCDECL_RPL (foo, ...);
169        _GL_CXXALIAS_RPL (foo, ...);
170        # else
171        #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
172        _GL_FUNCDECL_SYS (foo, ...);
173        #  endif
174        _GL_CXXALIAS_SYS (foo, ...);
175        # endif
176        _GL_CXXALIASWARN (foo);
177        #elif defined GNULIB_POSIXCHECK
178        ...
179        #endif
180 */
181
182 /* _GL_EXTERN_C declaration;
183    performs the declaration with C linkage.  */
184 #if defined __cplusplus
185 # define _GL_EXTERN_C extern "C"
186 #else
187 # define _GL_EXTERN_C extern
188 #endif
189
190 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
191    declares a replacement function, named rpl_func, with the given prototype,
192    consisting of return type, parameters, and attributes.
193    Example:
194      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
195                                   _GL_ARG_NONNULL ((1)));
196  */
197 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
198   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
199 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
200   _GL_EXTERN_C rettype rpl_func parameters_and_attributes
201
202 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
203    declares the system function, named func, with the given prototype,
204    consisting of return type, parameters, and attributes.
205    Example:
206      _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
207                                   _GL_ARG_NONNULL ((1)));
208  */
209 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
210   _GL_EXTERN_C rettype func parameters_and_attributes
211
212 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
213    declares a C++ alias called GNULIB_NAMESPACE::func
214    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
215    Example:
216      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
217  */
218 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
219   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
220 #if defined __cplusplus && defined GNULIB_NAMESPACE
221 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
222     namespace GNULIB_NAMESPACE                                \
223     {                                                         \
224       rettype (*const func) parameters = ::rpl_func;          \
225     }                                                         \
226     _GL_EXTERN_C int _gl_cxxalias_dummy
227 #else
228 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
229     _GL_EXTERN_C int _gl_cxxalias_dummy
230 #endif
231
232 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
233    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
234    except that the C function rpl_func may have a slightly different
235    declaration.  A cast is used to silence the "invalid conversion" error
236    that would otherwise occur.  */
237 #if defined __cplusplus && defined GNULIB_NAMESPACE
238 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
239     namespace GNULIB_NAMESPACE                                     \
240     {                                                              \
241       rettype (*const func) parameters =                           \
242         reinterpret_cast<rettype(*)parameters>(::rpl_func);        \
243     }                                                              \
244     _GL_EXTERN_C int _gl_cxxalias_dummy
245 #else
246 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
247     _GL_EXTERN_C int _gl_cxxalias_dummy
248 #endif
249
250 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
251    declares a C++ alias called GNULIB_NAMESPACE::func
252    that redirects to the system provided function func, if GNULIB_NAMESPACE
253    is defined.
254    Example:
255      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
256  */
257 #if defined __cplusplus && defined GNULIB_NAMESPACE
258   /* If we were to write
259        rettype (*const func) parameters = ::func;
260      like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
261      better (remove an indirection through a 'static' pointer variable),
262      but then the _GL_CXXALIASWARN macro below would cause a warning not only
263      for uses of ::func but also for uses of GNULIB_NAMESPACE::func.  */
264 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
265     namespace GNULIB_NAMESPACE                     \
266     {                                              \
267       static rettype (*func) parameters = ::func;  \
268     }                                              \
269     _GL_EXTERN_C int _gl_cxxalias_dummy
270 #else
271 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
272     _GL_EXTERN_C int _gl_cxxalias_dummy
273 #endif
274
275 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
276    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
277    except that the C function func may have a slightly different declaration.
278    A cast is used to silence the "invalid conversion" error that would
279    otherwise occur.  */
280 #if defined __cplusplus && defined GNULIB_NAMESPACE
281 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
282     namespace GNULIB_NAMESPACE                          \
283     {                                                   \
284       static rettype (*func) parameters =               \
285         reinterpret_cast<rettype(*)parameters>(::func); \
286     }                                                   \
287     _GL_EXTERN_C int _gl_cxxalias_dummy
288 #else
289 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
290     _GL_EXTERN_C int _gl_cxxalias_dummy
291 #endif
292
293 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
294    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
295    except that the C function is picked among a set of overloaded functions,
296    namely the one with rettype2 and parameters2.  Two consecutive casts
297    are used to silence the "cannot find a match" and "invalid conversion"
298    errors that would otherwise occur.  */
299 #if defined __cplusplus && defined GNULIB_NAMESPACE
300   /* The outer cast must be a reinterpret_cast.
301      The inner cast: When the function is defined as a set of overloaded
302      functions, it works as a static_cast<>, choosing the designated variant.
303      When the function is defined as a single variant, it works as a
304      reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
305 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
306     namespace GNULIB_NAMESPACE                                                \
307     {                                                                         \
308       static rettype (*func) parameters =                                     \
309         reinterpret_cast<rettype(*)parameters>(                               \
310           (rettype2(*)parameters2)(::func));                                  \
311     }                                                                         \
312     _GL_EXTERN_C int _gl_cxxalias_dummy
313 #else
314 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
315     _GL_EXTERN_C int _gl_cxxalias_dummy
316 #endif
317
318 /* _GL_CXXALIASWARN (func);
319    causes a warning to be emitted when ::func is used but not when
320    GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
321    variants.  */
322 #if defined __cplusplus && defined GNULIB_NAMESPACE
323 # define _GL_CXXALIASWARN(func) \
324    _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
325 # define _GL_CXXALIASWARN_1(func,namespace) \
326    _GL_CXXALIASWARN_2 (func, namespace)
327 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
328    we enable the warning only when not optimizing.  */
329 # if !__OPTIMIZE__
330 #  define _GL_CXXALIASWARN_2(func,namespace) \
331     _GL_WARN_ON_USE (func, \
332                      "The symbol ::" #func " refers to the system function. " \
333                      "Use " #namespace "::" #func " instead.")
334 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
335 #  define _GL_CXXALIASWARN_2(func,namespace) \
336      extern __typeof__ (func) func
337 # else
338 #  define _GL_CXXALIASWARN_2(func,namespace) \
339      _GL_EXTERN_C int _gl_cxxalias_dummy
340 # endif
341 #else
342 # define _GL_CXXALIASWARN(func) \
343     _GL_EXTERN_C int _gl_cxxalias_dummy
344 #endif
345
346 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
347    causes a warning to be emitted when the given overloaded variant of ::func
348    is used but not when GNULIB_NAMESPACE::func is used.  */
349 #if defined __cplusplus && defined GNULIB_NAMESPACE
350 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
351    _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
352                         GNULIB_NAMESPACE)
353 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
354    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
355 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
356    we enable the warning only when not optimizing.  */
357 # if !__OPTIMIZE__
358 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
359     _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
360                          "The symbol ::" #func " refers to the system function. " \
361                          "Use " #namespace "::" #func " instead.")
362 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
363 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
364      extern __typeof__ (func) func
365 # else
366 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
367      _GL_EXTERN_C int _gl_cxxalias_dummy
368 # endif
369 #else
370 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
371     _GL_EXTERN_C int _gl_cxxalias_dummy
372 #endif
373
374 #endif /* _GL_CXXDEFS_H */
375
376 /* The definition of _GL_ARG_NONNULL is copied here.  */
377 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
378    that the values passed as arguments n, ..., m must be non-NULL pointers.
379    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
380 #ifndef _GL_ARG_NONNULL
381 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
382 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
383 # else
384 #  define _GL_ARG_NONNULL(params)
385 # endif
386 #endif
387
388 /* The definition of _GL_WARN_ON_USE is copied here.  */
389 #ifndef _GL_WARN_ON_USE
390
391 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
392 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
393 #  define _GL_WARN_ON_USE(function, message) \
394 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
395 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
396 /* Verify the existence of the function.  */
397 #  define _GL_WARN_ON_USE(function, message) \
398 extern __typeof__ (function) function
399 # else /* Unsupported.  */
400 #  define _GL_WARN_ON_USE(function, message) \
401 _GL_WARN_EXTERN_C int _gl_warn_on_use
402 # endif
403 #endif
404
405 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
406    is like _GL_WARN_ON_USE (function, "string"), except that the function is
407    declared with the given prototype, consisting of return type, parameters,
408    and attributes.
409    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
410    not work in this case.  */
411 #ifndef _GL_WARN_ON_USE_CXX
412 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
413 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
414 extern rettype function parameters_and_attributes \
415      __attribute__ ((__warning__ (msg)))
416 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
417 /* Verify the existence of the function.  */
418 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
419 extern rettype function parameters_and_attributes
420 # else /* Unsupported.  */
421 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
422 _GL_WARN_EXTERN_C int _gl_warn_on_use
423 # endif
424 #endif
425
426 /* _GL_WARN_EXTERN_C declaration;
427    performs the declaration with C linkage.  */
428 #ifndef _GL_WARN_EXTERN_C
429 # if defined __cplusplus
430 #  define _GL_WARN_EXTERN_C extern "C"
431 # else
432 #  define _GL_WARN_EXTERN_C extern
433 # endif
434 #endif
435
436
437 /* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
438 #ifndef EXIT_SUCCESS
439 # define EXIT_SUCCESS 0
440 #endif
441 /* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
442    with proper operation of xargs.  */
443 #ifndef EXIT_FAILURE
444 # define EXIT_FAILURE 1
445 #elif EXIT_FAILURE != 1
446 # undef EXIT_FAILURE
447 # define EXIT_FAILURE 1
448 #endif
449
450
451 #if 0
452 /* Terminate the current process with the given return code, without running
453    the 'atexit' handlers.  */
454 # if !1
455 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
456 # endif
457 _GL_CXXALIAS_SYS (_Exit, void, (int status));
458 _GL_CXXALIASWARN (_Exit);
459 #elif defined GNULIB_POSIXCHECK
460 # undef _Exit
461 # if HAVE_RAW_DECL__EXIT
462 _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
463                  "use gnulib module _Exit for portability");
464 # endif
465 #endif
466
467
468 #if 0
469 /* Parse a signed decimal integer.
470    Returns the value of the integer.  Errors are not detected.  */
471 # if !1
472 _GL_FUNCDECL_SYS (atoll, long long, (const char *string)
473                                     _GL_ATTRIBUTE_PURE
474                                     _GL_ARG_NONNULL ((1)));
475 # endif
476 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
477 _GL_CXXALIASWARN (atoll);
478 #elif defined GNULIB_POSIXCHECK
479 # undef atoll
480 # if HAVE_RAW_DECL_ATOLL
481 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
482                  "use gnulib module atoll for portability");
483 # endif
484 #endif
485
486 #if 0
487 # if 0
488 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
489 #   undef calloc
490 #   define calloc rpl_calloc
491 #  endif
492 _GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size));
493 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
494 # else
495 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
496 # endif
497 _GL_CXXALIASWARN (calloc);
498 #elif defined GNULIB_POSIXCHECK
499 # undef calloc
500 /* Assume calloc is always declared.  */
501 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
502                  "use gnulib module calloc-posix for portability");
503 #endif
504
505 #if 0
506 # if 0
507 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
508 #   define canonicalize_file_name rpl_canonicalize_file_name
509 #  endif
510 _GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name)
511                                                   _GL_ARG_NONNULL ((1)));
512 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
513 # else
514 #  if !1
515 _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
516                                                   _GL_ARG_NONNULL ((1)));
517 #  endif
518 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
519 # endif
520 _GL_CXXALIASWARN (canonicalize_file_name);
521 #elif defined GNULIB_POSIXCHECK
522 # undef canonicalize_file_name
523 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
524 _GL_WARN_ON_USE (canonicalize_file_name,
525                  "canonicalize_file_name is unportable - "
526                  "use gnulib module canonicalize-lgpl for portability");
527 # endif
528 #endif
529
530 #if 0
531 /* Store max(NELEM,3) load average numbers in LOADAVG[].
532    The three numbers are the load average of the last 1 minute, the last 5
533    minutes, and the last 15 minutes, respectively.
534    LOADAVG is an array of NELEM numbers.  */
535 # if !1
536 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
537                                    _GL_ARG_NONNULL ((1)));
538 # endif
539 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
540 _GL_CXXALIASWARN (getloadavg);
541 #elif defined GNULIB_POSIXCHECK
542 # undef getloadavg
543 # if HAVE_RAW_DECL_GETLOADAVG
544 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
545                  "use gnulib module getloadavg for portability");
546 # endif
547 #endif
548
549 #if 0
550 /* Assuming *OPTIONP is a comma separated list of elements of the form
551    "token" or "token=value", getsubopt parses the first of these elements.
552    If the first element refers to a "token" that is member of the given
553    NULL-terminated array of tokens:
554      - It replaces the comma with a NUL byte, updates *OPTIONP to point past
555        the first option and the comma, sets *VALUEP to the value of the
556        element (or NULL if it doesn't contain an "=" sign),
557      - It returns the index of the "token" in the given array of tokens.
558    Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
559    For more details see the POSIX:2001 specification.
560    http://www.opengroup.org/susv3xsh/getsubopt.html */
561 # if !1
562 _GL_FUNCDECL_SYS (getsubopt, int,
563                   (char **optionp, char *const *tokens, char **valuep)
564                   _GL_ARG_NONNULL ((1, 2, 3)));
565 # endif
566 _GL_CXXALIAS_SYS (getsubopt, int,
567                   (char **optionp, char *const *tokens, char **valuep));
568 _GL_CXXALIASWARN (getsubopt);
569 #elif defined GNULIB_POSIXCHECK
570 # undef getsubopt
571 # if HAVE_RAW_DECL_GETSUBOPT
572 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
573                  "use gnulib module getsubopt for portability");
574 # endif
575 #endif
576
577 #if 0
578 /* Change the ownership and access permission of the slave side of the
579    pseudo-terminal whose master side is specified by FD.  */
580 # if !1
581 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
582 # endif
583 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
584 _GL_CXXALIASWARN (grantpt);
585 #elif defined GNULIB_POSIXCHECK
586 # undef grantpt
587 # if HAVE_RAW_DECL_GRANTPT
588 _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
589                  "use gnulib module grantpt for portability");
590 # endif
591 #endif
592
593 /* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
594    rely on GNU or POSIX semantics for malloc and realloc (for example,
595    by never specifying a zero size), so it does not need malloc or
596    realloc to be redefined.  */
597 #if 1
598 # if 0
599 #  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
600         || _GL_USE_STDLIB_ALLOC)
601 #   undef malloc
602 #   define malloc rpl_malloc
603 #  endif
604 _GL_FUNCDECL_RPL (malloc, void *, (size_t size));
605 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
606 # else
607 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
608 # endif
609 _GL_CXXALIASWARN (malloc);
610 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
611 # undef malloc
612 /* Assume malloc is always declared.  */
613 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
614                  "use gnulib module malloc-posix for portability");
615 #endif
616
617 /* Convert a multibyte character to a wide character.  */
618 #if 1
619 # if 0
620 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
621 #   undef mbtowc
622 #   define mbtowc rpl_mbtowc
623 #  endif
624 _GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
625 _GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
626 # else
627 _GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n));
628 # endif
629 _GL_CXXALIASWARN (mbtowc);
630 #endif
631
632 #if 0
633 /* Create a unique temporary directory from TEMPLATE.
634    The last six characters of TEMPLATE must be "XXXXXX";
635    they are replaced with a string that makes the directory name unique.
636    Returns TEMPLATE, or a null pointer if it cannot get a unique name.
637    The directory is created mode 700.  */
638 # if !1
639 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
640 # endif
641 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
642 _GL_CXXALIASWARN (mkdtemp);
643 #elif defined GNULIB_POSIXCHECK
644 # undef mkdtemp
645 # if HAVE_RAW_DECL_MKDTEMP
646 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
647                  "use gnulib module mkdtemp for portability");
648 # endif
649 #endif
650
651 #if 0
652 /* Create a unique temporary file from TEMPLATE.
653    The last six characters of TEMPLATE must be "XXXXXX";
654    they are replaced with a string that makes the file name unique.
655    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
656    and O_TEXT, O_BINARY (defined in "binary-io.h").
657    The file is then created, with the specified flags, ensuring it didn't exist
658    before.
659    The file is created read-write (mask at least 0600 & ~umask), but it may be
660    world-readable and world-writable (mask 0666 & ~umask), depending on the
661    implementation.
662    Returns the open file descriptor if successful, otherwise -1 and errno
663    set.  */
664 # if !1
665 _GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
666                                  _GL_ARG_NONNULL ((1)));
667 # endif
668 _GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
669 _GL_CXXALIASWARN (mkostemp);
670 #elif defined GNULIB_POSIXCHECK
671 # undef mkostemp
672 # if HAVE_RAW_DECL_MKOSTEMP
673 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
674                  "use gnulib module mkostemp for portability");
675 # endif
676 #endif
677
678 #if 0
679 /* Create a unique temporary file from TEMPLATE.
680    The last six characters of TEMPLATE before a suffix of length
681    SUFFIXLEN must be "XXXXXX";
682    they are replaced with a string that makes the file name unique.
683    The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
684    and O_TEXT, O_BINARY (defined in "binary-io.h").
685    The file is then created, with the specified flags, ensuring it didn't exist
686    before.
687    The file is created read-write (mask at least 0600 & ~umask), but it may be
688    world-readable and world-writable (mask 0666 & ~umask), depending on the
689    implementation.
690    Returns the open file descriptor if successful, otherwise -1 and errno
691    set.  */
692 # if !1
693 _GL_FUNCDECL_SYS (mkostemps, int,
694                   (char * /*template*/, int /*suffixlen*/, int /*flags*/)
695                   _GL_ARG_NONNULL ((1)));
696 # endif
697 _GL_CXXALIAS_SYS (mkostemps, int,
698                   (char * /*template*/, int /*suffixlen*/, int /*flags*/));
699 _GL_CXXALIASWARN (mkostemps);
700 #elif defined GNULIB_POSIXCHECK
701 # undef mkostemps
702 # if HAVE_RAW_DECL_MKOSTEMPS
703 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
704                  "use gnulib module mkostemps for portability");
705 # endif
706 #endif
707
708 #if 0
709 /* Create a unique temporary file from TEMPLATE.
710    The last six characters of TEMPLATE must be "XXXXXX";
711    they are replaced with a string that makes the file name unique.
712    The file is then created, ensuring it didn't exist before.
713    The file is created read-write (mask at least 0600 & ~umask), but it may be
714    world-readable and world-writable (mask 0666 & ~umask), depending on the
715    implementation.
716    Returns the open file descriptor if successful, otherwise -1 and errno
717    set.  */
718 # if 0
719 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
720 #   define mkstemp rpl_mkstemp
721 #  endif
722 _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
723 _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
724 # else
725 #  if ! 1
726 _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
727 #  endif
728 _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
729 # endif
730 _GL_CXXALIASWARN (mkstemp);
731 #elif defined GNULIB_POSIXCHECK
732 # undef mkstemp
733 # if HAVE_RAW_DECL_MKSTEMP
734 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
735                  "use gnulib module mkstemp for portability");
736 # endif
737 #endif
738
739 #if 0
740 /* Create a unique temporary file from TEMPLATE.
741    The last six characters of TEMPLATE prior to a suffix of length
742    SUFFIXLEN must be "XXXXXX";
743    they are replaced with a string that makes the file name unique.
744    The file is then created, ensuring it didn't exist before.
745    The file is created read-write (mask at least 0600 & ~umask), but it may be
746    world-readable and world-writable (mask 0666 & ~umask), depending on the
747    implementation.
748    Returns the open file descriptor if successful, otherwise -1 and errno
749    set.  */
750 # if !1
751 _GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
752                                  _GL_ARG_NONNULL ((1)));
753 # endif
754 _GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
755 _GL_CXXALIASWARN (mkstemps);
756 #elif defined GNULIB_POSIXCHECK
757 # undef mkstemps
758 # if HAVE_RAW_DECL_MKSTEMPS
759 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
760                  "use gnulib module mkstemps for portability");
761 # endif
762 #endif
763
764 #if 0
765 /* Return an FD open to the master side of a pseudo-terminal.  Flags should
766    include O_RDWR, and may also include O_NOCTTY.  */
767 # if !1
768 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
769 # endif
770 _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
771 _GL_CXXALIASWARN (posix_openpt);
772 #elif defined GNULIB_POSIXCHECK
773 # undef posix_openpt
774 # if HAVE_RAW_DECL_POSIX_OPENPT
775 _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
776                  "use gnulib module posix_openpt for portability");
777 # endif
778 #endif
779
780 #if 0
781 /* Return the pathname of the pseudo-terminal slave associated with
782    the master FD is open on, or NULL on errors.  */
783 # if 0
784 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
785 #   undef ptsname
786 #   define ptsname rpl_ptsname
787 #  endif
788 _GL_FUNCDECL_RPL (ptsname, char *, (int fd));
789 _GL_CXXALIAS_RPL (ptsname, char *, (int fd));
790 # else
791 #  if !1
792 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
793 #  endif
794 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
795 # endif
796 _GL_CXXALIASWARN (ptsname);
797 #elif defined GNULIB_POSIXCHECK
798 # undef ptsname
799 # if HAVE_RAW_DECL_PTSNAME
800 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
801                  "use gnulib module ptsname for portability");
802 # endif
803 #endif
804
805 #if 0
806 /* Set the pathname of the pseudo-terminal slave associated with
807    the master FD is open on and return 0, or set errno and return
808    non-zero on errors.  */
809 # if 0
810 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
811 #   undef ptsname_r
812 #   define ptsname_r rpl_ptsname_r
813 #  endif
814 _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
815 _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
816 # else
817 #  if !1
818 _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
819 #  endif
820 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
821 # endif
822 _GL_CXXALIASWARN (ptsname_r);
823 #elif defined GNULIB_POSIXCHECK
824 # undef ptsname_r
825 # if HAVE_RAW_DECL_PTSNAME_R
826 _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
827                  "use gnulib module ptsname_r for portability");
828 # endif
829 #endif
830
831 #if IN_GREP_GNULIB_TESTS
832 # if 1
833 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
834 #   undef putenv
835 #   define putenv rpl_putenv
836 #  endif
837 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
838 _GL_CXXALIAS_RPL (putenv, int, (char *string));
839 # else
840 _GL_CXXALIAS_SYS (putenv, int, (char *string));
841 # endif
842 _GL_CXXALIASWARN (putenv);
843 #endif
844
845
846 #if 0
847 # if !1
848 #  ifndef RAND_MAX
849 #   define RAND_MAX 2147483647
850 #  endif
851 # endif
852 #endif
853
854
855 #if 0
856 # if !1
857 _GL_FUNCDECL_SYS (random, long, (void));
858 # endif
859 _GL_CXXALIAS_SYS (random, long, (void));
860 _GL_CXXALIASWARN (random);
861 #elif defined GNULIB_POSIXCHECK
862 # undef random
863 # if HAVE_RAW_DECL_RANDOM
864 _GL_WARN_ON_USE (random, "random is unportable - "
865                  "use gnulib module random for portability");
866 # endif
867 #endif
868
869 #if 0
870 # if !1
871 _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
872 # endif
873 _GL_CXXALIAS_SYS (srandom, void, (unsigned int seed));
874 _GL_CXXALIASWARN (srandom);
875 #elif defined GNULIB_POSIXCHECK
876 # undef srandom
877 # if HAVE_RAW_DECL_SRANDOM
878 _GL_WARN_ON_USE (srandom, "srandom is unportable - "
879                  "use gnulib module random for portability");
880 # endif
881 #endif
882
883 #if 0
884 # if !1
885 _GL_FUNCDECL_SYS (initstate, char *,
886                   (unsigned int seed, char *buf, size_t buf_size)
887                   _GL_ARG_NONNULL ((2)));
888 # endif
889 _GL_CXXALIAS_SYS (initstate, char *,
890                   (unsigned int seed, char *buf, size_t buf_size));
891 _GL_CXXALIASWARN (initstate);
892 #elif defined GNULIB_POSIXCHECK
893 # undef initstate
894 # if HAVE_RAW_DECL_INITSTATE_R
895 _GL_WARN_ON_USE (initstate, "initstate is unportable - "
896                  "use gnulib module random for portability");
897 # endif
898 #endif
899
900 #if 0
901 # if !1
902 _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
903 # endif
904 _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state));
905 _GL_CXXALIASWARN (setstate);
906 #elif defined GNULIB_POSIXCHECK
907 # undef setstate
908 # if HAVE_RAW_DECL_SETSTATE_R
909 _GL_WARN_ON_USE (setstate, "setstate is unportable - "
910                  "use gnulib module random for portability");
911 # endif
912 #endif
913
914
915 #if 0
916 # if 0
917 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
918 #   undef random_r
919 #   define random_r rpl_random_r
920 #  endif
921 _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
922                                  _GL_ARG_NONNULL ((1, 2)));
923 _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
924 # else
925 #  if !1
926 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
927                                  _GL_ARG_NONNULL ((1, 2)));
928 #  endif
929 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
930 # endif
931 _GL_CXXALIASWARN (random_r);
932 #elif defined GNULIB_POSIXCHECK
933 # undef random_r
934 # if HAVE_RAW_DECL_RANDOM_R
935 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
936                  "use gnulib module random_r for portability");
937 # endif
938 #endif
939
940 #if 0
941 # if 0
942 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
943 #   undef srandom_r
944 #   define srandom_r rpl_srandom_r
945 #  endif
946 _GL_FUNCDECL_RPL (srandom_r, int,
947                   (unsigned int seed, struct random_data *rand_state)
948                   _GL_ARG_NONNULL ((2)));
949 _GL_CXXALIAS_RPL (srandom_r, int,
950                   (unsigned int seed, struct random_data *rand_state));
951 # else
952 #  if !1
953 _GL_FUNCDECL_SYS (srandom_r, int,
954                   (unsigned int seed, struct random_data *rand_state)
955                   _GL_ARG_NONNULL ((2)));
956 #  endif
957 _GL_CXXALIAS_SYS (srandom_r, int,
958                   (unsigned int seed, struct random_data *rand_state));
959 # endif
960 _GL_CXXALIASWARN (srandom_r);
961 #elif defined GNULIB_POSIXCHECK
962 # undef srandom_r
963 # if HAVE_RAW_DECL_SRANDOM_R
964 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
965                  "use gnulib module random_r for portability");
966 # endif
967 #endif
968
969 #if 0
970 # if 0
971 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
972 #   undef initstate_r
973 #   define initstate_r rpl_initstate_r
974 #  endif
975 _GL_FUNCDECL_RPL (initstate_r, int,
976                   (unsigned int seed, char *buf, size_t buf_size,
977                    struct random_data *rand_state)
978                   _GL_ARG_NONNULL ((2, 4)));
979 _GL_CXXALIAS_RPL (initstate_r, int,
980                   (unsigned int seed, char *buf, size_t buf_size,
981                    struct random_data *rand_state));
982 # else
983 #  if !1
984 _GL_FUNCDECL_SYS (initstate_r, int,
985                   (unsigned int seed, char *buf, size_t buf_size,
986                    struct random_data *rand_state)
987                   _GL_ARG_NONNULL ((2, 4)));
988 #  endif
989 _GL_CXXALIAS_SYS (initstate_r, int,
990                   (unsigned int seed, char *buf, size_t buf_size,
991                    struct random_data *rand_state));
992 # endif
993 _GL_CXXALIASWARN (initstate_r);
994 #elif defined GNULIB_POSIXCHECK
995 # undef initstate_r
996 # if HAVE_RAW_DECL_INITSTATE_R
997 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
998                  "use gnulib module random_r for portability");
999 # endif
1000 #endif
1001
1002 #if 0
1003 # if 0
1004 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1005 #   undef setstate_r
1006 #   define setstate_r rpl_setstate_r
1007 #  endif
1008 _GL_FUNCDECL_RPL (setstate_r, int,
1009                   (char *arg_state, struct random_data *rand_state)
1010                   _GL_ARG_NONNULL ((1, 2)));
1011 _GL_CXXALIAS_RPL (setstate_r, int,
1012                   (char *arg_state, struct random_data *rand_state));
1013 # else
1014 #  if !1
1015 _GL_FUNCDECL_SYS (setstate_r, int,
1016                   (char *arg_state, struct random_data *rand_state)
1017                   _GL_ARG_NONNULL ((1, 2)));
1018 #  endif
1019 _GL_CXXALIAS_SYS (setstate_r, int,
1020                   (char *arg_state, struct random_data *rand_state));
1021 # endif
1022 _GL_CXXALIASWARN (setstate_r);
1023 #elif defined GNULIB_POSIXCHECK
1024 # undef setstate_r
1025 # if HAVE_RAW_DECL_SETSTATE_R
1026 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1027                  "use gnulib module random_r for portability");
1028 # endif
1029 #endif
1030
1031
1032 #if 1
1033 # if 0
1034 #  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1035         || _GL_USE_STDLIB_ALLOC)
1036 #   undef realloc
1037 #   define realloc rpl_realloc
1038 #  endif
1039 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size));
1040 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
1041 # else
1042 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
1043 # endif
1044 _GL_CXXALIASWARN (realloc);
1045 #elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1046 # undef realloc
1047 /* Assume realloc is always declared.  */
1048 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
1049                  "use gnulib module realloc-posix for portability");
1050 #endif
1051
1052 #if 0
1053 # if 0
1054 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1055 #   define realpath rpl_realpath
1056 #  endif
1057 _GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved)
1058                                     _GL_ARG_NONNULL ((1)));
1059 _GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved));
1060 # else
1061 #  if !1
1062 _GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved)
1063                                     _GL_ARG_NONNULL ((1)));
1064 #  endif
1065 _GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved));
1066 # endif
1067 _GL_CXXALIASWARN (realpath);
1068 #elif defined GNULIB_POSIXCHECK
1069 # undef realpath
1070 # if HAVE_RAW_DECL_REALPATH
1071 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
1072                  "canonicalize or canonicalize-lgpl for portability");
1073 # endif
1074 #endif
1075
1076 #if 0
1077 /* Test a user response to a question.
1078    Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
1079 # if !1
1080 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
1081 # endif
1082 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
1083 _GL_CXXALIASWARN (rpmatch);
1084 #elif defined GNULIB_POSIXCHECK
1085 # undef rpmatch
1086 # if HAVE_RAW_DECL_RPMATCH
1087 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
1088                  "use gnulib module rpmatch for portability");
1089 # endif
1090 #endif
1091
1092 #if 0
1093 /* Look up NAME in the environment, returning 0 in insecure situations.  */
1094 # if !1
1095 _GL_FUNCDECL_SYS (secure_getenv, char *,
1096                   (char const *name) _GL_ARG_NONNULL ((1)));
1097 # endif
1098 _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
1099 _GL_CXXALIASWARN (secure_getenv);
1100 #elif defined GNULIB_POSIXCHECK
1101 # undef secure_getenv
1102 # if HAVE_RAW_DECL_SECURE_GETENV
1103 _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
1104                  "use gnulib module secure_getenv for portability");
1105 # endif
1106 #endif
1107
1108 #if IN_GREP_GNULIB_TESTS
1109 /* Set NAME to VALUE in the environment.
1110    If REPLACE is nonzero, overwrite an existing value.  */
1111 # if 0
1112 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1113 #   undef setenv
1114 #   define setenv rpl_setenv
1115 #  endif
1116 _GL_FUNCDECL_RPL (setenv, int,
1117                   (const char *name, const char *value, int replace)
1118                   _GL_ARG_NONNULL ((1)));
1119 _GL_CXXALIAS_RPL (setenv, int,
1120                   (const char *name, const char *value, int replace));
1121 # else
1122 #  if !1
1123 _GL_FUNCDECL_SYS (setenv, int,
1124                   (const char *name, const char *value, int replace)
1125                   _GL_ARG_NONNULL ((1)));
1126 #  endif
1127 _GL_CXXALIAS_SYS (setenv, int,
1128                   (const char *name, const char *value, int replace));
1129 # endif
1130 # if !(0 && !1)
1131 _GL_CXXALIASWARN (setenv);
1132 # endif
1133 #elif defined GNULIB_POSIXCHECK
1134 # undef setenv
1135 # if HAVE_RAW_DECL_SETENV
1136 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
1137                  "use gnulib module setenv for portability");
1138 # endif
1139 #endif
1140
1141 #if 0
1142  /* Parse a double from STRING, updating ENDP if appropriate.  */
1143 # if 0
1144 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1145 #   define strtod rpl_strtod
1146 #  endif
1147 _GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp)
1148                                   _GL_ARG_NONNULL ((1)));
1149 _GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp));
1150 # else
1151 #  if !1
1152 _GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp)
1153                                   _GL_ARG_NONNULL ((1)));
1154 #  endif
1155 _GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp));
1156 # endif
1157 _GL_CXXALIASWARN (strtod);
1158 #elif defined GNULIB_POSIXCHECK
1159 # undef strtod
1160 # if HAVE_RAW_DECL_STRTOD
1161 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
1162                  "use gnulib module strtod for portability");
1163 # endif
1164 #endif
1165
1166 #if 1
1167 /* Parse a signed integer whose textual representation starts at STRING.
1168    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1169    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1170    "0x").
1171    If ENDPTR is not NULL, the address of the first byte after the integer is
1172    stored in *ENDPTR.
1173    Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
1174    to ERANGE.  */
1175 # if !1
1176 _GL_FUNCDECL_SYS (strtoll, long long,
1177                   (const char *string, char **endptr, int base)
1178                   _GL_ARG_NONNULL ((1)));
1179 # endif
1180 _GL_CXXALIAS_SYS (strtoll, long long,
1181                   (const char *string, char **endptr, int base));
1182 _GL_CXXALIASWARN (strtoll);
1183 #elif defined GNULIB_POSIXCHECK
1184 # undef strtoll
1185 # if HAVE_RAW_DECL_STRTOLL
1186 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
1187                  "use gnulib module strtoll for portability");
1188 # endif
1189 #endif
1190
1191 #if 1
1192 /* Parse an unsigned integer whose textual representation starts at STRING.
1193    The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1194    it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1195    "0x").
1196    If ENDPTR is not NULL, the address of the first byte after the integer is
1197    stored in *ENDPTR.
1198    Upon overflow, the return value is ULLONG_MAX, and errno is set to
1199    ERANGE.  */
1200 # if !1
1201 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
1202                   (const char *string, char **endptr, int base)
1203                   _GL_ARG_NONNULL ((1)));
1204 # endif
1205 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
1206                   (const char *string, char **endptr, int base));
1207 _GL_CXXALIASWARN (strtoull);
1208 #elif defined GNULIB_POSIXCHECK
1209 # undef strtoull
1210 # if HAVE_RAW_DECL_STRTOULL
1211 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
1212                  "use gnulib module strtoull for portability");
1213 # endif
1214 #endif
1215
1216 #if 0
1217 /* Unlock the slave side of the pseudo-terminal whose master side is specified
1218    by FD, so that it can be opened.  */
1219 # if !1
1220 _GL_FUNCDECL_SYS (unlockpt, int, (int fd));
1221 # endif
1222 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
1223 _GL_CXXALIASWARN (unlockpt);
1224 #elif defined GNULIB_POSIXCHECK
1225 # undef unlockpt
1226 # if HAVE_RAW_DECL_UNLOCKPT
1227 _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
1228                  "use gnulib module unlockpt for portability");
1229 # endif
1230 #endif
1231
1232 #if IN_GREP_GNULIB_TESTS
1233 /* Remove the variable NAME from the environment.  */
1234 # if 1
1235 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1236 #   undef unsetenv
1237 #   define unsetenv rpl_unsetenv
1238 #  endif
1239 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1240 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
1241 # else
1242 #  if !1
1243 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1244 #  endif
1245 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
1246 # endif
1247 # if !(1 && !1)
1248 _GL_CXXALIASWARN (unsetenv);
1249 # endif
1250 #elif defined GNULIB_POSIXCHECK
1251 # undef unsetenv
1252 # if HAVE_RAW_DECL_UNSETENV
1253 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
1254                  "use gnulib module unsetenv for portability");
1255 # endif
1256 #endif
1257
1258 /* Convert a wide character to a multibyte character.  */
1259 #if 1
1260 # if 0
1261 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1262 #   undef wctomb
1263 #   define wctomb rpl_wctomb
1264 #  endif
1265 _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
1266 _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
1267 # else
1268 _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
1269 # endif
1270 _GL_CXXALIASWARN (wctomb);
1271 #endif
1272
1273
1274 #endif /* _GL_STDLIB_H */
1275 #endif /* _GL_STDLIB_H */
1276 #endif