1185377Ssam/* This file is automatically generated.  DO NOT EDIT! */
2187831Ssam/* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
3185377Ssam/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4185377Ssam
5185377Ssam/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
6185377Ssam/* A GNU-like <stdlib.h>.
7185377Ssam
8185377Ssam   Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc.
9185377Ssam
10185377Ssam   This file is free software: you can redistribute it and/or modify
11185377Ssam   it under the terms of the GNU Lesser General Public License as
12185377Ssam   published by the Free Software Foundation; either version 2.1 of the
13185377Ssam   License, or (at your option) any later version.
14185377Ssam
15185377Ssam   This file is distributed in the hope that it will be useful,
16185377Ssam   but WITHOUT ANY WARRANTY; without even the implied warranty of
17187611Ssam   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18185377Ssam   GNU Lesser General Public License for more details.
19185377Ssam
20185377Ssam   You should have received a copy of the GNU Lesser General Public License
21185377Ssam   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
22185377Ssam
23185377Ssam#if __GNUC__ >= 3
24185377Ssam#pragma GCC system_header
25185377Ssam#endif
26185377Ssam
27185377Ssam
28185377Ssam#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
29185377Ssam/* Special invocation conventions inside some gnulib header files,
30185377Ssam   and inside some glibc header files, respectively.  */
31185377Ssam
32185377Ssam#include_next <stdlib.h>
33185377Ssam
34185377Ssam#else
35185377Ssam/* Normal invocation convention.  */
36185377Ssam
37185377Ssam#ifndef _GL_STDLIB_H
38185377Ssam
39185377Ssam/* The include_next requires a split double-inclusion guard.  */
40185377Ssam#include_next <stdlib.h>
41185377Ssam
42185377Ssam#ifndef _GL_STDLIB_H
43187831Ssam#define _GL_STDLIB_H
44185377Ssam
45185377Ssam/* NetBSD 5.0 mis-defines NULL.  */
46185377Ssam#include <stddef.h>
47217930Sadrian
48219218Sadrian/* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.  */
49185377Ssam#if 0 && !defined WEXITSTATUS
50185377Ssam# include <sys/wait.h>
51187831Ssam#endif
52185377Ssam
53187831Ssam/* Solaris declares getloadavg() in <sys/loadavg.h>.  */
54185377Ssam#if (0 || defined GNULIB_POSIXCHECK) && 0
55185377Ssam/* OpenIndiana has a bug: <sys/time.h> must be included before
56185377Ssam   <sys/loadavg.h>.  */
57185377Ssam# include <sys/time.h>
58185377Ssam# include <sys/loadavg.h>
59187831Ssam#endif
60185377Ssam
61185377Ssam/* Native Windows platforms declare _mktemp() in <io.h>.  */
62185377Ssam#if defined _WIN32 && !defined __CYGWIN__
63187831Ssam# include <io.h>
64220738Sadrian#endif
65185377Ssam
66185377Ssam#if 0
67185377Ssam
68185377Ssam/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
69185377Ssam   from <stdlib.h> if _REENTRANT is defined.  Include it whenever we need
70185377Ssam   'struct random_data'.  */
71185377Ssam# if 1
72185377Ssam#  include <random.h>
73185377Ssam# endif
74185377Ssam
75185377Ssam# if !1 || 0 || !1
76187831Ssam#  include <stdint.h>
77187831Ssam# endif
78185377Ssam
79185377Ssam# if !1
80185377Ssam/* Define 'struct random_data'.
81185377Ssam   But allow multiple gnulib generated <stdlib.h> replacements to coexist.  */
82185377Ssam#  if !GNULIB_defined_struct_random_data
83185377Ssamstruct random_data
84185377Ssam{
85185377Ssam  int32_t *fptr;                /* Front pointer.  */
86185377Ssam  int32_t *rptr;                /* Rear pointer.  */
87185377Ssam  int32_t *state;               /* Array of state values.  */
88185377Ssam  int rand_type;                /* Type of random number generator.  */
89189747Ssam  int rand_deg;                 /* Degree of random number generator.  */
90219419Sadrian  int rand_sep;                 /* Distance between front and rear.  */
91185377Ssam  int32_t *end_ptr;             /* Pointer behind state table.  */
92185377Ssam};
93185377Ssam#   define GNULIB_defined_struct_random_data 1
94185377Ssam#  endif
95185377Ssam# endif
96185377Ssam#endif
97185377Ssam
98195135Sphk#if (0 || 0 || 1 || 0 || 0 || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
99185377Ssam/* On Mac OS X 10.3, only <unistd.h> declares mkstemp.  */
100185377Ssam/* On Mac OS X 10.5, only <unistd.h> declares mkstemps.  */
101185377Ssam/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps.  */
102185377Ssam/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt.  */
103185377Ssam/* But avoid namespace pollution on glibc systems and native Windows.  */
104185377Ssam# include <unistd.h>
105187831Ssam#endif
106185377Ssam
107185377Ssam/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
108185377Ssam   that can be freed by passing them as the Ith argument to the
109185377Ssam   function F.  */
110185377Ssam#ifndef _GL_ATTRIBUTE_DEALLOC
111185377Ssam# if __GNUC__ >= 11
112185377Ssam#  define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
113185377Ssam# else
114185377Ssam#  define _GL_ATTRIBUTE_DEALLOC(f, i)
115185377Ssam# endif
116185377Ssam#endif
117185377Ssam
118185377Ssam/* _GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
119185377Ssam   can be freed via 'free'; it can be used only after declaring 'free'.  */
120185377Ssam/* Applies to: functions.  Cannot be used on inline functions.  */
121185377Ssam#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
122185377Ssam# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
123185377Ssam#endif
124185377Ssam
125185377Ssam/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
126185377Ssam   allocated memory.  */
127185377Ssam/* Applies to: functions.  */
128185377Ssam#ifndef _GL_ATTRIBUTE_MALLOC
129185377Ssam# if __GNUC__ >= 3 || defined __clang__
130185377Ssam#  define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
131185377Ssam# else
132185377Ssam#  define _GL_ATTRIBUTE_MALLOC
133185377Ssam# endif
134185377Ssam#endif
135185377Ssam
136185377Ssam/* The __attribute__ feature is available in gcc versions 2.5 and later.
137185377Ssam   The attribute __pure__ was added in gcc 2.96.  */
138185377Ssam#ifndef _GL_ATTRIBUTE_PURE
139185377Ssam# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
140185377Ssam#  define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
141185377Ssam# else
142185377Ssam#  define _GL_ATTRIBUTE_PURE /* empty */
143185377Ssam# endif
144185377Ssam#endif
145185377Ssam
146185377Ssam/* The definition of _Noreturn is copied here.  */
147219419Sadrian/* A C macro for declaring that a function does not return.
148221163Sadrian   Copyright (C) 2011-2022 Free Software Foundation, Inc.
149221875Sadrian
150225444Sadrian   This program is free software: you can redistribute it and/or modify it
151219419Sadrian   under the terms of the GNU Lesser General Public License as published
152220738Sadrian   by the Free Software Foundation; either version 2 of the License, or
153220738Sadrian   (at your option) any later version.
154220738Sadrian
155185377Ssam   This program is distributed in the hope that it will be useful,
156185377Ssam   but WITHOUT ANY WARRANTY; without even the implied warranty of
157185377Ssam   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
158185377Ssam   Lesser General Public License for more details.
159185377Ssam
160219419Sadrian   You should have received a copy of the GNU Lesser General Public License
161219419Sadrian   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
162225444Sadrian
163219419Sadrian#ifndef _Noreturn
164185377Ssam# if (defined __cplusplus \
165208711Srpaulo      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
166208711Srpaulo          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
167185377Ssam      && 0)
168189747Ssam    /* [[noreturn]] is not practically usable, because with it the syntax
169185377Ssam         extern _Noreturn void func (...);
170222301Sadrian       would not be valid; such a declaration would only be valid with 'extern'
171222301Sadrian       and '_Noreturn' swapped, or without the 'extern' keyword.  However, some
172222301Sadrian       AIX system header files and several gnulib header files use precisely
173222301Sadrian       this syntax with 'extern'.  */
174222301Sadrian#  define _Noreturn [[noreturn]]
175222301Sadrian# elif ((!defined __cplusplus || defined __clang__) \
176222301Sadrian        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
177222301Sadrian            || (!defined __STRICT_ANSI__ \
178222301Sadrian                && (4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
179222301Sadrian                    || (defined __apple_build_version__ \
180222301Sadrian                        ? 6000000 <= __apple_build_version__ \
181219218Sadrian                        : 3 < __clang_major__ + (5 <= __clang_minor__))))))
182219218Sadrian   /* _Noreturn works as-is.  */
183219218Sadrian# elif (2 < __GNUC__ + (8 <= __GNUC_MINOR__) || defined __clang__ \
184185377Ssam        || 0x5110 <= __SUNPRO_C)
185187831Ssam#  define _Noreturn __attribute__ ((__noreturn__))
186185377Ssam# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
187185377Ssam#  define _Noreturn __declspec (noreturn)
188185377Ssam# else
189221163Sadrian#  define _Noreturn
190221163Sadrian# endif
191221163Sadrian#endif
192221163Sadrian
193221163Sadrian/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
194221163Sadrian/* C++ compatible function declaration macros.
195225444Sadrian   Copyright (C) 2010-2022 Free Software Foundation, Inc.
196221163Sadrian
197225444Sadrian   This program is free software: you can redistribute it and/or modify it
198221163Sadrian   under the terms of the GNU Lesser General Public License as published
199221163Sadrian   by the Free Software Foundation; either version 2 of the License, or
200185377Ssam   (at your option) any later version.
201185377Ssam
202185377Ssam   This program is distributed in the hope that it will be useful,
203185377Ssam   but WITHOUT ANY WARRANTY; without even the implied warranty of
204185377Ssam   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
205217879Sadrian   Lesser General Public License for more details.
206217930Sadrian
207217930Sadrian   You should have received a copy of the GNU Lesser General Public License
208217930Sadrian   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
209217930Sadrian
210217930Sadrian#ifndef _GL_CXXDEFS_H
211217879Sadrian#define _GL_CXXDEFS_H
212217879Sadrian
213217879Sadrian/* Begin/end the GNULIB_NAMESPACE namespace.  */
214217879Sadrian#if defined __cplusplus && defined GNULIB_NAMESPACE
215221206Sadrian# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
216221837Sadrian# define _GL_END_NAMESPACE }
217221837Sadrian#else
218221837Sadrian# define _GL_BEGIN_NAMESPACE
219221837Sadrian# define _GL_END_NAMESPACE
220221837Sadrian#endif
221185377Ssam
222185377Ssam/* The three most frequent use cases of these macros are:
223203930Srpaulo
224185377Ssam   * For providing a substitute for a function that is missing on some
225185377Ssam     platforms, but is declared and works fine on the platforms on which
226185377Ssam     it exists:
227185377Ssam
228185377Ssam       #if @GNULIB_FOO@
229185377Ssam       # if !@HAVE_FOO@
230189747Ssam       _GL_FUNCDECL_SYS (foo, ...);
231189747Ssam       # endif
232185377Ssam       _GL_CXXALIAS_SYS (foo, ...);
233185377Ssam       _GL_CXXALIASWARN (foo);
234185377Ssam       #elif defined GNULIB_POSIXCHECK
235185377Ssam       ...
236185377Ssam       #endif
237185377Ssam
238187831Ssam   * For providing a replacement for a function that exists on all platforms,
239187831Ssam     but is broken/insufficient and needs to be replaced on some platforms:
240185377Ssam
241189747Ssam       #if @GNULIB_FOO@
242185377Ssam       # if @REPLACE_FOO@
243185377Ssam       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
244203930Srpaulo       #   undef foo
245185377Ssam       #   define foo rpl_foo
246185377Ssam       #  endif
247185377Ssam       _GL_FUNCDECL_RPL (foo, ...);
248185377Ssam       _GL_CXXALIAS_RPL (foo, ...);
249185377Ssam       # else
250185377Ssam       _GL_CXXALIAS_SYS (foo, ...);
251185377Ssam       # endif
252185377Ssam       _GL_CXXALIASWARN (foo);
253185377Ssam       #elif defined GNULIB_POSIXCHECK
254185377Ssam       ...
255185377Ssam       #endif
256185377Ssam
257185377Ssam   * For providing a replacement for a function that exists on some platforms
258185377Ssam     but is broken/insufficient and needs to be replaced on some of them and
259185377Ssam     is additionally either missing or undeclared on some other platforms:
260185377Ssam
261185377Ssam       #if @GNULIB_FOO@
262185377Ssam       # if @REPLACE_FOO@
263185377Ssam       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
264185377Ssam       #   undef foo
265221479Sadrian       #   define foo rpl_foo
266221479Sadrian       #  endif
267221479Sadrian       _GL_FUNCDECL_RPL (foo, ...);
268221479Sadrian       _GL_CXXALIAS_RPL (foo, ...);
269221479Sadrian       # else
270221479Sadrian       #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
271185377Ssam       _GL_FUNCDECL_SYS (foo, ...);
272222301Sadrian       #  endif
273222301Sadrian       _GL_CXXALIAS_SYS (foo, ...);
274222301Sadrian       # endif
275222301Sadrian       _GL_CXXALIASWARN (foo);
276222301Sadrian       #elif defined GNULIB_POSIXCHECK
277222301Sadrian       ...
278185377Ssam       #endif
279185377Ssam*/
280185377Ssam
281185377Ssam/* _GL_EXTERN_C declaration;
282185377Ssam   performs the declaration with C linkage.  */
283185377Ssam#if defined __cplusplus
284185377Ssam# define _GL_EXTERN_C extern "C"
285185377Ssam#else
286185377Ssam# define _GL_EXTERN_C extern
287185377Ssam#endif
288185377Ssam
289185377Ssam/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
290221766Sadrian   declares a replacement function, named rpl_func, with the given prototype,
291221766Sadrian   consisting of return type, parameters, and attributes.
292221766Sadrian   Example:
293187831Ssam     _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
294185377Ssam                                  _GL_ARG_NONNULL ((1)));
295185377Ssam */
296185377Ssam#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
297185377Ssam  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
298185377Ssam#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
299185377Ssam  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
300185377Ssam
301185377Ssam/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
302185377Ssam   declares the system function, named func, with the given prototype,
303185377Ssam   consisting of return type, parameters, and attributes.
304219770Sadrian   Example:
305185377Ssam     _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
306185377Ssam                                  _GL_ARG_NONNULL ((1)));
307185377Ssam */
308185377Ssam#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
309221617Sadrian  _GL_EXTERN_C rettype func parameters_and_attributes
310185377Ssam
311185377Ssam/* _GL_CXXALIAS_RPL (func, rettype, parameters);
312222301Sadrian   declares a C++ alias called GNULIB_NAMESPACE::func
313222301Sadrian   that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
314222301Sadrian   Example:
315222301Sadrian     _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
316222301Sadrian
317222301Sadrian   Wrapping rpl_func in an object with an inline conversion operator
318222301Sadrian   avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
319222301Sadrian   actually used in the program.  */
320222301Sadrian#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
321222301Sadrian  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
322222301Sadrian#if defined __cplusplus && defined GNULIB_NAMESPACE
323222301Sadrian# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
324222301Sadrian    namespace GNULIB_NAMESPACE                                \
325222301Sadrian    {                                                         \
326222301Sadrian      static const struct _gl_ ## func ## _wrapper            \
327222301Sadrian      {                                                       \
328222301Sadrian        typedef rettype (*type) parameters;                   \
329222301Sadrian                                                              \
330222301Sadrian        inline operator type () const                         \
331222301Sadrian        {                                                     \
332222301Sadrian          return ::rpl_func;                                  \
333222301Sadrian        }                                                     \
334222301Sadrian      } func = {};                                            \
335222301Sadrian    }                                                         \
336222301Sadrian    _GL_EXTERN_C int _gl_cxxalias_dummy
337222301Sadrian#else
338222301Sadrian# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
339222301Sadrian    _GL_EXTERN_C int _gl_cxxalias_dummy
340222301Sadrian#endif
341222301Sadrian
342222301Sadrian/* _GL_CXXALIAS_MDA (func, rettype, parameters);
343222301Sadrian   is to be used when func is a Microsoft deprecated alias, on native Windows.
344222301Sadrian   It declares a C++ alias called GNULIB_NAMESPACE::func
345222301Sadrian   that redirects to _func, if GNULIB_NAMESPACE is defined.
346222301Sadrian   Example:
347185377Ssam     _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
348185377Ssam */
349185377Ssam#define _GL_CXXALIAS_MDA(func,rettype,parameters) \
350185377Ssam  _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
351185377Ssam
352185377Ssam/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
353185377Ssam   is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
354185377Ssam   except that the C function rpl_func may have a slightly different
355185377Ssam   declaration.  A cast is used to silence the "invalid conversion" error
356185377Ssam   that would otherwise occur.  */
357185377Ssam#if defined __cplusplus && defined GNULIB_NAMESPACE
358185377Ssam# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
359185377Ssam    namespace GNULIB_NAMESPACE                                     \
360220188Sadrian    {                                                              \
361185377Ssam      static const struct _gl_ ## func ## _wrapper                 \
362219975Sadrian      {                                                            \
363185377Ssam        typedef rettype (*type) parameters;                        \
364185377Ssam                                                                   \
365219975Sadrian        inline operator type () const                              \
366219975Sadrian        {                                                          \
367225444Sadrian          return reinterpret_cast<type>(::rpl_func);               \
368185377Ssam        }                                                          \
369185377Ssam      } func = {};                                                 \
370185377Ssam    }                                                              \
371185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
372185377Ssam#else
373185377Ssam# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
374185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
375185377Ssam#endif
376185377Ssam
377185377Ssam/* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
378185377Ssam   is like  _GL_CXXALIAS_MDA (func, rettype, parameters);
379185377Ssam   except that the C function func may have a slightly different declaration.
380185377Ssam   A cast is used to silence the "invalid conversion" error that would
381185377Ssam   otherwise occur.  */
382185377Ssam#define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
383185377Ssam  _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
384185377Ssam
385185377Ssam/* _GL_CXXALIAS_SYS (func, rettype, parameters);
386185377Ssam   declares a C++ alias called GNULIB_NAMESPACE::func
387185377Ssam   that redirects to the system provided function func, if GNULIB_NAMESPACE
388217882Sadrian   is defined.
389217882Sadrian   Example:
390185377Ssam     _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
391185377Ssam
392187831Ssam   Wrapping func in an object with an inline conversion operator
393187831Ssam   avoids a reference to func unless GNULIB_NAMESPACE::func is
394185377Ssam   actually used in the program.  */
395221479Sadrian#if defined __cplusplus && defined GNULIB_NAMESPACE
396221479Sadrian# define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
397221479Sadrian    namespace GNULIB_NAMESPACE                                \
398221479Sadrian    {                                                         \
399221479Sadrian      static const struct _gl_ ## func ## _wrapper            \
400221479Sadrian      {                                                       \
401221479Sadrian        typedef rettype (*type) parameters;                   \
402221479Sadrian                                                              \
403221479Sadrian        inline operator type () const                         \
404221479Sadrian        {                                                     \
405221479Sadrian          return ::func;                                      \
406221479Sadrian        }                                                     \
407221479Sadrian      } func = {};                                            \
408185377Ssam    }                                                         \
409185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
410185377Ssam#else
411185377Ssam# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
412185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
413185377Ssam#endif
414185377Ssam
415187611Ssam/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
416185377Ssam   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
417185377Ssam   except that the C function func may have a slightly different declaration.
418185377Ssam   A cast is used to silence the "invalid conversion" error that would
419185377Ssam   otherwise occur.  */
420185377Ssam#if defined __cplusplus && defined GNULIB_NAMESPACE
421185377Ssam# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
422185377Ssam    namespace GNULIB_NAMESPACE                          \
423185377Ssam    {                                                   \
424185377Ssam      static const struct _gl_ ## func ## _wrapper      \
425185377Ssam      {                                                 \
426185377Ssam        typedef rettype (*type) parameters;             \
427185377Ssam                                                        \
428185377Ssam        inline operator type () const                   \
429185377Ssam        {                                               \
430187831Ssam          return reinterpret_cast<type>(::func);        \
431185377Ssam        }                                               \
432185377Ssam      } func = {};                                      \
433185377Ssam    }                                                   \
434185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
435185377Ssam#else
436185377Ssam# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
437185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
438185377Ssam#endif
439185377Ssam
440185377Ssam/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
441185377Ssam   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
442185377Ssam   except that the C function is picked among a set of overloaded functions,
443185377Ssam   namely the one with rettype2 and parameters2.  Two consecutive casts
444185377Ssam   are used to silence the "cannot find a match" and "invalid conversion"
445185377Ssam   errors that would otherwise occur.  */
446185377Ssam#if defined __cplusplus && defined GNULIB_NAMESPACE
447185377Ssam  /* The outer cast must be a reinterpret_cast.
448185377Ssam     The inner cast: When the function is defined as a set of overloaded
449185377Ssam     functions, it works as a static_cast<>, choosing the designated variant.
450185377Ssam     When the function is defined as a single variant, it works as a
451185377Ssam     reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
452185377Ssam# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
453185377Ssam    namespace GNULIB_NAMESPACE                                                \
454185377Ssam    {                                                                         \
455185377Ssam      static const struct _gl_ ## func ## _wrapper                            \
456185377Ssam      {                                                                       \
457185377Ssam        typedef rettype (*type) parameters;                                   \
458185377Ssam                                                                              \
459185377Ssam        inline operator type () const                                         \
460185377Ssam        {                                                                     \
461185377Ssam          return reinterpret_cast<type>((rettype2 (*) parameters2)(::func));  \
462185377Ssam        }                                                                     \
463185377Ssam      } func = {};                                                            \
464185377Ssam    }                                                                         \
465187831Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
466185377Ssam#else
467185377Ssam# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
468185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
469219474Sadrian#endif
470185377Ssam
471185377Ssam/* _GL_CXXALIASWARN (func);
472185377Ssam   causes a warning to be emitted when ::func is used but not when
473185377Ssam   GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
474185377Ssam   variants.  */
475185377Ssam#if defined __cplusplus && defined GNULIB_NAMESPACE
476185377Ssam# define _GL_CXXALIASWARN(func) \
477185377Ssam   _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
478185377Ssam# define _GL_CXXALIASWARN_1(func,namespace) \
479185377Ssam   _GL_CXXALIASWARN_2 (func, namespace)
480185377Ssam/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
481185377Ssam   we enable the warning only when not optimizing.  */
482185377Ssam# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
483185377Ssam#  define _GL_CXXALIASWARN_2(func,namespace) \
484185377Ssam    _GL_WARN_ON_USE (func, \
485185377Ssam                     "The symbol ::" #func " refers to the system function. " \
486185377Ssam                     "Use " #namespace "::" #func " instead.")
487185377Ssam# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
488185377Ssam#  define _GL_CXXALIASWARN_2(func,namespace) \
489185377Ssam     extern __typeof__ (func) func
490185377Ssam# else
491185377Ssam#  define _GL_CXXALIASWARN_2(func,namespace) \
492185377Ssam     _GL_EXTERN_C int _gl_cxxalias_dummy
493187831Ssam# endif
494187831Ssam#else
495187831Ssam# define _GL_CXXALIASWARN(func) \
496187831Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
497185377Ssam#endif
498185377Ssam
499185377Ssam/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
500185377Ssam   causes a warning to be emitted when the given overloaded variant of ::func
501187831Ssam   is used but not when GNULIB_NAMESPACE::func is used.  */
502187831Ssam#if defined __cplusplus && defined GNULIB_NAMESPACE
503185377Ssam# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
504187831Ssam   _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
505225444Sadrian                        GNULIB_NAMESPACE)
506187831Ssam# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
507185377Ssam   _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
508185377Ssam/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
509185377Ssam   we enable the warning only when not optimizing.  */
510185377Ssam# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
511185377Ssam#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
512185377Ssam    _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
513185377Ssam                         "The symbol ::" #func " refers to the system function. " \
514204579Srpaulo                         "Use " #namespace "::" #func " instead.")
515185377Ssam# else
516185377Ssam#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
517185377Ssam     _GL_EXTERN_C int _gl_cxxalias_dummy
518185377Ssam# endif
519185377Ssam#else
520185377Ssam# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
521185377Ssam    _GL_EXTERN_C int _gl_cxxalias_dummy
522185377Ssam#endif
523185377Ssam
524185377Ssam#endif /* _GL_CXXDEFS_H */
525185377Ssam
526185377Ssam/* The definition of _GL_ARG_NONNULL is copied here.  */
527185377Ssam/* A C macro for declaring that specific arguments must not be NULL.
528185377Ssam   Copyright (C) 2009-2022 Free Software Foundation, Inc.
529185377Ssam
530185377Ssam   This program is free software: you can redistribute it and/or modify it
531185377Ssam   under the terms of the GNU Lesser General Public License as published
532185377Ssam   by the Free Software Foundation; either version 2 of the License, or
533204521Srpaulo   (at your option) any later version.
534204521Srpaulo
535204521Srpaulo   This program is distributed in the hope that it will be useful,
536204579Srpaulo   but WITHOUT ANY WARRANTY; without even the implied warranty of
537185377Ssam   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
538185377Ssam   Lesser General Public License for more details.
539185377Ssam
540185377Ssam   You should have received a copy of the GNU Lesser General Public License
541185377Ssam   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
542185377Ssam
543185377Ssam/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
544185377Ssam   that the values passed as arguments n, ..., m must be non-NULL pointers.
545185377Ssam   n = 1 stands for the first argument, n = 2 for the second argument etc.  */
546185377Ssam#ifndef _GL_ARG_NONNULL
547220294Sadrian# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
548220294Sadrian#  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
549220294Sadrian# else
550220294Sadrian#  define _GL_ARG_NONNULL(params)
551220294Sadrian# endif
552220294Sadrian#endif
553220294Sadrian
554220294Sadrian/* The definition of _GL_WARN_ON_USE is copied here.  */
555220294Sadrian/* A C macro for emitting warnings if a function is used.
556185377Ssam   Copyright (C) 2010-2022 Free Software Foundation, Inc.
557185377Ssam
558185377Ssam   This program is free software: you can redistribute it and/or modify it
559187831Ssam   under the terms of the GNU Lesser General Public License as published
560185377Ssam   by the Free Software Foundation; either version 2 of the License, or
561185377Ssam   (at your option) any later version.
562185377Ssam
563185377Ssam   This program is distributed in the hope that it will be useful,
564185377Ssam   but WITHOUT ANY WARRANTY; without even the implied warranty of
565185377Ssam   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
566185377Ssam   Lesser General Public License for more details.
567185377Ssam
568185377Ssam   You should have received a copy of the GNU Lesser General Public License
569187831Ssam   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
570185377Ssam
571185377Ssam/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
572185377Ssam   for FUNCTION which will then trigger a compiler warning containing
573185377Ssam   the text of "literal string" anywhere that function is called, if
574185377Ssam   supported by the compiler.  If the compiler does not support this
575185377Ssam   feature, the macro expands to an unused extern declaration.
576185377Ssam
577187831Ssam   _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
578185377Ssam   attribute used in _GL_WARN_ON_USE.  If the compiler does not support
579185377Ssam   this feature, it expands to empty.
580185377Ssam
581185377Ssam   These macros are useful for marking a function as a potential
582185377Ssam   portability trap, with the intent that "literal string" include
583185377Ssam   instructions on the replacement function that should be used
584185380Ssam   instead.
585185380Ssam   _GL_WARN_ON_USE is for functions with 'extern' linkage.
586185377Ssam   _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
587185377Ssam   linkage.
588187831Ssam
589185377Ssam   However, one of the reasons that a function is a portability trap is
590187831Ssam   if it has the wrong signature.  Declaring FUNCTION with a different
591185377Ssam   signature in C is a compilation error, so this macro must use the
592185377Ssam   same type as any existing declaration so that programs that avoid
593185377Ssam   the problematic FUNCTION do not fail to compile merely because they
594185377Ssam   included a header that poisoned the function.  But this implies that
595185377Ssam   _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
596185377Ssam   have a declaration.  Use of this macro implies that there must not
597185377Ssam   be any other macro hiding the declaration of FUNCTION; but
598185377Ssam   undefining FUNCTION first is part of the poisoning process anyway
599185377Ssam   (although for symbols that are provided only via a macro, the result
600185377Ssam   is a compilation error rather than a warning containing
601185377Ssam   "literal string").  Also note that in C++, it is only safe to use if
602185377Ssam   FUNCTION has no overloads.
603185377Ssam
604185377Ssam   For an example, it is possible to poison 'getline' by:
605185377Ssam   - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
606185377Ssam     [getline]) in configure.ac, which potentially defines
607185377Ssam     HAVE_RAW_DECL_GETLINE
608185377Ssam   - adding this code to a header that wraps the system <stdio.h>:
609185377Ssam     #undef getline
610185377Ssam     #if HAVE_RAW_DECL_GETLINE
611185377Ssam     _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
612220188Sadrian       "not universally present; use the gnulib module getline");
613221163Sadrian     #endif
614185377Ssam
615185377Ssam   It is not possible to directly poison global variables.  But it is
616221163Sadrian   possible to write a wrapper accessor function, and poison that
617185377Ssam   (less common usage, like &environ, will cause a compilation error
618221163Sadrian   rather than issue the nice warning, but the end result of informing
619185377Ssam   the developer about their portability problem is still achieved):
620185377Ssam     #if HAVE_RAW_DECL_ENVIRON
621185377Ssam     static char ***
622221163Sadrian     rpl_environ (void) { return &environ; }
623221163Sadrian     _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
624221163Sadrian     # undef environ
625221163Sadrian     # define environ (*rpl_environ ())
626221163Sadrian     #endif
627221163Sadrian   or better (avoiding contradictory use of 'static' and 'extern'):
628221163Sadrian     #if HAVE_RAW_DECL_ENVIRON
629221163Sadrian     static char ***
630221163Sadrian     _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
631221163Sadrian     rpl_environ (void) { return &environ; }
632185377Ssam     # undef environ
633185377Ssam     # define environ (*rpl_environ ())
634185377Ssam     #endif
635187831Ssam   */
636185377Ssam#ifndef _GL_WARN_ON_USE
637185377Ssam
638185377Ssam# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
639185377Ssam/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
640185377Ssam#  define _GL_WARN_ON_USE(function, message) \
641185377Ssam_GL_WARN_EXTERN_C __typeof__ (function) function __attribute__ ((__warning__ (message)))
642185377Ssam#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
643185377Ssam  __attribute__ ((__warning__ (message)))
644185377Ssam# elif __clang_major__ >= 4
645185377Ssam/* Another compiler attribute is available in clang.  */
646185377Ssam#  define _GL_WARN_ON_USE(function, message) \
647185377Ssam_GL_WARN_EXTERN_C __typeof__ (function) function \
648185377Ssam  __attribute__ ((__diagnose_if__ (1, message, "warning")))
649185377Ssam#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
650185377Ssam  __attribute__ ((__diagnose_if__ (1, message, "warning")))
651185377Ssam# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
652185377Ssam/* Verify the existence of the function.  */
653185377Ssam#  define _GL_WARN_ON_USE(function, message) \
654185377Ssam_GL_WARN_EXTERN_C __typeof__ (function) function
655185377Ssam#  define _GL_WARN_ON_USE_ATTRIBUTE(message)
656185377Ssam# else /* Unsupported.  */
657185377Ssam#  define _GL_WARN_ON_USE(function, message) \
658185377Ssam_GL_WARN_EXTERN_C int _gl_warn_on_use
659185377Ssam#  define _GL_WARN_ON_USE_ATTRIBUTE(message)
660185377Ssam# endif
661185377Ssam#endif
662185377Ssam
663185377Ssam/* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
664185377Ssam   is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
665185377Ssam   function is declared with the given prototype, consisting of return type,
666185377Ssam   parameters, and attributes.
667185377Ssam   This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
668185377Ssam   not work in this case.  */
669219771Sadrian#ifndef _GL_WARN_ON_USE_CXX
670185377Ssam# if !defined __cplusplus
671185377Ssam#  define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
672185377Ssam     _GL_WARN_ON_USE (function, msg)
673185377Ssam# else
674185377Ssam#  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
675185377Ssam/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
676185377Ssam#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
677185377Ssamextern rettype_gcc function parameters_and_attributes \
678185377Ssam  __attribute__ ((__warning__ (msg)))
679185377Ssam#  elif __clang_major__ >= 4
680220772Sadrian/* Another compiler attribute is available in clang.  */
681220772Sadrian#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
682185377Ssamextern rettype_clang function parameters_and_attributes \
683185377Ssam  __attribute__ ((__diagnose_if__ (1, msg, "warning")))
684219855Sadrian#  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
685219855Sadrian/* Verify the existence of the function.  */
686219855Sadrian#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
687219855Sadrianextern rettype_gcc function parameters_and_attributes
688219855Sadrian#  else /* Unsupported.  */
689219855Sadrian#   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
690219855Sadrian_GL_WARN_EXTERN_C int _gl_warn_on_use
691219855Sadrian#  endif
692219855Sadrian# endif
693219855Sadrian#endif
694219855Sadrian
695219855Sadrian/* _GL_WARN_EXTERN_C declaration;
696219855Sadrian   performs the declaration with C linkage.  */
697219855Sadrian#ifndef _GL_WARN_EXTERN_C
698219855Sadrian# if defined __cplusplus
699219855Sadrian#  define _GL_WARN_EXTERN_C extern "C"
700219855Sadrian# else
701219855Sadrian#  define _GL_WARN_EXTERN_C extern
702219855Sadrian# endif
703219855Sadrian#endif
704219855Sadrian
705219855Sadrian
706219855Sadrian/* Some systems do not define EXIT_*, despite otherwise supporting C89.  */
707185377Ssam#ifndef EXIT_SUCCESS
708185377Ssam# define EXIT_SUCCESS 0
709185377Ssam#endif
710185377Ssam/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
711187831Ssam   with proper operation of xargs.  */
712185377Ssam#ifndef EXIT_FAILURE
713187831Ssam# define EXIT_FAILURE 1
714185377Ssam#elif EXIT_FAILURE != 1
715185377Ssam# undef EXIT_FAILURE
716185377Ssam# define EXIT_FAILURE 1
717221875Sadrian#endif
718185377Ssam
719185377Ssam
720185377Ssam#if 0
721185377Ssam/* Terminate the current process with the given return code, without running
722185377Ssam   the 'atexit' handlers.  */
723185377Ssam# if !1
724185377Ssam_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
725185377Ssam# endif
726185377Ssam_GL_CXXALIAS_SYS (_Exit, void, (int status));
727185377Ssam_GL_CXXALIASWARN (_Exit);
728185377Ssam#elif defined GNULIB_POSIXCHECK
729185377Ssam# undef _Exit
730221620Sadrian# if HAVE_RAW_DECL__EXIT
731221620Sadrian_GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
732221620Sadrian                 "use gnulib module _Exit for portability");
733221620Sadrian# endif
734220990Sadrian#endif
735185377Ssam
736185377Ssam
737185377Ssam#if 1
738185377Ssam# if 1
739185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
740185377Ssam#   undef free
741185377Ssam#   define free rpl_free
742221620Sadrian#  endif
743189747Ssam#  if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
744185377Ssam_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ());
745185377Ssam#  else
746185377Ssam_GL_FUNCDECL_RPL (free, void, (void *ptr));
747185377Ssam#  endif
748185377Ssam_GL_CXXALIAS_RPL (free, void, (void *ptr));
749185377Ssam# else
750185377Ssam_GL_CXXALIAS_SYS (free, void, (void *ptr));
751185377Ssam# endif
752185377Ssam# if __GLIBC__ >= 2
753185377Ssam_GL_CXXALIASWARN (free);
754185377Ssam# endif
755185377Ssam#elif defined GNULIB_POSIXCHECK
756185377Ssam# undef free
757185377Ssam/* Assume free is always declared.  */
758185377Ssam_GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
759185377Ssam                 "use gnulib module free for portability");
760185377Ssam#endif
761185377Ssam
762185377Ssam
763185377Ssam/* Allocate memory with indefinite extent and specified alignment.  */
764185377Ssam#if 0
765185377Ssam# if 0
766185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
767185377Ssam#   undef aligned_alloc
768185377Ssam#   define aligned_alloc rpl_aligned_alloc
769185377Ssam#  endif
770185377Ssam_GL_FUNCDECL_RPL (aligned_alloc, void *,
771185377Ssam                  (size_t alignment, size_t size)
772185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
773185377Ssam_GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
774185377Ssam# else
775185377Ssam#  if 1
776185377Ssam#   if __GNUC__ >= 11
777185377Ssam/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free.  */
778185377Ssam_GL_FUNCDECL_SYS (aligned_alloc, void *,
779185377Ssam                  (size_t alignment, size_t size)
780185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
781187831Ssam#   endif
782185377Ssam_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
783185377Ssam#  endif
784185377Ssam# endif
785188975Ssam# if 1
786185377Ssam_GL_CXXALIASWARN (aligned_alloc);
787185377Ssam# endif
788185377Ssam#else
789185377Ssam# if 1 && __GNUC__ >= 11 && !defined aligned_alloc
790185377Ssam/* For -Wmismatched-dealloc: Associate aligned_alloc with free or rpl_free.  */
791188975Ssam_GL_FUNCDECL_SYS (aligned_alloc, void *,
792188975Ssam                  (size_t alignment, size_t size)
793188975Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
794188975Ssam# endif
795188975Ssam# if defined GNULIB_POSIXCHECK
796188975Ssam#  undef aligned_alloc
797188975Ssam#  if HAVE_RAW_DECL_ALIGNED_ALLOC
798185377Ssam_GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
799185377Ssam                 "use gnulib module aligned_alloc for portability");
800185377Ssam#  endif
801185377Ssam# endif
802185377Ssam#endif
803185377Ssam
804185377Ssam#if 0
805187831Ssam/* Parse a signed decimal integer.
806185377Ssam   Returns the value of the integer.  Errors are not detected.  */
807185377Ssam# if !1
808185377Ssam_GL_FUNCDECL_SYS (atoll, long long, (const char *string)
809185377Ssam                                    _GL_ATTRIBUTE_PURE
810185377Ssam                                    _GL_ARG_NONNULL ((1)));
811185377Ssam# endif
812187831Ssam_GL_CXXALIAS_SYS (atoll, long long, (const char *string));
813185377Ssam_GL_CXXALIASWARN (atoll);
814185377Ssam#elif defined GNULIB_POSIXCHECK
815185377Ssam# undef atoll
816185377Ssam# if HAVE_RAW_DECL_ATOLL
817185377Ssam_GL_WARN_ON_USE (atoll, "atoll is unportable - "
818185377Ssam                 "use gnulib module atoll for portability");
819185377Ssam# endif
820185377Ssam#endif
821185377Ssam
822185377Ssam#if 0
823185377Ssam# if (0 && 0) \
824185377Ssam     || (0 && 0)
825185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
826185377Ssam#   undef calloc
827185377Ssam#   define calloc rpl_calloc
828185377Ssam#  endif
829185377Ssam_GL_FUNCDECL_RPL (calloc, void *,
830185377Ssam                  (size_t nmemb, size_t size)
831185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
832185377Ssam_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
833185377Ssam# else
834185377Ssam#  if __GNUC__ >= 11
835185377Ssam/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free.  */
836185377Ssam_GL_FUNCDECL_SYS (calloc, void *,
837185377Ssam                  (size_t nmemb, size_t size)
838185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
839185377Ssam#  endif
840185377Ssam_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
841219474Sadrian# endif
842185377Ssam# if __GLIBC__ >= 2
843185377Ssam_GL_CXXALIASWARN (calloc);
844185377Ssam# endif
845185377Ssam#else
846187831Ssam# if 1 && __GNUC__ >= 11 && !defined calloc
847187831Ssam/* For -Wmismatched-dealloc: Associate calloc with free or rpl_free.  */
848185377Ssam_GL_FUNCDECL_SYS (calloc, void *,
849185377Ssam                  (size_t nmemb, size_t size)
850185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
851185377Ssam# endif
852185377Ssam# if defined GNULIB_POSIXCHECK
853185377Ssam#  undef calloc
854185377Ssam/* Assume calloc is always declared.  */
855187831Ssam_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
856187831Ssam                 "use gnulib module calloc-posix for portability");
857187831Ssam# endif
858187831Ssam#endif
859187831Ssam
860187831Ssam#if 1
861187831Ssam# if 0
862187831Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
863187831Ssam#   define canonicalize_file_name rpl_canonicalize_file_name
864187831Ssam#  endif
865185377Ssam_GL_FUNCDECL_RPL (canonicalize_file_name, char *,
866187831Ssam                  (const char *name)
867187831Ssam                  _GL_ARG_NONNULL ((1))
868187831Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
869185377Ssam_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
870185377Ssam# else
871185377Ssam#  if !0 || __GNUC__ >= 11
872185377Ssam_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
873220988Sadrian                  (const char *name)
874220988Sadrian                  _GL_ARG_NONNULL ((1))
875220988Sadrian                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
876220988Sadrian#  endif
877220988Sadrian_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
878220988Sadrian# endif
879220988Sadrian# ifndef GNULIB_defined_canonicalize_file_name
880220988Sadrian#  define GNULIB_defined_canonicalize_file_name \
881220988Sadrian     (!0 || 0)
882220988Sadrian# endif
883220988Sadrian_GL_CXXALIASWARN (canonicalize_file_name);
884220988Sadrian#else
885220988Sadrian# if 1 && __GNUC__ >= 11 && !defined canonicalize_file_name
886220988Sadrian/* For -Wmismatched-dealloc: Associate canonicalize_file_name with free or
887220988Sadrian   rpl_free.  */
888220988Sadrian_GL_FUNCDECL_SYS (canonicalize_file_name, char *,
889220988Sadrian                  (const char *name)
890220988Sadrian                  _GL_ARG_NONNULL ((1))
891220988Sadrian                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
892220988Sadrian# endif
893220988Sadrian# if defined GNULIB_POSIXCHECK
894220988Sadrian#  undef canonicalize_file_name
895220988Sadrian#  if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
896220988Sadrian_GL_WARN_ON_USE (canonicalize_file_name,
897220988Sadrian                 "canonicalize_file_name is unportable - "
898220988Sadrian                 "use gnulib module canonicalize-lgpl for portability");
899220988Sadrian#  endif
900220988Sadrian# endif
901220988Sadrian#endif
902220988Sadrian
903220988Sadrian#if 1
904220988Sadrian/* On native Windows, map 'ecvt' to '_ecvt', so that -loldnames is not
905220988Sadrian   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
906220988Sadrian   platforms by defining GNULIB_NAMESPACE::ecvt on all platforms that have
907220988Sadrian   it.  */
908220988Sadrian# if defined _WIN32 && !defined __CYGWIN__
909220988Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
910220988Sadrian#   undef ecvt
911220988Sadrian#   define ecvt _ecvt
912220988Sadrian#  endif
913220988Sadrian_GL_CXXALIAS_MDA (ecvt, char *,
914220988Sadrian                  (double number, int ndigits, int *decptp, int *signp));
915220988Sadrian# else
916220988Sadrian#  if 0
917220988Sadrian_GL_CXXALIAS_SYS (ecvt, char *,
918220988Sadrian                  (double number, int ndigits, int *decptp, int *signp));
919220988Sadrian#  endif
920220988Sadrian# endif
921220988Sadrian# if (defined _WIN32 && !defined __CYGWIN__) || 0
922220988Sadrian_GL_CXXALIASWARN (ecvt);
923220988Sadrian# endif
924220988Sadrian#endif
925220988Sadrian
926220988Sadrian#if 1
927220988Sadrian/* On native Windows, map 'fcvt' to '_fcvt', so that -loldnames is not
928220988Sadrian   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
929220988Sadrian   platforms by defining GNULIB_NAMESPACE::fcvt on all platforms that have
930220988Sadrian   it.  */
931220988Sadrian# if defined _WIN32 && !defined __CYGWIN__
932220988Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
933220988Sadrian#   undef fcvt
934220988Sadrian#   define fcvt _fcvt
935220988Sadrian#  endif
936220988Sadrian_GL_CXXALIAS_MDA (fcvt, char *,
937220988Sadrian                  (double number, int ndigits, int *decptp, int *signp));
938220988Sadrian# else
939220988Sadrian#  if 0
940220988Sadrian_GL_CXXALIAS_SYS (fcvt, char *,
941220988Sadrian                  (double number, int ndigits, int *decptp, int *signp));
942220988Sadrian#  endif
943220988Sadrian# endif
944220988Sadrian# if (defined _WIN32 && !defined __CYGWIN__) || 0
945220988Sadrian_GL_CXXALIASWARN (fcvt);
946220988Sadrian# endif
947220988Sadrian#endif
948220988Sadrian
949220988Sadrian#if 1
950220988Sadrian/* On native Windows, map 'gcvt' to '_gcvt', so that -loldnames is not
951220988Sadrian   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
952220988Sadrian   platforms by defining GNULIB_NAMESPACE::gcvt on all platforms that have
953220988Sadrian   it.  */
954220988Sadrian# if defined _WIN32 && !defined __CYGWIN__
955220988Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
956220988Sadrian#   undef gcvt
957220988Sadrian#   define gcvt _gcvt
958220988Sadrian#  endif
959220988Sadrian_GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
960220988Sadrian# else
961220988Sadrian#  if 0
962220988Sadrian_GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
963220988Sadrian#  endif
964220988Sadrian# endif
965220988Sadrian# if (defined _WIN32 && !defined __CYGWIN__) || 0
966185377Ssam_GL_CXXALIASWARN (gcvt);
967185377Ssam# endif
968185377Ssam#endif
969185377Ssam
970185377Ssam#if 0
971203930Srpaulo/* Store max(NELEM,3) load average numbers in LOADAVG[].
972187831Ssam   The three numbers are the load average of the last 1 minute, the last 5
973187831Ssam   minutes, and the last 15 minutes, respectively.
974185377Ssam   LOADAVG is an array of NELEM numbers.  */
975185377Ssam# if !1
976185377Ssam_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
977185377Ssam                                   _GL_ARG_NONNULL ((1)));
978185377Ssam# endif
979185377Ssam_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
980185377Ssam_GL_CXXALIASWARN (getloadavg);
981185377Ssam#elif defined GNULIB_POSIXCHECK
982185377Ssam# undef getloadavg
983185377Ssam# if HAVE_RAW_DECL_GETLOADAVG
984185377Ssam_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
985185377Ssam                 "use gnulib module getloadavg for portability");
986185377Ssam# endif
987185377Ssam#endif
988185377Ssam
989203882Srpaulo#if 0
990203882Srpaulo/* Assuming *OPTIONP is a comma separated list of elements of the form
991185377Ssam   "token" or "token=value", getsubopt parses the first of these elements.
992185377Ssam   If the first element refers to a "token" that is member of the given
993185377Ssam   NULL-terminated array of tokens:
994185377Ssam     - It replaces the comma with a NUL byte, updates *OPTIONP to point past
995191909Ssam       the first option and the comma, sets *VALUEP to the value of the
996187831Ssam       element (or NULL if it doesn't contain an "=" sign),
997187831Ssam     - It returns the index of the "token" in the given array of tokens.
998187831Ssam   Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
999185377Ssam   For more details see the POSIX specification.
1000203882Srpaulo   https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
1001185377Ssam# if !1
1002187831Ssam_GL_FUNCDECL_SYS (getsubopt, int,
1003185377Ssam                  (char **optionp, char *const *tokens, char **valuep)
1004185377Ssam                  _GL_ARG_NONNULL ((1, 2, 3)));
1005203882Srpaulo# endif
1006185377Ssam_GL_CXXALIAS_SYS (getsubopt, int,
1007203882Srpaulo                  (char **optionp, char *const *tokens, char **valuep));
1008203882Srpaulo_GL_CXXALIASWARN (getsubopt);
1009185377Ssam#elif defined GNULIB_POSIXCHECK
1010185377Ssam# undef getsubopt
1011185377Ssam# if HAVE_RAW_DECL_GETSUBOPT
1012185377Ssam_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
1013185377Ssam                 "use gnulib module getsubopt for portability");
1014185377Ssam# endif
1015185377Ssam#endif
1016185377Ssam
1017219393Sadrian#if 0
1018185377Ssam/* Change the ownership and access permission of the slave side of the
1019185377Ssam   pseudo-terminal whose master side is specified by FD.  */
1020185377Ssam# if !1
1021185377Ssam_GL_FUNCDECL_SYS (grantpt, int, (int fd));
1022185377Ssam# endif
1023185377Ssam_GL_CXXALIAS_SYS (grantpt, int, (int fd));
1024185377Ssam_GL_CXXALIASWARN (grantpt);
1025187831Ssam#elif defined GNULIB_POSIXCHECK
1026185377Ssam# undef grantpt
1027185377Ssam# if HAVE_RAW_DECL_GRANTPT
1028185377Ssam_GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
1029187831Ssam                 "use gnulib module grantpt for portability");
1030185377Ssam# endif
1031185377Ssam#endif
1032185377Ssam
1033185377Ssam/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not
1034185377Ssam   rely on GNU or POSIX semantics for malloc and realloc (for example,
1035185377Ssam   by never specifying a zero size), so it does not need malloc or
1036185377Ssam   realloc to be redefined.  */
1037185377Ssam#if 1
1038185377Ssam# if (1 && 1) \
1039185377Ssam     || (0 && 0)
1040185377Ssam#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1041185377Ssam        || _GL_USE_STDLIB_ALLOC)
1042185377Ssam#   undef malloc
1043185377Ssam#   define malloc rpl_malloc
1044185377Ssam#  endif
1045185377Ssam_GL_FUNCDECL_RPL (malloc, void *,
1046185377Ssam                  (size_t size)
1047185377Ssam                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
1048219393Sadrian_GL_CXXALIAS_RPL (malloc, void *, (size_t size));
1049219393Sadrian# else
1050219393Sadrian#  if __GNUC__ >= 11
1051219393Sadrian/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free.  */
1052219393Sadrian_GL_FUNCDECL_SYS (malloc, void *,
1053219393Sadrian                  (size_t size)
1054219393Sadrian                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
1055185377Ssam#  endif
1056185377Ssam_GL_CXXALIAS_SYS (malloc, void *, (size_t size));
1057185377Ssam# endif
1058219393Sadrian# if __GLIBC__ >= 2
1059219393Sadrian_GL_CXXALIASWARN (malloc);
1060219393Sadrian# endif
1061219393Sadrian#else
1062219393Sadrian# if 1 && __GNUC__ >= 11 && !defined malloc
1063219393Sadrian/* For -Wmismatched-dealloc: Associate malloc with free or rpl_free.  */
1064219393Sadrian_GL_FUNCDECL_SYS (malloc, void *,
1065219393Sadrian                  (size_t size)
1066219393Sadrian                  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
1067219393Sadrian# endif
1068219393Sadrian# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1069219393Sadrian#  undef malloc
1070219393Sadrian/* Assume malloc is always declared.  */
1071219393Sadrian_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
1072219393Sadrian                 "use gnulib module malloc-posix for portability");
1073219393Sadrian# endif
1074219393Sadrian#endif
1075219393Sadrian
1076219393Sadrian/* Convert a multibyte character to a wide character.  */
1077219393Sadrian#if 1
1078219393Sadrian# if 0
1079219393Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1080219393Sadrian#   undef mbtowc
1081219393Sadrian#   define mbtowc rpl_mbtowc
1082219393Sadrian#  endif
1083219393Sadrian_GL_FUNCDECL_RPL (mbtowc, int,
1084219393Sadrian                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
1085219393Sadrian_GL_CXXALIAS_RPL (mbtowc, int,
1086219393Sadrian                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
1087219393Sadrian# else
1088219393Sadrian#  if !1
1089219393Sadrian_GL_FUNCDECL_SYS (mbtowc, int,
1090219393Sadrian                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
1091219393Sadrian#  endif
1092219393Sadrian_GL_CXXALIAS_SYS (mbtowc, int,
1093219393Sadrian                  (wchar_t *restrict pwc, const char *restrict s, size_t n));
1094219393Sadrian# endif
1095219393Sadrian# if __GLIBC__ >= 2
1096219393Sadrian_GL_CXXALIASWARN (mbtowc);
1097219393Sadrian# endif
1098219393Sadrian#elif defined GNULIB_POSIXCHECK
1099219393Sadrian# undef mbtowc
1100219393Sadrian# if HAVE_RAW_DECL_MBTOWC
1101219393Sadrian_GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - "
1102219393Sadrian                 "use gnulib module mbtowc for portability");
1103219393Sadrian# endif
1104219393Sadrian#endif
1105219393Sadrian
1106219393Sadrian#if 1
1107221876Sadrian/* Create a unique temporary directory from TEMPLATE.
1108221876Sadrian   The last six characters of TEMPLATE must be "XXXXXX";
1109221876Sadrian   they are replaced with a string that makes the directory name unique.
1110219393Sadrian   Returns TEMPLATE, or a null pointer if it cannot get a unique name.
1111219393Sadrian   The directory is created mode 700.  */
1112219393Sadrian# if !1
1113220988Sadrian_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1)));
1114220988Sadrian# endif
1115220988Sadrian_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/));
1116220988Sadrian_GL_CXXALIASWARN (mkdtemp);
1117220988Sadrian#elif defined GNULIB_POSIXCHECK
1118220988Sadrian# undef mkdtemp
1119220988Sadrian# if HAVE_RAW_DECL_MKDTEMP
1120220988Sadrian_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
1121220988Sadrian                 "use gnulib module mkdtemp for portability");
1122220988Sadrian# endif
1123220988Sadrian#endif
1124220988Sadrian
1125220988Sadrian#if 1
1126220988Sadrian/* Create a unique temporary file from TEMPLATE.
1127220988Sadrian   The last six characters of TEMPLATE must be "XXXXXX";
1128220988Sadrian   they are replaced with a string that makes the file name unique.
1129185377Ssam   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
1130185377Ssam   and O_TEXT, O_BINARY (defined in "binary-io.h").
1131220988Sadrian   The file is then created, with the specified flags, ensuring it didn't exist
1132220988Sadrian   before.
1133185377Ssam   The file is created read-write (mask at least 0600 & ~umask), but it may be
1134185377Ssam   world-readable and world-writable (mask 0666 & ~umask), depending on the
1135203882Srpaulo   implementation.
1136203882Srpaulo   Returns the open file descriptor if successful, otherwise -1 and errno
1137203882Srpaulo   set.  */
1138203882Srpaulo# if !1
1139185377Ssam_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
1140185377Ssam                                 _GL_ARG_NONNULL ((1)));
1141185377Ssam# endif
1142185377Ssam_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
1143185377Ssam_GL_CXXALIASWARN (mkostemp);
1144185377Ssam#elif defined GNULIB_POSIXCHECK
1145185377Ssam# undef mkostemp
1146185377Ssam# if HAVE_RAW_DECL_MKOSTEMP
1147185377Ssam_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
1148185377Ssam                 "use gnulib module mkostemp for portability");
1149185377Ssam# endif
1150185377Ssam#endif
1151185377Ssam
1152185377Ssam#if 0
1153185377Ssam/* Create a unique temporary file from TEMPLATE.
1154185377Ssam   The last six characters of TEMPLATE before a suffix of length
1155185377Ssam   SUFFIXLEN must be "XXXXXX";
1156185377Ssam   they are replaced with a string that makes the file name unique.
1157185377Ssam   The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
1158185377Ssam   and O_TEXT, O_BINARY (defined in "binary-io.h").
1159185377Ssam   The file is then created, with the specified flags, ensuring it didn't exist
1160185377Ssam   before.
1161185377Ssam   The file is created read-write (mask at least 0600 & ~umask), but it may be
1162221620Sadrian   world-readable and world-writable (mask 0666 & ~umask), depending on the
1163221620Sadrian   implementation.
1164221620Sadrian   Returns the open file descriptor if successful, otherwise -1 and errno
1165221620Sadrian   set.  */
1166221620Sadrian# if !1
1167185377Ssam_GL_FUNCDECL_SYS (mkostemps, int,
1168185377Ssam                  (char * /*template*/, int /*suffixlen*/, int /*flags*/)
1169185377Ssam                  _GL_ARG_NONNULL ((1)));
1170185377Ssam# endif
1171185377Ssam_GL_CXXALIAS_SYS (mkostemps, int,
1172185377Ssam                  (char * /*template*/, int /*suffixlen*/, int /*flags*/));
1173185377Ssam_GL_CXXALIASWARN (mkostemps);
1174185377Ssam#elif defined GNULIB_POSIXCHECK
1175185377Ssam# undef mkostemps
1176185377Ssam# if HAVE_RAW_DECL_MKOSTEMPS
1177185377Ssam_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
1178221620Sadrian                 "use gnulib module mkostemps for portability");
1179221620Sadrian# endif
1180221620Sadrian#endif
1181221620Sadrian
1182221620Sadrian#if 0
1183185377Ssam/* Create a unique temporary file from TEMPLATE.
1184185377Ssam   The last six characters of TEMPLATE must be "XXXXXX";
1185185377Ssam   they are replaced with a string that makes the file name unique.
1186185377Ssam   The file is then created, ensuring it didn't exist before.
1187185377Ssam   The file is created read-write (mask at least 0600 & ~umask), but it may be
1188185377Ssam   world-readable and world-writable (mask 0666 & ~umask), depending on the
1189185377Ssam   implementation.
1190185377Ssam   Returns the open file descriptor if successful, otherwise -1 and errno
1191185377Ssam   set.  */
1192185377Ssam# if 0
1193185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1194185377Ssam#   define mkstemp rpl_mkstemp
1195185377Ssam#  endif
1196185377Ssam_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
1197185377Ssam_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/));
1198189747Ssam# else
1199185377Ssam#  if ! 1
1200185377Ssam_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1)));
1201185377Ssam#  endif
1202185377Ssam_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/));
1203185377Ssam# endif
1204185377Ssam_GL_CXXALIASWARN (mkstemp);
1205185377Ssam#elif defined GNULIB_POSIXCHECK
1206185377Ssam# undef mkstemp
1207185377Ssam# if HAVE_RAW_DECL_MKSTEMP
1208185377Ssam_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
1209185377Ssam                 "use gnulib module mkstemp for portability");
1210185377Ssam# endif
1211185377Ssam#endif
1212185377Ssam
1213185377Ssam#if 0
1214185377Ssam/* Create a unique temporary file from TEMPLATE.
1215185377Ssam   The last six characters of TEMPLATE prior to a suffix of length
1216185377Ssam   SUFFIXLEN must be "XXXXXX";
1217185377Ssam   they are replaced with a string that makes the file name unique.
1218185377Ssam   The file is then created, ensuring it didn't exist before.
1219185377Ssam   The file is created read-write (mask at least 0600 & ~umask), but it may be
1220185377Ssam   world-readable and world-writable (mask 0666 & ~umask), depending on the
1221185377Ssam   implementation.
1222185377Ssam   Returns the open file descriptor if successful, otherwise -1 and errno
1223221163Sadrian   set.  */
1224221163Sadrian# if !1
1225185377Ssam_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)
1226185377Ssam                                 _GL_ARG_NONNULL ((1)));
1227208711Srpaulo# endif
1228221163Sadrian_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/));
1229221163Sadrian_GL_CXXALIASWARN (mkstemps);
1230221163Sadrian#elif defined GNULIB_POSIXCHECK
1231185377Ssam# undef mkstemps
1232185377Ssam# if HAVE_RAW_DECL_MKSTEMPS
1233185377Ssam_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
1234185377Ssam                 "use gnulib module mkstemps for portability");
1235185377Ssam# endif
1236185377Ssam#endif
1237185377Ssam
1238185377Ssam#if 1
1239185377Ssam/* On native Windows, map 'mktemp' to '_mktemp', so that -loldnames is not
1240185377Ssam   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
1241185377Ssam   platforms by defining GNULIB_NAMESPACE::mktemp always.  */
1242185377Ssam# if defined _WIN32 && !defined __CYGWIN__
1243185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1244185377Ssam#   undef mktemp
1245185377Ssam#   define mktemp _mktemp
1246185377Ssam#  endif
1247195426Ssam_GL_CXXALIAS_MDA (mktemp, char *, (char * /*template*/));
1248221163Sadrian# else
1249185377Ssam_GL_CXXALIAS_SYS (mktemp, char *, (char * /*template*/));
1250221163Sadrian# endif
1251221163Sadrian_GL_CXXALIASWARN (mktemp);
1252221163Sadrian#endif
1253221163Sadrian
1254221163Sadrian/* Allocate memory with indefinite extent and specified alignment.  */
1255221163Sadrian#if 0
1256221163Sadrian# if 0
1257221163Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1258221163Sadrian#   undef posix_memalign
1259221163Sadrian#   define posix_memalign rpl_posix_memalign
1260221163Sadrian#  endif
1261185377Ssam_GL_FUNCDECL_RPL (posix_memalign, int,
1262185377Ssam                  (void **memptr, size_t alignment, size_t size)
1263185377Ssam                  _GL_ARG_NONNULL ((1)));
1264185377Ssam_GL_CXXALIAS_RPL (posix_memalign, int,
1265185377Ssam                  (void **memptr, size_t alignment, size_t size));
1266185377Ssam# else
1267221163Sadrian#  if 1
1268221163Sadrian_GL_CXXALIAS_SYS (posix_memalign, int,
1269221163Sadrian                  (void **memptr, size_t alignment, size_t size));
1270221163Sadrian#  endif
1271185377Ssam# endif
1272221163Sadrian# if 1
1273221163Sadrian_GL_CXXALIASWARN (posix_memalign);
1274221163Sadrian# endif
1275221163Sadrian#elif defined GNULIB_POSIXCHECK
1276221163Sadrian# undef posix_memalign
1277221163Sadrian# if HAVE_RAW_DECL_POSIX_MEMALIGN
1278221163Sadrian_GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
1279221163Sadrian                 "use gnulib module posix_memalign for portability");
1280221163Sadrian# endif
1281221163Sadrian#endif
1282221163Sadrian
1283221163Sadrian#if 0
1284221163Sadrian/* Return an FD open to the master side of a pseudo-terminal.  Flags should
1285221163Sadrian   include O_RDWR, and may also include O_NOCTTY.  */
1286221163Sadrian# if !1
1287185377Ssam_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
1288221163Sadrian# endif
1289185377Ssam_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
1290221163Sadrian_GL_CXXALIASWARN (posix_openpt);
1291185377Ssam#elif defined GNULIB_POSIXCHECK
1292221479Sadrian# undef posix_openpt
1293221479Sadrian# if HAVE_RAW_DECL_POSIX_OPENPT
1294221479Sadrian_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
1295221479Sadrian                 "use gnulib module posix_openpt for portability");
1296221479Sadrian# endif
1297185377Ssam#endif
1298185377Ssam
1299185377Ssam#if 0
1300185377Ssam/* Return the pathname of the pseudo-terminal slave associated with
1301185377Ssam   the master FD is open on, or NULL on errors.  */
1302185377Ssam# if 0
1303185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304185377Ssam#   undef ptsname
1305185377Ssam#   define ptsname rpl_ptsname
1306185377Ssam#  endif
1307221163Sadrian_GL_FUNCDECL_RPL (ptsname, char *, (int fd));
1308221163Sadrian_GL_CXXALIAS_RPL (ptsname, char *, (int fd));
1309185377Ssam# else
1310221163Sadrian#  if !1
1311221163Sadrian_GL_FUNCDECL_SYS (ptsname, char *, (int fd));
1312221163Sadrian#  endif
1313221163Sadrian_GL_CXXALIAS_SYS (ptsname, char *, (int fd));
1314221163Sadrian# endif
1315221163Sadrian_GL_CXXALIASWARN (ptsname);
1316221163Sadrian#elif defined GNULIB_POSIXCHECK
1317221163Sadrian# undef ptsname
1318221163Sadrian# if HAVE_RAW_DECL_PTSNAME
1319221163Sadrian_GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
1320221163Sadrian                 "use gnulib module ptsname for portability");
1321221163Sadrian# endif
1322221163Sadrian#endif
1323221163Sadrian
1324221163Sadrian#if 0
1325221163Sadrian/* Set the pathname of the pseudo-terminal slave associated with
1326221163Sadrian   the master FD is open on and return 0, or set errno and return
1327195426Ssam   non-zero on errors.  */
1328195426Ssam# if 0
1329195426Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1330195426Ssam#   undef ptsname_r
1331195426Ssam#   define ptsname_r rpl_ptsname_r
1332195426Ssam#  endif
1333195426Ssam_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
1334185377Ssam_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
1335195426Ssam# else
1336185377Ssam#  if !1
1337195426Ssam_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
1338195426Ssam#  endif
1339195426Ssam_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
1340195426Ssam# endif
1341195426Ssam# ifndef GNULIB_defined_ptsname_r
1342185377Ssam#  define GNULIB_defined_ptsname_r (!1 || 0)
1343221163Sadrian# endif
1344185377Ssam_GL_CXXALIASWARN (ptsname_r);
1345185377Ssam#elif defined GNULIB_POSIXCHECK
1346185377Ssam# undef ptsname_r
1347185377Ssam# if HAVE_RAW_DECL_PTSNAME_R
1348217879Sadrian_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
1349217879Sadrian                 "use gnulib module ptsname_r for portability");
1350217879Sadrian# endif
1351221616Sadrian#endif
1352221616Sadrian
1353221701Sadrian#if 0
1354221701Sadrian# if 0
1355221616Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1356221616Sadrian#   undef putenv
1357221616Sadrian#   define putenv rpl_putenv
1358221616Sadrian#  endif
1359221616Sadrian_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
1360221616Sadrian_GL_CXXALIAS_RPL (putenv, int, (char *string));
1361221616Sadrian# elif defined _WIN32 && !defined __CYGWIN__
1362221616Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1363221616Sadrian#   undef putenv
1364221616Sadrian#   define putenv _putenv
1365221616Sadrian#  endif
1366221616Sadrian_GL_CXXALIAS_MDA (putenv, int, (char *string));
1367221616Sadrian# else
1368217879Sadrian_GL_CXXALIAS_SYS (putenv, int, (char *string));
1369221163Sadrian# endif
1370221616Sadrian_GL_CXXALIASWARN (putenv);
1371221616Sadrian#elif 1
1372221616Sadrian/* On native Windows, map 'putenv' to '_putenv', so that -loldnames is not
1373221163Sadrian   required.  In C++ with GNULIB_NAMESPACE, avoid differences between
1374221163Sadrian   platforms by defining GNULIB_NAMESPACE::putenv always.  */
1375221163Sadrian# if defined _WIN32 && !defined __CYGWIN__
1376221163Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1377217879Sadrian#   undef putenv
1378217879Sadrian#   define putenv _putenv
1379221616Sadrian#  endif
1380221616Sadrian/* Need to cast, because on mingw, the parameter is either
1381221616Sadrian   'const char *string' or 'char *string'.  */
1382221616Sadrian_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
1383221616Sadrian# else
1384221616Sadrian_GL_CXXALIAS_SYS (putenv, int, (char *string));
1385221616Sadrian# endif
1386217882Sadrian_GL_CXXALIASWARN (putenv);
1387217882Sadrian#endif
1388217882Sadrian
1389217882Sadrian#if 0
1390217882Sadrian/* Sort an array of NMEMB elements, starting at address BASE, each element
1391221616Sadrian   occupying SIZE bytes, in ascending order according to the comparison
1392217882Sadrian   function COMPARE.  */
1393217882Sadrian# ifdef __cplusplus
1394217882Sadrianextern "C" {
1395217882Sadrian# endif
1396217882Sadrian# if !GNULIB_defined_qsort_r_fn_types
1397217930Sadriantypedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *);
1398217930Sadrian#  define GNULIB_defined_qsort_r_fn_types 1
1399217930Sadrian# endif
1400217930Sadrian# ifdef __cplusplus
1401217930Sadrian}
1402217930Sadrian# endif
1403217930Sadrian# if 0
1404217930Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1405217930Sadrian#   undef qsort_r
1406217930Sadrian#   define qsort_r rpl_qsort_r
1407217930Sadrian#  endif
1408217930Sadrian_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
1409217930Sadrian                                  _gl_qsort_r_compar_fn compare,
1410217882Sadrian                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
1411217930Sadrian_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
1412217930Sadrian                                  _gl_qsort_r_compar_fn compare,
1413217930Sadrian                                  void *arg));
1414217930Sadrian# else
1415217930Sadrian#  if !1
1416217930Sadrian_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1417220598Sadrian                                  _gl_qsort_r_compar_fn compare,
1418217930Sadrian                                  void *arg) _GL_ARG_NONNULL ((1, 4)));
1419217930Sadrian#  endif
1420217930Sadrian_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
1421217930Sadrian                                  _gl_qsort_r_compar_fn compare,
1422220990Sadrian                                  void *arg));
1423187831Ssam# endif
1424185377Ssam_GL_CXXALIASWARN (qsort_r);
1425224243Sadrian#elif defined GNULIB_POSIXCHECK
1426224243Sadrian# undef qsort_r
1427224243Sadrian# if HAVE_RAW_DECL_QSORT_R
1428224243Sadrian_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
1429224243Sadrian                 "use gnulib module qsort_r for portability");
1430224243Sadrian# endif
1431185377Ssam#endif
1432224243Sadrian
1433224243Sadrian
1434224243Sadrian#if 0
1435185377Ssam# if !1
1436224243Sadrian#  ifndef RAND_MAX
1437224243Sadrian#   define RAND_MAX 2147483647
1438224243Sadrian#  endif
1439185377Ssam# endif
1440185377Ssam#endif
1441185377Ssam
1442185377Ssam
1443185377Ssam#if 0
1444185377Ssam# if 0
1445185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1446185377Ssam#   undef random
1447185377Ssam#   define random rpl_random
1448185377Ssam#  endif
1449185377Ssam_GL_FUNCDECL_RPL (random, long, (void));
1450218420Sadrian_GL_CXXALIAS_RPL (random, long, (void));
1451218420Sadrian# else
1452218420Sadrian#  if !1
1453218420Sadrian_GL_FUNCDECL_SYS (random, long, (void));
1454218420Sadrian#  endif
1455218420Sadrian/* Need to cast, because on Haiku, the return type is
1456218420Sadrian                               int.  */
1457218420Sadrian_GL_CXXALIAS_SYS_CAST (random, long, (void));
1458218420Sadrian# endif
1459221875Sadrian_GL_CXXALIASWARN (random);
1460218420Sadrian#elif defined GNULIB_POSIXCHECK
1461218420Sadrian# undef random
1462218420Sadrian# if HAVE_RAW_DECL_RANDOM
1463218420Sadrian_GL_WARN_ON_USE (random, "random is unportable - "
1464218420Sadrian                 "use gnulib module random for portability");
1465218420Sadrian# endif
1466218420Sadrian#endif
1467218420Sadrian
1468218420Sadrian#if 0
1469218420Sadrian# if 0
1470218420Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1471218420Sadrian#   undef srandom
1472218420Sadrian#   define srandom rpl_srandom
1473219854Sadrian#  endif
1474219854Sadrian_GL_FUNCDECL_RPL (srandom, void, (unsigned int seed));
1475219854Sadrian_GL_CXXALIAS_RPL (srandom, void, (unsigned int seed));
1476219854Sadrian# else
1477219854Sadrian#  if !1
1478219854Sadrian_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
1479218420Sadrian#  endif
1480218420Sadrian/* Need to cast, because on FreeBSD, the first parameter is
1481218420Sadrian                                       unsigned long seed.  */
1482221875Sadrian_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
1483218420Sadrian# endif
1484218420Sadrian_GL_CXXALIASWARN (srandom);
1485218420Sadrian#elif defined GNULIB_POSIXCHECK
1486218420Sadrian# undef srandom
1487218420Sadrian# if HAVE_RAW_DECL_SRANDOM
1488218420Sadrian_GL_WARN_ON_USE (srandom, "srandom is unportable - "
1489218420Sadrian                 "use gnulib module random for portability");
1490219854Sadrian# endif
1491218420Sadrian#endif
1492219854Sadrian
1493219854Sadrian#if 0
1494218420Sadrian# if 0
1495219854Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1496218420Sadrian#   undef initstate
1497218420Sadrian#   define initstate rpl_initstate
1498218420Sadrian#  endif
1499219393Sadrian_GL_FUNCDECL_RPL (initstate, char *,
1500219393Sadrian                  (unsigned int seed, char *buf, size_t buf_size)
1501219393Sadrian                  _GL_ARG_NONNULL ((2)));
1502219393Sadrian_GL_CXXALIAS_RPL (initstate, char *,
1503219393Sadrian                  (unsigned int seed, char *buf, size_t buf_size));
1504219393Sadrian# else
1505219393Sadrian#  if !1 || !1
1506219393Sadrian_GL_FUNCDECL_SYS (initstate, char *,
1507219393Sadrian                  (unsigned int seed, char *buf, size_t buf_size)
1508219393Sadrian                  _GL_ARG_NONNULL ((2)));
1509219393Sadrian#  endif
1510219393Sadrian/* Need to cast, because on FreeBSD, the first parameter is
1511218420Sadrian                        unsigned long seed.  */
1512221574Sadrian_GL_CXXALIAS_SYS_CAST (initstate, char *,
1513219393Sadrian                       (unsigned int seed, char *buf, size_t buf_size));
1514219393Sadrian# endif
1515219393Sadrian_GL_CXXALIASWARN (initstate);
1516219393Sadrian#elif defined GNULIB_POSIXCHECK
1517219393Sadrian# undef initstate
1518219393Sadrian# if HAVE_RAW_DECL_INITSTATE
1519219393Sadrian_GL_WARN_ON_USE (initstate, "initstate is unportable - "
1520219393Sadrian                 "use gnulib module random for portability");
1521219393Sadrian# endif
1522218420Sadrian#endif
1523219393Sadrian
1524219393Sadrian#if 0
1525219393Sadrian# if 0
1526185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1527185377Ssam#   undef setstate
1528185377Ssam#   define setstate rpl_setstate
1529185377Ssam#  endif
1530203930Srpaulo_GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
1531187831Ssam_GL_CXXALIAS_RPL (setstate, char *, (char *arg_state));
1532185377Ssam# else
1533203882Srpaulo#  if !1 || !1
1534203882Srpaulo_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
1535185377Ssam#  endif
1536203882Srpaulo/* Need to cast, because on Mac OS X 10.13, HP-UX, Solaris the first parameter
1537185377Ssam   is                                     const char *arg_state.  */
1538185377Ssam_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
1539185377Ssam# endif
1540203882Srpaulo_GL_CXXALIASWARN (setstate);
1541185377Ssam#elif defined GNULIB_POSIXCHECK
1542187831Ssam# undef setstate
1543187831Ssam# if HAVE_RAW_DECL_SETSTATE
1544185377Ssam_GL_WARN_ON_USE (setstate, "setstate is unportable - "
1545203882Srpaulo                 "use gnulib module random for portability");
1546185377Ssam# endif
1547203882Srpaulo#endif
1548203882Srpaulo
1549203882Srpaulo
1550219393Sadrian#if 0
1551185377Ssam# if 0
1552203882Srpaulo#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1553218420Sadrian#   undef random_r
1554185377Ssam#   define random_r rpl_random_r
1555185377Ssam#  endif
1556185377Ssam_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
1557203882Srpaulo                                 _GL_ARG_NONNULL ((1, 2)));
1558203882Srpaulo_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
1559185377Ssam# else
1560185377Ssam#  if !1
1561221875Sadrian_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
1562221875Sadrian                                 _GL_ARG_NONNULL ((1, 2)));
1563221875Sadrian#  endif
1564221875Sadrian_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
1565185377Ssam# endif
1566185377Ssam_GL_CXXALIASWARN (random_r);
1567221574Sadrian#elif defined GNULIB_POSIXCHECK
1568218420Sadrian# undef random_r
1569203159Srpaulo# if HAVE_RAW_DECL_RANDOM_R
1570185377Ssam_GL_WARN_ON_USE (random_r, "random_r is unportable - "
1571185377Ssam                 "use gnulib module random_r for portability");
1572221875Sadrian# endif
1573218420Sadrian#endif
1574218420Sadrian
1575218420Sadrian#if 0
1576218420Sadrian# if 0
1577218420Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1578218420Sadrian#   undef srandom_r
1579218420Sadrian#   define srandom_r rpl_srandom_r
1580218420Sadrian#  endif
1581218420Sadrian_GL_FUNCDECL_RPL (srandom_r, int,
1582218420Sadrian                  (unsigned int seed, struct random_data *rand_state)
1583218420Sadrian                  _GL_ARG_NONNULL ((2)));
1584218420Sadrian_GL_CXXALIAS_RPL (srandom_r, int,
1585220955Sadrian                  (unsigned int seed, struct random_data *rand_state));
1586220955Sadrian# else
1587220955Sadrian#  if !1
1588220955Sadrian_GL_FUNCDECL_SYS (srandom_r, int,
1589218420Sadrian                  (unsigned int seed, struct random_data *rand_state)
1590218420Sadrian                  _GL_ARG_NONNULL ((2)));
1591203882Srpaulo#  endif
1592203882Srpaulo_GL_CXXALIAS_SYS (srandom_r, int,
1593218420Sadrian                  (unsigned int seed, struct random_data *rand_state));
1594221875Sadrian# endif
1595218420Sadrian_GL_CXXALIASWARN (srandom_r);
1596218420Sadrian#elif defined GNULIB_POSIXCHECK
1597185377Ssam# undef srandom_r
1598203882Srpaulo# if HAVE_RAW_DECL_SRANDOM_R
1599203882Srpaulo_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
1600203882Srpaulo                 "use gnulib module random_r for portability");
1601203882Srpaulo# endif
1602185377Ssam#endif
1603221875Sadrian
1604221875Sadrian#if 0
1605185377Ssam# if 0
1606185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1607185377Ssam#   undef initstate_r
1608203882Srpaulo#   define initstate_r rpl_initstate_r
1609185377Ssam#  endif
1610203882Srpaulo_GL_FUNCDECL_RPL (initstate_r, int,
1611185377Ssam                  (unsigned int seed, char *buf, size_t buf_size,
1612185377Ssam                   struct random_data *rand_state)
1613203882Srpaulo                  _GL_ARG_NONNULL ((2, 4)));
1614219860Sadrian_GL_CXXALIAS_RPL (initstate_r, int,
1615203882Srpaulo                  (unsigned int seed, char *buf, size_t buf_size,
1616185377Ssam                   struct random_data *rand_state));
1617185377Ssam# else
1618185377Ssam#  if !1
1619185377Ssam_GL_FUNCDECL_SYS (initstate_r, int,
1620221875Sadrian                  (unsigned int seed, char *buf, size_t buf_size,
1621221875Sadrian                   struct random_data *rand_state)
1622221875Sadrian                  _GL_ARG_NONNULL ((2, 4)));
1623221875Sadrian#  endif
1624185377Ssam/* Need to cast, because on Haiku, the third parameter is
1625218420Sadrian                                                     unsigned long buf_size.  */
1626218420Sadrian_GL_CXXALIAS_SYS_CAST (initstate_r, int,
1627185377Ssam                       (unsigned int seed, char *buf, size_t buf_size,
1628221875Sadrian                        struct random_data *rand_state));
1629221875Sadrian# endif
1630218420Sadrian_GL_CXXALIASWARN (initstate_r);
1631218420Sadrian#elif defined GNULIB_POSIXCHECK
1632218420Sadrian# undef initstate_r
1633218420Sadrian# if HAVE_RAW_DECL_INITSTATE_R
1634218420Sadrian_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
1635218420Sadrian                 "use gnulib module random_r for portability");
1636221875Sadrian# endif
1637221875Sadrian#endif
1638218420Sadrian
1639218420Sadrian#if 0
1640218420Sadrian# if 0
1641221875Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1642221875Sadrian#   undef setstate_r
1643218420Sadrian#   define setstate_r rpl_setstate_r
1644221875Sadrian#  endif
1645221875Sadrian_GL_FUNCDECL_RPL (setstate_r, int,
1646221875Sadrian                  (char *arg_state, struct random_data *rand_state)
1647221875Sadrian                  _GL_ARG_NONNULL ((1, 2)));
1648221875Sadrian_GL_CXXALIAS_RPL (setstate_r, int,
1649221875Sadrian                  (char *arg_state, struct random_data *rand_state));
1650185377Ssam# else
1651218420Sadrian#  if !1
1652185377Ssam_GL_FUNCDECL_SYS (setstate_r, int,
1653185377Ssam                  (char *arg_state, struct random_data *rand_state)
1654185377Ssam                  _GL_ARG_NONNULL ((1, 2)));
1655185377Ssam#  endif
1656185377Ssam/* Need to cast, because on Haiku, the first parameter is
1657185377Ssam                        void *arg_state.  */
1658185377Ssam_GL_CXXALIAS_SYS_CAST (setstate_r, int,
1659185377Ssam                       (char *arg_state, struct random_data *rand_state));
1660221834Sadrian# endif
1661221834Sadrian_GL_CXXALIASWARN (setstate_r);
1662221834Sadrian#elif defined GNULIB_POSIXCHECK
1663221834Sadrian# undef setstate_r
1664221834Sadrian# if HAVE_RAW_DECL_SETSTATE_R
1665221834Sadrian_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1666221834Sadrian                 "use gnulib module random_r for portability");
1667221834Sadrian# endif
1668221834Sadrian#endif
1669221834Sadrian
1670221834Sadrian
1671221834Sadrian#if 1
1672221834Sadrian# if (1 && 1) \
1673221834Sadrian     || (0 && 0)
1674221834Sadrian#  if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1675221834Sadrian        || _GL_USE_STDLIB_ALLOC)
1676221834Sadrian#   undef realloc
1677221834Sadrian#   define realloc rpl_realloc
1678221834Sadrian#  endif
1679221834Sadrian_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)
1680221834Sadrian                                   _GL_ATTRIBUTE_DEALLOC_FREE);
1681221834Sadrian_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
1682221834Sadrian# else
1683221834Sadrian#  if __GNUC__ >= 11
1684221834Sadrian/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free.  */
1685221834Sadrian_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
1686221834Sadrian                                   _GL_ATTRIBUTE_DEALLOC_FREE);
1687221834Sadrian#  endif
1688221834Sadrian_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
1689221834Sadrian# endif
1690221834Sadrian# if __GLIBC__ >= 2
1691221834Sadrian_GL_CXXALIASWARN (realloc);
1692221834Sadrian# endif
1693221834Sadrian#else
1694221834Sadrian# if 1 && __GNUC__ >= 11 && !defined realloc
1695221834Sadrian/* For -Wmismatched-dealloc: Associate realloc with free or rpl_free.  */
1696221834Sadrian_GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
1697221834Sadrian                                   _GL_ATTRIBUTE_DEALLOC_FREE);
1698221834Sadrian# endif
1699221834Sadrian# if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1700221834Sadrian#  undef realloc
1701221834Sadrian/* Assume realloc is always declared.  */
1702221834Sadrian_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
1703221834Sadrian                 "use gnulib module realloc-posix for portability");
1704221834Sadrian# endif
1705221834Sadrian#endif
1706221834Sadrian
1707221834Sadrian
1708221834Sadrian#if 0
1709221834Sadrian# if 0
1710221834Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1711221834Sadrian#   undef reallocarray
1712221834Sadrian#   define reallocarray rpl_reallocarray
1713221834Sadrian#  endif
1714221834Sadrian_GL_FUNCDECL_RPL (reallocarray, void *,
1715221834Sadrian                  (void *ptr, size_t nmemb, size_t size));
1716221834Sadrian_GL_CXXALIAS_RPL (reallocarray, void *,
1717185377Ssam                  (void *ptr, size_t nmemb, size_t size));
1718185377Ssam# else
1719185377Ssam#  if ! 1
1720185377Ssam_GL_FUNCDECL_SYS (reallocarray, void *,
1721185377Ssam                  (void *ptr, size_t nmemb, size_t size));
1722203882Srpaulo#  endif
1723185377Ssam_GL_CXXALIAS_SYS (reallocarray, void *,
1724187831Ssam                  (void *ptr, size_t nmemb, size_t size));
1725185377Ssam# endif
1726185377Ssam_GL_CXXALIASWARN (reallocarray);
1727185377Ssam#elif defined GNULIB_POSIXCHECK
1728185377Ssam# undef reallocarray
1729185377Ssam# if HAVE_RAW_DECL_REALLOCARRAY
1730185377Ssam_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
1731185377Ssam                 "use gnulib module reallocarray for portability");
1732185377Ssam# endif
1733185377Ssam#endif
1734185377Ssam
1735185377Ssam#if 1
1736185377Ssam# if 1
1737185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1738185377Ssam#   define realpath rpl_realpath
1739185377Ssam#  endif
1740185377Ssam_GL_FUNCDECL_RPL (realpath, char *,
1741185377Ssam                  (const char *restrict name, char *restrict resolved)
1742185377Ssam                  _GL_ARG_NONNULL ((1)));
1743185377Ssam_GL_CXXALIAS_RPL (realpath, char *,
1744185377Ssam                  (const char *restrict name, char *restrict resolved));
1745185377Ssam# else
1746185377Ssam#  if !1
1747185377Ssam_GL_FUNCDECL_SYS (realpath, char *,
1748185377Ssam                  (const char *restrict name, char *restrict resolved)
1749185377Ssam                  _GL_ARG_NONNULL ((1)));
1750185377Ssam#  endif
1751185377Ssam_GL_CXXALIAS_SYS (realpath, char *,
1752185377Ssam                  (const char *restrict name, char *restrict resolved));
1753185377Ssam# endif
1754185377Ssam_GL_CXXALIASWARN (realpath);
1755185377Ssam#elif defined GNULIB_POSIXCHECK
1756185377Ssam# undef realpath
1757185377Ssam# if HAVE_RAW_DECL_REALPATH
1758185377Ssam_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
1759185377Ssam                 "canonicalize or canonicalize-lgpl for portability");
1760185377Ssam# endif
1761185377Ssam#endif
1762203882Srpaulo
1763203882Srpaulo#if 0
1764203882Srpaulo/* Test a user response to a question.
1765203882Srpaulo   Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear.  */
1766185377Ssam# if !1
1767185377Ssam_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
1768185377Ssam# endif
1769185377Ssam_GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
1770187831Ssam_GL_CXXALIASWARN (rpmatch);
1771185377Ssam#elif defined GNULIB_POSIXCHECK
1772185377Ssam# undef rpmatch
1773185377Ssam# if HAVE_RAW_DECL_RPMATCH
1774185377Ssam_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
1775187831Ssam                 "use gnulib module rpmatch for portability");
1776185377Ssam# endif
1777185377Ssam#endif
1778185377Ssam
1779187831Ssam#if 0
1780185377Ssam/* Look up NAME in the environment, returning 0 in insecure situations.  */
1781185377Ssam# if !1
1782185377Ssam_GL_FUNCDECL_SYS (secure_getenv, char *,
1783185377Ssam                  (char const *name) _GL_ARG_NONNULL ((1)));
1784185377Ssam# endif
1785187831Ssam_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
1786185377Ssam_GL_CXXALIASWARN (secure_getenv);
1787185377Ssam#elif defined GNULIB_POSIXCHECK
1788185377Ssam# undef secure_getenv
1789185377Ssam# if HAVE_RAW_DECL_SECURE_GETENV
1790185377Ssam_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
1791185377Ssam                 "use gnulib module secure_getenv for portability");
1792185377Ssam# endif
1793185377Ssam#endif
1794185377Ssam
1795185377Ssam#if 1
1796185377Ssam/* Set NAME to VALUE in the environment.
1797185377Ssam   If REPLACE is nonzero, overwrite an existing value.  */
1798185377Ssam# if 1
1799185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1800203882Srpaulo#   undef setenv
1801185377Ssam#   define setenv rpl_setenv
1802185377Ssam#  endif
1803203882Srpaulo_GL_FUNCDECL_RPL (setenv, int,
1804185377Ssam                  (const char *name, const char *value, int replace)
1805185377Ssam                  _GL_ARG_NONNULL ((1)));
1806185377Ssam_GL_CXXALIAS_RPL (setenv, int,
1807185377Ssam                  (const char *name, const char *value, int replace));
1808185377Ssam# else
1809185377Ssam#  if !1
1810185377Ssam_GL_FUNCDECL_SYS (setenv, int,
1811185377Ssam                  (const char *name, const char *value, int replace)
1812187831Ssam                  _GL_ARG_NONNULL ((1)));
1813185377Ssam#  endif
1814185377Ssam_GL_CXXALIAS_SYS (setenv, int,
1815185377Ssam                  (const char *name, const char *value, int replace));
1816185377Ssam# endif
1817203882Srpaulo# if !(1 && !1)
1818203882Srpaulo_GL_CXXALIASWARN (setenv);
1819203882Srpaulo# endif
1820203882Srpaulo#elif defined GNULIB_POSIXCHECK
1821203882Srpaulo# undef setenv
1822203882Srpaulo# if HAVE_RAW_DECL_SETENV
1823185377Ssam_GL_WARN_ON_USE (setenv, "setenv is unportable - "
1824187831Ssam                 "use gnulib module setenv for portability");
1825185377Ssam# endif
1826185377Ssam#endif
1827203882Srpaulo
1828203882Srpaulo#if 0
1829185377Ssam /* Parse a double from STRING, updating ENDP if appropriate.  */
1830203882Srpaulo# if 0
1831203882Srpaulo#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1832203882Srpaulo#   define strtod rpl_strtod
1833203882Srpaulo#  endif
1834185377Ssam#  define GNULIB_defined_strtod_function 1
1835185377Ssam_GL_FUNCDECL_RPL (strtod, double,
1836185377Ssam                  (const char *restrict str, char **restrict endp)
1837185377Ssam                  _GL_ARG_NONNULL ((1)));
1838185377Ssam_GL_CXXALIAS_RPL (strtod, double,
1839185377Ssam                  (const char *restrict str, char **restrict endp));
1840203882Srpaulo# else
1841185377Ssam#  if !1
1842185377Ssam_GL_FUNCDECL_SYS (strtod, double,
1843185377Ssam                  (const char *restrict str, char **restrict endp)
1844185377Ssam                  _GL_ARG_NONNULL ((1)));
1845187831Ssam#  endif
1846185377Ssam_GL_CXXALIAS_SYS (strtod, double,
1847185377Ssam                  (const char *restrict str, char **restrict endp));
1848185377Ssam# endif
1849185377Ssam# if __GLIBC__ >= 2
1850185377Ssam_GL_CXXALIASWARN (strtod);
1851185377Ssam# endif
1852185377Ssam#elif defined GNULIB_POSIXCHECK
1853185377Ssam# undef strtod
1854185377Ssam# if HAVE_RAW_DECL_STRTOD
1855185377Ssam_GL_WARN_ON_USE (strtod, "strtod is unportable - "
1856185377Ssam                 "use gnulib module strtod for portability");
1857185377Ssam# endif
1858185377Ssam#endif
1859185377Ssam
1860185377Ssam#if 0
1861185377Ssam /* Parse a 'long double' from STRING, updating ENDP if appropriate.  */
1862185377Ssam# if 0
1863185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1864185377Ssam#   define strtold rpl_strtold
1865185377Ssam#  endif
1866187831Ssam#  define GNULIB_defined_strtold_function 1
1867185377Ssam_GL_FUNCDECL_RPL (strtold, long double,
1868185377Ssam                  (const char *restrict str, char **restrict endp)
1869185377Ssam                  _GL_ARG_NONNULL ((1)));
1870185377Ssam_GL_CXXALIAS_RPL (strtold, long double,
1871185377Ssam                  (const char *restrict str, char **restrict endp));
1872185377Ssam# else
1873185377Ssam#  if !1
1874185377Ssam_GL_FUNCDECL_SYS (strtold, long double,
1875185377Ssam                  (const char *restrict str, char **restrict endp)
1876203882Srpaulo                  _GL_ARG_NONNULL ((1)));
1877185377Ssam#  endif
1878185377Ssam_GL_CXXALIAS_SYS (strtold, long double,
1879185377Ssam                  (const char *restrict str, char **restrict endp));
1880203882Srpaulo# endif
1881185377Ssam_GL_CXXALIASWARN (strtold);
1882203882Srpaulo#elif defined GNULIB_POSIXCHECK
1883203882Srpaulo# undef strtold
1884203882Srpaulo# if HAVE_RAW_DECL_STRTOLD
1885203882Srpaulo_GL_WARN_ON_USE (strtold, "strtold is unportable - "
1886203882Srpaulo                 "use gnulib module strtold for portability");
1887185377Ssam# endif
1888185377Ssam#endif
1889185377Ssam
1890185377Ssam#if 0
1891185377Ssam/* Parse a signed integer whose textual representation starts at STRING.
1892185377Ssam   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1893185377Ssam   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1894185377Ssam   "0x").
1895185377Ssam   If ENDPTR is not NULL, the address of the first byte after the integer is
1896185377Ssam   stored in *ENDPTR.
1897185377Ssam   Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is set
1898185377Ssam   to ERANGE.  */
1899185377Ssam# if 0
1900185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1901185377Ssam#   define strtol rpl_strtol
1902185377Ssam#  endif
1903185377Ssam#  define GNULIB_defined_strtol_function 1
1904185377Ssam_GL_FUNCDECL_RPL (strtol, long,
1905185377Ssam                  (const char *restrict string, char **restrict endptr,
1906185377Ssam                   int base)
1907185377Ssam                  _GL_ARG_NONNULL ((1)));
1908185377Ssam_GL_CXXALIAS_RPL (strtol, long,
1909185377Ssam                  (const char *restrict string, char **restrict endptr,
1910185377Ssam                   int base));
1911185377Ssam# else
1912185377Ssam#  if !1
1913185377Ssam_GL_FUNCDECL_SYS (strtol, long,
1914185377Ssam                  (const char *restrict string, char **restrict endptr,
1915185377Ssam                   int base)
1916185377Ssam                  _GL_ARG_NONNULL ((1)));
1917185377Ssam#  endif
1918185377Ssam_GL_CXXALIAS_SYS (strtol, long,
1919185377Ssam                  (const char *restrict string, char **restrict endptr,
1920185377Ssam                   int base));
1921185377Ssam# endif
1922185377Ssam_GL_CXXALIASWARN (strtol);
1923185377Ssam#elif defined GNULIB_POSIXCHECK
1924185377Ssam# undef strtol
1925185377Ssam# if HAVE_RAW_DECL_STRTOL
1926185377Ssam_GL_WARN_ON_USE (strtol, "strtol is unportable - "
1927185377Ssam                 "use gnulib module strtol for portability");
1928185377Ssam# endif
1929185377Ssam#endif
1930185377Ssam
1931185377Ssam#if 0
1932185377Ssam/* Parse a signed integer whose textual representation starts at STRING.
1933185377Ssam   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1934185377Ssam   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1935185377Ssam   "0x").
1936185377Ssam   If ENDPTR is not NULL, the address of the first byte after the integer is
1937221834Sadrian   stored in *ENDPTR.
1938221834Sadrian   Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
1939221834Sadrian   to ERANGE.  */
1940221834Sadrian# if 0
1941221834Sadrian#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1942221834Sadrian#   define strtoll rpl_strtoll
1943221834Sadrian#  endif
1944185377Ssam#  define GNULIB_defined_strtoll_function 1
1945185377Ssam_GL_FUNCDECL_RPL (strtoll, long long,
1946185377Ssam                  (const char *restrict string, char **restrict endptr,
1947185377Ssam                   int base)
1948185377Ssam                  _GL_ARG_NONNULL ((1)));
1949185377Ssam_GL_CXXALIAS_RPL (strtoll, long long,
1950185377Ssam                  (const char *restrict string, char **restrict endptr,
1951185377Ssam                   int base));
1952185377Ssam# else
1953185377Ssam#  if !1
1954185377Ssam_GL_FUNCDECL_SYS (strtoll, long long,
1955185377Ssam                  (const char *restrict string, char **restrict endptr,
1956185377Ssam                   int base)
1957185377Ssam                  _GL_ARG_NONNULL ((1)));
1958185377Ssam#  endif
1959185377Ssam_GL_CXXALIAS_SYS (strtoll, long long,
1960185377Ssam                  (const char *restrict string, char **restrict endptr,
1961185377Ssam                   int base));
1962185377Ssam# endif
1963185377Ssam_GL_CXXALIASWARN (strtoll);
1964185377Ssam#elif defined GNULIB_POSIXCHECK
1965185377Ssam# undef strtoll
1966185377Ssam# if HAVE_RAW_DECL_STRTOLL
1967185377Ssam_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
1968185377Ssam                 "use gnulib module strtoll for portability");
1969185377Ssam# endif
1970185377Ssam#endif
1971185377Ssam
1972185377Ssam#if 0
1973185377Ssam/* Parse an unsigned integer whose textual representation starts at STRING.
1974185377Ssam   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
1975185377Ssam   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
1976185377Ssam   "0x").
1977185377Ssam   If ENDPTR is not NULL, the address of the first byte after the integer is
1978185377Ssam   stored in *ENDPTR.
1979220713Sadrian   Upon overflow, the return value is ULONG_MAX, and errno is set to ERANGE.  */
1980203882Srpaulo# if 0
1981185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1982185377Ssam#   define strtoul rpl_strtoul
1983203882Srpaulo#  endif
1984185377Ssam#  define GNULIB_defined_strtoul_function 1
1985185377Ssam_GL_FUNCDECL_RPL (strtoul, unsigned long,
1986203882Srpaulo                  (const char *restrict string, char **restrict endptr,
1987185377Ssam                   int base)
1988185377Ssam                  _GL_ARG_NONNULL ((1)));
1989185377Ssam_GL_CXXALIAS_RPL (strtoul, unsigned long,
1990185377Ssam                  (const char *restrict string, char **restrict endptr,
1991185377Ssam                   int base));
1992185377Ssam# else
1993185377Ssam#  if !1
1994185377Ssam_GL_FUNCDECL_SYS (strtoul, unsigned long,
1995185377Ssam                  (const char *restrict string, char **restrict endptr,
1996185377Ssam                   int base)
1997185377Ssam                  _GL_ARG_NONNULL ((1)));
1998185377Ssam#  endif
1999185377Ssam_GL_CXXALIAS_SYS (strtoul, unsigned long,
2000185377Ssam                  (const char *restrict string, char **restrict endptr,
2001185377Ssam                   int base));
2002185377Ssam# endif
2003185377Ssam_GL_CXXALIASWARN (strtoul);
2004185377Ssam#elif defined GNULIB_POSIXCHECK
2005185377Ssam# undef strtoul
2006185377Ssam# if HAVE_RAW_DECL_STRTOUL
2007185377Ssam_GL_WARN_ON_USE (strtoul, "strtoul is unportable - "
2008185377Ssam                 "use gnulib module strtoul for portability");
2009185377Ssam# endif
2010185377Ssam#endif
2011185377Ssam
2012203930Srpaulo#if 0
2013187831Ssam/* Parse an unsigned integer whose textual representation starts at STRING.
2014185377Ssam   The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
2015185377Ssam   it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
2016185377Ssam   "0x").
2017185377Ssam   If ENDPTR is not NULL, the address of the first byte after the integer is
2018185377Ssam   stored in *ENDPTR.
2019185377Ssam   Upon overflow, the return value is ULLONG_MAX, and errno is set to
2020185377Ssam   ERANGE.  */
2021185377Ssam# if 0
2022185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2023185377Ssam#   define strtoull rpl_strtoull
2024185377Ssam#  endif
2025185377Ssam#  define GNULIB_defined_strtoull_function 1
2026185377Ssam_GL_FUNCDECL_RPL (strtoull, unsigned long long,
2027185377Ssam                  (const char *restrict string, char **restrict endptr,
2028187831Ssam                   int base)
2029185377Ssam                  _GL_ARG_NONNULL ((1)));
2030185377Ssam_GL_CXXALIAS_RPL (strtoull, unsigned long long,
2031185377Ssam                  (const char *restrict string, char **restrict endptr,
2032187831Ssam                   int base));
2033185377Ssam# else
2034185377Ssam#  if !1
2035187831Ssam_GL_FUNCDECL_SYS (strtoull, unsigned long long,
2036187831Ssam                  (const char *restrict string, char **restrict endptr,
2037185377Ssam                   int base)
2038185377Ssam                  _GL_ARG_NONNULL ((1)));
2039185377Ssam#  endif
2040185377Ssam_GL_CXXALIAS_SYS (strtoull, unsigned long long,
2041185377Ssam                  (const char *restrict string, char **restrict endptr,
2042185377Ssam                   int base));
2043187831Ssam# endif
2044185377Ssam_GL_CXXALIASWARN (strtoull);
2045185377Ssam#elif defined GNULIB_POSIXCHECK
2046185377Ssam# undef strtoull
2047185377Ssam# if HAVE_RAW_DECL_STRTOULL
2048185377Ssam_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
2049185377Ssam                 "use gnulib module strtoull for portability");
2050185377Ssam# endif
2051185377Ssam#endif
2052185377Ssam
2053185377Ssam#if 0
2054185377Ssam/* Unlock the slave side of the pseudo-terminal whose master side is specified
2055185377Ssam   by FD, so that it can be opened.  */
2056187831Ssam# if !1
2057187831Ssam_GL_FUNCDECL_SYS (unlockpt, int, (int fd));
2058185377Ssam# endif
2059185377Ssam_GL_CXXALIAS_SYS (unlockpt, int, (int fd));
2060219586Sadrian_GL_CXXALIASWARN (unlockpt);
2061185377Ssam#elif defined GNULIB_POSIXCHECK
2062185377Ssam# undef unlockpt
2063185377Ssam# if HAVE_RAW_DECL_UNLOCKPT
2064185377Ssam_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
2065185377Ssam                 "use gnulib module unlockpt for portability");
2066185377Ssam# endif
2067185377Ssam#endif
2068185377Ssam
2069185377Ssam#if 1
2070185377Ssam/* Remove the variable NAME from the environment.  */
2071203930Srpaulo# if 1
2072185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2073187831Ssam#   undef unsetenv
2074185377Ssam#   define unsetenv rpl_unsetenv
2075185377Ssam#  endif
2076185377Ssam_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
2077185377Ssam_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
2078185377Ssam# else
2079185377Ssam#  if !1
2080185377Ssam_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
2081185377Ssam#  endif
2082185377Ssam_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
2083185377Ssam# endif
2084185377Ssam# if !(1 && !1)
2085185377Ssam_GL_CXXALIASWARN (unsetenv);
2086185377Ssam# endif
2087185377Ssam#elif defined GNULIB_POSIXCHECK
2088187831Ssam# undef unsetenv
2089185377Ssam# if HAVE_RAW_DECL_UNSETENV
2090185377Ssam_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
2091185377Ssam                 "use gnulib module unsetenv for portability");
2092187831Ssam# endif
2093185377Ssam#endif
2094185377Ssam
2095187831Ssam/* Convert a wide character to a multibyte character.  */
2096187831Ssam#if 0
2097185377Ssam# if 0
2098185377Ssam#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2099185377Ssam#   undef wctomb
2100185377Ssam#   define wctomb rpl_wctomb
2101185377Ssam#  endif
2102185377Ssam_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
2103187831Ssam_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
2104185377Ssam# else
2105185377Ssam_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
2106185377Ssam# endif
2107185377Ssam# if __GLIBC__ >= 2
2108185377Ssam_GL_CXXALIASWARN (wctomb);
2109185377Ssam# endif
2110185377Ssam#endif
2111185377Ssam
2112185377Ssam
2113185377Ssam#endif /* _GL_STDLIB_H */
2114185377Ssam#endif /* _GL_STDLIB_H */
2115185377Ssam#endif
2116187831Ssam