19 @PRAGMA_SYSTEM_HEADER@
23 #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
27 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
32 #ifndef _@GUARD_PREFIX@_STDLIB_H
35 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
37 #ifndef _@GUARD_PREFIX@_STDLIB_H
38 #define _@GUARD_PREFIX@_STDLIB_H
42 #if !_GL_CONFIG_H_INCLUDED
43 #error "Please include config.h first."
50 #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
51 # include <sys/wait.h>
55 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
58 # include <sys/time.h>
59 # include <sys/loadavg.h>
63 #if defined _WIN32 && !defined __CYGWIN__
78 # if !@HAVE_STRUCT_RANDOM_DATA@
81 # if !GNULIB_defined_struct_random_data
92 # define GNULIB_defined_struct_random_data 1
97 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
109 #ifndef _GL_ATTRIBUTE_DEALLOC
111 # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
113 # define _GL_ATTRIBUTE_DEALLOC(f, i)
120 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
121 # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
127 #ifndef _GL_ATTRIBUTE_MALLOC
128 # if __GNUC__ >= 3 || defined __clang__
129 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
131 # define _GL_ATTRIBUTE_MALLOC
137 #ifndef _GL_ATTRIBUTE_PURE
138 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
139 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
141 # define _GL_ATTRIBUTE_PURE
156 # define EXIT_SUCCESS 0
161 # define EXIT_FAILURE 1
162 #elif EXIT_FAILURE != 1
164 # define EXIT_FAILURE 1
172 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
174 # define _Exit rpl__Exit
176 _GL_FUNCDECL_RPL (_Exit, _Noreturn
void, (
int status));
177 _GL_CXXALIAS_RPL (_Exit,
void, (
int status));
180 _GL_FUNCDECL_SYS (_Exit, _Noreturn
void, (
int status));
182 _GL_CXXALIAS_SYS (_Exit,
void, (
int status));
185 _GL_CXXALIASWARN (_Exit);
187 #elif defined GNULIB_POSIXCHECK
189 # if HAVE_RAW_DECL__EXIT
190 _GL_WARN_ON_USE (_Exit,
"_Exit is unportable - "
191 "use gnulib module _Exit for portability");
196 #if @GNULIB_FREE_POSIX@
198 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
200 # define free rpl_free
202 # if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
203 _GL_FUNCDECL_RPL (free,
void, (
void *ptr)
throw ());
205 _GL_FUNCDECL_RPL (free,
void, (
void *ptr));
207 _GL_CXXALIAS_RPL (free,
void, (
void *ptr));
209 _GL_CXXALIAS_SYS (free,
void, (
void *ptr));
212 _GL_CXXALIASWARN (free);
214 #elif defined GNULIB_POSIXCHECK
217 _GL_WARN_ON_USE (free,
"free is not future POSIX compliant everywhere - "
218 "use gnulib module free for portability");
223 #if @GNULIB_ALIGNED_ALLOC@
224 # if @REPLACE_ALIGNED_ALLOC@
225 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
226 # undef aligned_alloc
227 # define aligned_alloc rpl_aligned_alloc
229 _GL_FUNCDECL_RPL (aligned_alloc,
void *,
230 (
size_t alignment,
size_t size)
231 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
232 _GL_CXXALIAS_RPL (aligned_alloc,
void *, (
size_t alignment,
size_t size));
234 # if @HAVE_ALIGNED_ALLOC@
237 _GL_FUNCDECL_SYS (aligned_alloc,
void *,
238 (
size_t alignment,
size_t size)
239 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
241 _GL_CXXALIAS_SYS (aligned_alloc,
void *, (
size_t alignment,
size_t size));
244 # if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@
245 _GL_CXXALIASWARN (aligned_alloc);
248 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc
250 _GL_FUNCDECL_SYS (aligned_alloc,
void *,
251 (
size_t alignment,
size_t size)
252 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
254 # if defined GNULIB_POSIXCHECK
255 # undef aligned_alloc
256 # if HAVE_RAW_DECL_ALIGNED_ALLOC
257 _GL_WARN_ON_USE (aligned_alloc,
"aligned_alloc is not portable - "
258 "use gnulib module aligned_alloc for portability");
267 _GL_FUNCDECL_SYS (atoll,
long long, (
const char *
string)
269 _GL_ARG_NONNULL ((1)));
271 _GL_CXXALIAS_SYS (atoll,
long long, (
const char *
string));
272 _GL_CXXALIASWARN (atoll);
273 #elif defined GNULIB_POSIXCHECK
275 # if HAVE_RAW_DECL_ATOLL
276 _GL_WARN_ON_USE (atoll,
"atoll is unportable - "
277 "use gnulib module atoll for portability");
281 #if @GNULIB_CALLOC_POSIX@
282 # if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \
283 || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@)
284 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
286 # define calloc rpl_calloc
288 _GL_FUNCDECL_RPL (calloc,
void *,
289 (
size_t nmemb,
size_t size)
290 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
291 _GL_CXXALIAS_RPL (calloc,
void *, (
size_t nmemb,
size_t size));
295 _GL_FUNCDECL_SYS (calloc,
void *,
296 (
size_t nmemb,
size_t size)
297 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
299 _GL_CXXALIAS_SYS (calloc,
void *, (
size_t nmemb,
size_t size));
302 _GL_CXXALIASWARN (calloc);
305 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc
307 _GL_FUNCDECL_SYS (calloc,
void *,
308 (
size_t nmemb,
size_t size)
309 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
311 # if defined GNULIB_POSIXCHECK
314 _GL_WARN_ON_USE (calloc,
"calloc is not POSIX compliant everywhere - "
315 "use gnulib module calloc-posix for portability");
319 #if @GNULIB_CANONICALIZE_FILE_NAME@
320 # if @REPLACE_CANONICALIZE_FILE_NAME@
321 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
322 # define canonicalize_file_name rpl_canonicalize_file_name
324 _GL_FUNCDECL_RPL (canonicalize_file_name,
char *,
326 _GL_ARG_NONNULL ((1))
327 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
328 _GL_CXXALIAS_RPL (canonicalize_file_name,
char *, (
const char *name));
330 # if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11
331 _GL_FUNCDECL_SYS (canonicalize_file_name,
char *,
333 _GL_ARG_NONNULL ((1))
334 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
336 _GL_CXXALIAS_SYS (canonicalize_file_name,
char *, (
const char *name));
338 # ifndef GNULIB_defined_canonicalize_file_name
339 # define GNULIB_defined_canonicalize_file_name \
340 (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
342 _GL_CXXALIASWARN (canonicalize_file_name);
344 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name
347 _GL_FUNCDECL_SYS (canonicalize_file_name,
char *,
349 _GL_ARG_NONNULL ((1))
350 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
352 # if defined GNULIB_POSIXCHECK
353 # undef canonicalize_file_name
354 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
355 _GL_WARN_ON_USE (canonicalize_file_name,
356 "canonicalize_file_name is unportable - "
357 "use gnulib module canonicalize-lgpl for portability");
362 #if @GNULIB_MDA_ECVT@
367 # if defined _WIN32 && !defined __CYGWIN__
368 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
372 _GL_CXXALIAS_MDA (ecvt,
char *,
373 (
double number,
int ndigits,
int *decptp,
int *signp));
375 # if @HAVE_DECL_ECVT@
376 _GL_CXXALIAS_SYS (ecvt,
char *,
377 (
double number,
int ndigits,
int *decptp,
int *signp));
380 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
381 _GL_CXXALIASWARN (ecvt);
385 #if @GNULIB_MDA_FCVT@
390 # if defined _WIN32 && !defined __CYGWIN__
391 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
395 _GL_CXXALIAS_MDA (fcvt,
char *,
396 (
double number,
int ndigits,
int *decptp,
int *signp));
398 # if @HAVE_DECL_FCVT@
399 _GL_CXXALIAS_SYS (fcvt,
char *,
400 (
double number,
int ndigits,
int *decptp,
int *signp));
403 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
404 _GL_CXXALIASWARN (fcvt);
408 #if @GNULIB_MDA_GCVT@
413 # if defined _WIN32 && !defined __CYGWIN__
414 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
418 _GL_CXXALIAS_MDA (gcvt,
char *, (
double number,
int ndigits,
char *buf));
420 # if @HAVE_DECL_GCVT@
421 _GL_CXXALIAS_SYS (gcvt,
char *, (
double number,
int ndigits,
char *buf));
424 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
425 _GL_CXXALIASWARN (gcvt);
429 #if @GNULIB_GETLOADAVG@
434 # if @REPLACE_GETLOADAVG@
435 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
437 # define getloadavg rpl_getloadavg
439 _GL_FUNCDECL_RPL (getloadavg,
int, (
double loadavg[],
int nelem)
440 _GL_ARG_NONNULL ((1)));
441 _GL_CXXALIAS_RPL (getloadavg,
int, (
double loadavg[],
int nelem));
443 # if !@HAVE_DECL_GETLOADAVG@
444 _GL_FUNCDECL_SYS (getloadavg,
int, (
double loadavg[],
int nelem)
445 _GL_ARG_NONNULL ((1)));
447 _GL_CXXALIAS_SYS (getloadavg,
int, (
double loadavg[],
int nelem));
450 _GL_CXXALIASWARN (getloadavg);
452 #elif defined GNULIB_POSIXCHECK
454 # if HAVE_RAW_DECL_GETLOADAVG
455 _GL_WARN_ON_USE (getloadavg,
"getloadavg is not portable - "
456 "use gnulib module getloadavg for portability");
460 #if @GNULIB_GETPROGNAME@
463 # if @REPLACE_GETPROGNAME@
464 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
466 # define getprogname rpl_getprogname
468 # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
469 _GL_FUNCDECL_RPL (getprogname,
const char *, (
void) _GL_ATTRIBUTE_PURE);
471 _GL_FUNCDECL_RPL (getprogname,
const char *, (
void));
473 _GL_CXXALIAS_RPL (getprogname,
const char *, (
void));
475 # if !@HAVE_GETPROGNAME@
476 # if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
477 _GL_FUNCDECL_SYS (getprogname,
const char *, (
void) _GL_ATTRIBUTE_PURE);
479 _GL_FUNCDECL_SYS (getprogname,
const char *, (
void));
482 _GL_CXXALIAS_SYS (getprogname,
const char *, (
void));
485 _GL_CXXALIASWARN (getprogname);
487 #elif defined GNULIB_POSIXCHECK
489 # if HAVE_RAW_DECL_GETPROGNAME
490 _GL_WARN_ON_USE (getprogname,
"getprogname is unportable - "
491 "use gnulib module getprogname for portability");
495 #if @GNULIB_GETSUBOPT@
507 # if @REPLACE_GETSUBOPT@
508 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
510 # define getsubopt rpl_getsubopt
512 _GL_FUNCDECL_RPL (getsubopt,
int,
513 (
char **optionp,
char *
const *tokens,
char **valuep)
514 _GL_ARG_NONNULL ((1, 2, 3)));
515 _GL_CXXALIAS_RPL (getsubopt,
int,
516 (
char **optionp,
char *
const *tokens,
char **valuep));
518 # if !@HAVE_GETSUBOPT@
519 _GL_FUNCDECL_SYS (getsubopt,
int,
520 (
char **optionp,
char *
const *tokens,
char **valuep)
521 _GL_ARG_NONNULL ((1, 2, 3)));
523 _GL_CXXALIAS_SYS (getsubopt,
int,
524 (
char **optionp,
char *
const *tokens,
char **valuep));
527 _GL_CXXALIASWARN (getsubopt);
529 #elif defined GNULIB_POSIXCHECK
531 # if HAVE_RAW_DECL_GETSUBOPT
532 _GL_WARN_ON_USE (getsubopt,
"getsubopt is unportable - "
533 "use gnulib module getsubopt for portability");
541 _GL_FUNCDECL_SYS (grantpt,
int, (
int fd));
543 _GL_CXXALIAS_SYS (grantpt,
int, (
int fd));
544 _GL_CXXALIASWARN (grantpt);
545 #elif defined GNULIB_POSIXCHECK
547 # if HAVE_RAW_DECL_GRANTPT
548 _GL_WARN_ON_USE (grantpt,
"grantpt is not portable - "
549 "use gnulib module grantpt for portability");
557 #if @GNULIB_MALLOC_POSIX@
558 # if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \
559 || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@)
560 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
561 || _GL_USE_STDLIB_ALLOC)
563 # define malloc rpl_malloc
565 _GL_FUNCDECL_RPL (malloc,
void *,
567 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
568 _GL_CXXALIAS_RPL (malloc,
void *, (
size_t size));
572 _GL_FUNCDECL_SYS (malloc,
void *,
574 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
576 _GL_CXXALIAS_SYS (malloc,
void *, (
size_t size));
579 _GL_CXXALIASWARN (malloc);
582 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc
584 _GL_FUNCDECL_SYS (malloc,
void *,
586 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
588 # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
591 _GL_WARN_ON_USE (malloc,
"malloc is not POSIX compliant everywhere - "
592 "use gnulib module malloc-posix for portability");
597 #if @REPLACE_MB_CUR_MAX@
598 # if !GNULIB_defined_MB_CUR_MAX
600 int gl_MB_CUR_MAX (
void)
603 return MB_CUR_MAX + (MB_CUR_MAX == 3);
606 # define MB_CUR_MAX gl_MB_CUR_MAX ()
607 # define GNULIB_defined_MB_CUR_MAX 1
612 #if @GNULIB_MBSTOWCS@
613 # if @REPLACE_MBSTOWCS@
614 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
616 # define mbstowcs rpl_mbstowcs
618 _GL_FUNCDECL_RPL (mbstowcs,
size_t,
619 (
wchar_t *restrict dest,
const char *restrict src,
621 _GL_ARG_NONNULL ((2)));
622 _GL_CXXALIAS_RPL (mbstowcs,
size_t,
623 (
wchar_t *restrict dest,
const char *restrict src,
626 _GL_CXXALIAS_SYS (mbstowcs,
size_t,
627 (
wchar_t *restrict dest,
const char *restrict src,
631 _GL_CXXALIASWARN (mbstowcs);
633 #elif defined GNULIB_POSIXCHECK
635 # if HAVE_RAW_DECL_MBSTOWCS
636 _GL_WARN_ON_USE (mbstowcs,
"mbstowcs is unportable - "
637 "use gnulib module mbstowcs for portability");
643 # if @REPLACE_MBTOWC@
644 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
646 # define mbtowc rpl_mbtowc
648 _GL_FUNCDECL_RPL (mbtowc,
int,
649 (
wchar_t *restrict pwc,
const char *restrict s,
size_t n));
650 _GL_CXXALIAS_RPL (mbtowc,
int,
651 (
wchar_t *restrict pwc,
const char *restrict s,
size_t n));
654 _GL_FUNCDECL_SYS (mbtowc,
int,
655 (
wchar_t *restrict pwc,
const char *restrict s,
size_t n));
657 _GL_CXXALIAS_SYS (mbtowc,
int,
658 (
wchar_t *restrict pwc,
const char *restrict s,
size_t n));
661 _GL_CXXALIASWARN (mbtowc);
663 #elif defined GNULIB_POSIXCHECK
665 # if HAVE_RAW_DECL_MBTOWC
666 _GL_WARN_ON_USE (mbtowc,
"mbtowc is not portable - "
667 "use gnulib module mbtowc for portability");
678 _GL_FUNCDECL_SYS (mkdtemp,
char *, (
char * ) _GL_ARG_NONNULL ((1)));
680 _GL_CXXALIAS_SYS (mkdtemp,
char *, (
char * ));
681 _GL_CXXALIASWARN (mkdtemp);
682 #elif defined GNULIB_POSIXCHECK
684 # if HAVE_RAW_DECL_MKDTEMP
685 _GL_WARN_ON_USE (mkdtemp,
"mkdtemp is unportable - "
686 "use gnulib module mkdtemp for portability");
690 #if @GNULIB_MKOSTEMP@
703 # if @REPLACE_MKOSTEMP@
704 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
706 # define mkostemp rpl_mkostemp
708 _GL_FUNCDECL_RPL (mkostemp,
int, (
char * ,
int )
709 _GL_ARG_NONNULL ((1)));
710 _GL_CXXALIAS_RPL (mkostemp,
int, (
char * ,
int ));
712 # if !@HAVE_MKOSTEMP@
713 _GL_FUNCDECL_SYS (mkostemp,
int, (
char * ,
int )
714 _GL_ARG_NONNULL ((1)));
716 _GL_CXXALIAS_SYS (mkostemp,
int, (
char * ,
int ));
719 _GL_CXXALIASWARN (mkostemp);
721 #elif defined GNULIB_POSIXCHECK
723 # if HAVE_RAW_DECL_MKOSTEMP
724 _GL_WARN_ON_USE (mkostemp,
"mkostemp is unportable - "
725 "use gnulib module mkostemp for portability");
729 #if @GNULIB_MKOSTEMPS@
743 # if @REPLACE_MKOSTEMPS@
744 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
746 # define mkostemps rpl_mkostemps
748 _GL_FUNCDECL_RPL (mkostemps,
int,
749 (
char * ,
int ,
int )
750 _GL_ARG_NONNULL ((1)));
751 _GL_CXXALIAS_RPL (mkostemps,
int,
752 (
char * ,
int ,
int ));
754 # if !@HAVE_MKOSTEMPS@
755 _GL_FUNCDECL_SYS (mkostemps,
int,
756 (
char * ,
int ,
int )
757 _GL_ARG_NONNULL ((1)));
759 _GL_CXXALIAS_SYS (mkostemps,
int,
760 (
char * ,
int ,
int ));
763 _GL_CXXALIASWARN (mkostemps);
765 #elif defined GNULIB_POSIXCHECK
767 # if HAVE_RAW_DECL_MKOSTEMPS
768 _GL_WARN_ON_USE (mkostemps,
"mkostemps is unportable - "
769 "use gnulib module mkostemps for portability");
783 # if @REPLACE_MKSTEMP@
784 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
785 # define mkstemp rpl_mkstemp
787 _GL_FUNCDECL_RPL (mkstemp,
int, (
char * ) _GL_ARG_NONNULL ((1)));
788 _GL_CXXALIAS_RPL (mkstemp,
int, (
char * ));
790 # if ! @HAVE_MKSTEMP@
791 _GL_FUNCDECL_SYS (mkstemp,
int, (
char * ) _GL_ARG_NONNULL ((1)));
793 _GL_CXXALIAS_SYS (mkstemp,
int, (
char * ));
795 _GL_CXXALIASWARN (mkstemp);
796 #elif defined GNULIB_POSIXCHECK
798 # if HAVE_RAW_DECL_MKSTEMP
799 _GL_WARN_ON_USE (mkstemp,
"mkstemp is unportable - "
800 "use gnulib module mkstemp for portability");
804 #if @GNULIB_MKSTEMPS@
815 # if !@HAVE_MKSTEMPS@
816 _GL_FUNCDECL_SYS (mkstemps,
int, (
char * ,
int )
817 _GL_ARG_NONNULL ((1)));
819 _GL_CXXALIAS_SYS (mkstemps,
int, (
char * ,
int ));
820 _GL_CXXALIASWARN (mkstemps);
821 #elif defined GNULIB_POSIXCHECK
823 # if HAVE_RAW_DECL_MKSTEMPS
824 _GL_WARN_ON_USE (mkstemps,
"mkstemps is unportable - "
825 "use gnulib module mkstemps for portability");
829 #if @GNULIB_MDA_MKTEMP@
833 # if defined _WIN32 && !defined __CYGWIN__
834 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
836 # define mktemp _mktemp
838 _GL_CXXALIAS_MDA (mktemp,
char *, (
char * ));
840 _GL_CXXALIAS_SYS (mktemp,
char *, (
char * ));
842 _GL_CXXALIASWARN (mktemp);
846 #if @GNULIB_POSIX_MEMALIGN@
847 # if @REPLACE_POSIX_MEMALIGN@
848 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
849 # undef posix_memalign
850 # define posix_memalign rpl_posix_memalign
852 _GL_FUNCDECL_RPL (posix_memalign,
int,
853 (
void **memptr,
size_t alignment,
size_t size)
854 _GL_ARG_NONNULL ((1)));
855 _GL_CXXALIAS_RPL (posix_memalign,
int,
856 (
void **memptr,
size_t alignment,
size_t size));
858 # if @HAVE_POSIX_MEMALIGN@
859 _GL_CXXALIAS_SYS (posix_memalign,
int,
860 (
void **memptr,
size_t alignment,
size_t size));
863 # if __GLIBC__ >= 2 && @HAVE_POSIX_MEMALIGN@
864 _GL_CXXALIASWARN (posix_memalign);
866 #elif defined GNULIB_POSIXCHECK
867 # undef posix_memalign
868 # if HAVE_RAW_DECL_POSIX_MEMALIGN
869 _GL_WARN_ON_USE (posix_memalign,
"posix_memalign is not portable - "
870 "use gnulib module posix_memalign for portability");
874 #if @GNULIB_POSIX_OPENPT@
877 # if @REPLACE_POSIX_OPENPT@
878 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
880 # define posix_openpt rpl_posix_openpt
882 _GL_FUNCDECL_RPL (posix_openpt,
int, (
int flags));
883 _GL_CXXALIAS_RPL (posix_openpt,
int, (
int flags));
885 # if !@HAVE_POSIX_OPENPT@
886 _GL_FUNCDECL_SYS (posix_openpt,
int, (
int flags));
888 _GL_CXXALIAS_SYS (posix_openpt,
int, (
int flags));
891 _GL_CXXALIASWARN (posix_openpt);
893 #elif defined GNULIB_POSIXCHECK
895 # if HAVE_RAW_DECL_POSIX_OPENPT
896 _GL_WARN_ON_USE (posix_openpt,
"posix_openpt is not portable - "
897 "use gnulib module posix_openpt for portability");
904 # if @REPLACE_PTSNAME@
905 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
907 # define ptsname rpl_ptsname
909 _GL_FUNCDECL_RPL (ptsname,
char *, (
int fd));
910 _GL_CXXALIAS_RPL (ptsname,
char *, (
int fd));
913 _GL_FUNCDECL_SYS (ptsname,
char *, (
int fd));
915 _GL_CXXALIAS_SYS (ptsname,
char *, (
int fd));
917 _GL_CXXALIASWARN (ptsname);
918 #elif defined GNULIB_POSIXCHECK
920 # if HAVE_RAW_DECL_PTSNAME
921 _GL_WARN_ON_USE (ptsname,
"ptsname is not portable - "
922 "use gnulib module ptsname for portability");
926 #if @GNULIB_PTSNAME_R@
930 # if @REPLACE_PTSNAME_R@
931 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
933 # define ptsname_r rpl_ptsname_r
935 _GL_FUNCDECL_RPL (ptsname_r,
int, (
int fd,
char *buf,
size_t len));
936 _GL_CXXALIAS_RPL (ptsname_r,
int, (
int fd,
char *buf,
size_t len));
938 # if !@HAVE_PTSNAME_R@
939 _GL_FUNCDECL_SYS (ptsname_r,
int, (
int fd,
char *buf,
size_t len));
941 _GL_CXXALIAS_SYS (ptsname_r,
int, (
int fd,
char *buf,
size_t len));
943 # ifndef GNULIB_defined_ptsname_r
944 # define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
946 _GL_CXXALIASWARN (ptsname_r);
947 #elif defined GNULIB_POSIXCHECK
949 # if HAVE_RAW_DECL_PTSNAME_R
950 _GL_WARN_ON_USE (ptsname_r,
"ptsname_r is not portable - "
951 "use gnulib module ptsname_r for portability");
956 # if @REPLACE_PUTENV@
957 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
959 # define putenv rpl_putenv
961 _GL_FUNCDECL_RPL (putenv,
int, (
char *
string) _GL_ARG_NONNULL ((1)));
962 _GL_CXXALIAS_RPL (putenv,
int, (
char *
string));
963 # elif defined _WIN32 && !defined __CYGWIN__
964 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
966 # define putenv _putenv
968 _GL_CXXALIAS_MDA (putenv,
int, (
char *
string));
970 _GL_CXXALIAS_SYS (putenv,
int, (
char *
string));
972 _GL_CXXALIASWARN (putenv);
973 #elif @GNULIB_MDA_PUTENV@
977 # if defined _WIN32 && !defined __CYGWIN__
978 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
980 # define putenv _putenv
984 _GL_CXXALIAS_MDA_CAST (putenv,
int, (
char *
string));
986 _GL_CXXALIAS_SYS (putenv,
int, (
char *
string));
988 _GL_CXXALIASWARN (putenv);
998 # if !GNULIB_defined_qsort_r_fn_types
999 typedef int (*_gl_qsort_r_compar_fn) (
void const *,
void const *,
void *);
1000 # define GNULIB_defined_qsort_r_fn_types 1
1005 # if @REPLACE_QSORT_R@
1006 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1008 # define qsort_r rpl_qsort_r
1010 _GL_FUNCDECL_RPL (qsort_r,
void, (
void *base,
size_t nmemb,
size_t size,
1011 _gl_qsort_r_compar_fn compare,
1012 void *arg) _GL_ARG_NONNULL ((1, 4)));
1013 _GL_CXXALIAS_RPL (qsort_r,
void, (
void *base,
size_t nmemb,
size_t size,
1014 _gl_qsort_r_compar_fn compare,
1017 # if !@HAVE_QSORT_R@
1018 _GL_FUNCDECL_SYS (qsort_r,
void, (
void *base,
size_t nmemb,
size_t size,
1019 _gl_qsort_r_compar_fn compare,
1020 void *arg) _GL_ARG_NONNULL ((1, 4)));
1022 _GL_CXXALIAS_SYS (qsort_r,
void, (
void *base,
size_t nmemb,
size_t size,
1023 _gl_qsort_r_compar_fn compare,
1026 _GL_CXXALIASWARN (qsort_r);
1027 #elif defined GNULIB_POSIXCHECK
1029 # if HAVE_RAW_DECL_QSORT_R
1030 _GL_WARN_ON_USE (qsort_r,
"qsort_r is not portable - "
1031 "use gnulib module qsort_r for portability");
1036 #if @GNULIB_RANDOM_R@
1037 # if !@HAVE_RANDOM_R@
1039 # define RAND_MAX 2147483647
1046 # if @REPLACE_RANDOM@
1047 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1049 # define random rpl_random
1051 _GL_FUNCDECL_RPL (random,
long, (
void));
1052 _GL_CXXALIAS_RPL (random,
long, (
void));
1055 _GL_FUNCDECL_SYS (random,
long, (
void));
1059 _GL_CXXALIAS_SYS_CAST (random,
long, (
void));
1062 _GL_CXXALIASWARN (random);
1064 #elif defined GNULIB_POSIXCHECK
1066 # if HAVE_RAW_DECL_RANDOM
1067 _GL_WARN_ON_USE (random,
"random is unportable - "
1068 "use gnulib module random for portability");
1073 # if @REPLACE_RANDOM@
1074 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1076 # define srandom rpl_srandom
1078 _GL_FUNCDECL_RPL (srandom,
void, (
unsigned int seed));
1079 _GL_CXXALIAS_RPL (srandom,
void, (
unsigned int seed));
1082 _GL_FUNCDECL_SYS (srandom,
void, (
unsigned int seed));
1086 _GL_CXXALIAS_SYS_CAST (srandom,
void, (
unsigned int seed));
1089 _GL_CXXALIASWARN (srandom);
1091 #elif defined GNULIB_POSIXCHECK
1093 # if HAVE_RAW_DECL_SRANDOM
1094 _GL_WARN_ON_USE (srandom,
"srandom is unportable - "
1095 "use gnulib module random for portability");
1100 # if @REPLACE_INITSTATE@
1101 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1103 # define initstate rpl_initstate
1105 _GL_FUNCDECL_RPL (initstate,
char *,
1106 (
unsigned int seed,
char *buf,
size_t buf_size)
1107 _GL_ARG_NONNULL ((2)));
1108 _GL_CXXALIAS_RPL (initstate,
char *,
1109 (
unsigned int seed,
char *buf,
size_t buf_size));
1111 # if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@
1112 _GL_FUNCDECL_SYS (initstate,
char *,
1113 (
unsigned int seed,
char *buf,
size_t buf_size)
1114 _GL_ARG_NONNULL ((2)));
1118 _GL_CXXALIAS_SYS_CAST (initstate,
char *,
1119 (
unsigned int seed,
char *buf,
size_t buf_size));
1122 _GL_CXXALIASWARN (initstate);
1124 #elif defined GNULIB_POSIXCHECK
1126 # if HAVE_RAW_DECL_INITSTATE
1127 _GL_WARN_ON_USE (initstate,
"initstate is unportable - "
1128 "use gnulib module random for portability");
1133 # if @REPLACE_SETSTATE@
1134 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1136 # define setstate rpl_setstate
1138 _GL_FUNCDECL_RPL (setstate,
char *, (
char *arg_state) _GL_ARG_NONNULL ((1)));
1139 _GL_CXXALIAS_RPL (setstate,
char *, (
char *arg_state));
1141 # if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@
1142 _GL_FUNCDECL_SYS (setstate,
char *, (
char *arg_state) _GL_ARG_NONNULL ((1)));
1146 _GL_CXXALIAS_SYS_CAST (setstate,
char *, (
char *arg_state));
1149 _GL_CXXALIASWARN (setstate);
1151 #elif defined GNULIB_POSIXCHECK
1153 # if HAVE_RAW_DECL_SETSTATE
1154 _GL_WARN_ON_USE (setstate,
"setstate is unportable - "
1155 "use gnulib module random for portability");
1160 #if @GNULIB_RANDOM_R@
1161 # if @REPLACE_RANDOM_R@
1162 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1164 # define random_r rpl_random_r
1166 _GL_FUNCDECL_RPL (random_r,
int, (
struct random_data *buf, int32_t *result)
1167 _GL_ARG_NONNULL ((1, 2)));
1168 _GL_CXXALIAS_RPL (random_r,
int, (
struct random_data *buf, int32_t *result));
1170 # if !@HAVE_RANDOM_R@
1171 _GL_FUNCDECL_SYS (random_r,
int, (
struct random_data *buf, int32_t *result)
1172 _GL_ARG_NONNULL ((1, 2)));
1174 _GL_CXXALIAS_SYS (random_r,
int, (
struct random_data *buf, int32_t *result));
1176 _GL_CXXALIASWARN (random_r);
1177 #elif defined GNULIB_POSIXCHECK
1179 # if HAVE_RAW_DECL_RANDOM_R
1180 _GL_WARN_ON_USE (random_r,
"random_r is unportable - "
1181 "use gnulib module random_r for portability");
1185 #if @GNULIB_RANDOM_R@
1186 # if @REPLACE_RANDOM_R@
1187 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1189 # define srandom_r rpl_srandom_r
1191 _GL_FUNCDECL_RPL (srandom_r,
int,
1192 (
unsigned int seed,
struct random_data *rand_state)
1193 _GL_ARG_NONNULL ((2)));
1194 _GL_CXXALIAS_RPL (srandom_r,
int,
1195 (
unsigned int seed,
struct random_data *rand_state));
1197 # if !@HAVE_RANDOM_R@
1198 _GL_FUNCDECL_SYS (srandom_r,
int,
1199 (
unsigned int seed,
struct random_data *rand_state)
1200 _GL_ARG_NONNULL ((2)));
1202 _GL_CXXALIAS_SYS (srandom_r,
int,
1203 (
unsigned int seed,
struct random_data *rand_state));
1205 _GL_CXXALIASWARN (srandom_r);
1206 #elif defined GNULIB_POSIXCHECK
1208 # if HAVE_RAW_DECL_SRANDOM_R
1209 _GL_WARN_ON_USE (srandom_r,
"srandom_r is unportable - "
1210 "use gnulib module random_r for portability");
1214 #if @GNULIB_RANDOM_R@
1215 # if @REPLACE_RANDOM_R@
1216 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1218 # define initstate_r rpl_initstate_r
1220 _GL_FUNCDECL_RPL (initstate_r,
int,
1221 (
unsigned int seed,
char *buf,
size_t buf_size,
1222 struct random_data *rand_state)
1223 _GL_ARG_NONNULL ((2, 4)));
1224 _GL_CXXALIAS_RPL (initstate_r,
int,
1225 (
unsigned int seed,
char *buf,
size_t buf_size,
1226 struct random_data *rand_state));
1228 # if !@HAVE_RANDOM_R@
1229 _GL_FUNCDECL_SYS (initstate_r,
int,
1230 (
unsigned int seed,
char *buf,
size_t buf_size,
1231 struct random_data *rand_state)
1232 _GL_ARG_NONNULL ((2, 4)));
1236 _GL_CXXALIAS_SYS_CAST (initstate_r,
int,
1237 (
unsigned int seed,
char *buf,
size_t buf_size,
1238 struct random_data *rand_state));
1240 _GL_CXXALIASWARN (initstate_r);
1241 #elif defined GNULIB_POSIXCHECK
1243 # if HAVE_RAW_DECL_INITSTATE_R
1244 _GL_WARN_ON_USE (initstate_r,
"initstate_r is unportable - "
1245 "use gnulib module random_r for portability");
1249 #if @GNULIB_RANDOM_R@
1250 # if @REPLACE_RANDOM_R@
1251 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1253 # define setstate_r rpl_setstate_r
1255 _GL_FUNCDECL_RPL (setstate_r,
int,
1256 (
char *arg_state,
struct random_data *rand_state)
1257 _GL_ARG_NONNULL ((1, 2)));
1258 _GL_CXXALIAS_RPL (setstate_r,
int,
1259 (
char *arg_state,
struct random_data *rand_state));
1261 # if !@HAVE_RANDOM_R@
1262 _GL_FUNCDECL_SYS (setstate_r,
int,
1263 (
char *arg_state,
struct random_data *rand_state)
1264 _GL_ARG_NONNULL ((1, 2)));
1268 _GL_CXXALIAS_SYS_CAST (setstate_r,
int,
1269 (
char *arg_state,
struct random_data *rand_state));
1271 _GL_CXXALIASWARN (setstate_r);
1272 #elif defined GNULIB_POSIXCHECK
1274 # if HAVE_RAW_DECL_SETSTATE_R
1275 _GL_WARN_ON_USE (setstate_r,
"setstate_r is unportable - "
1276 "use gnulib module random_r for portability");
1281 #if @GNULIB_REALLOC_POSIX@
1282 # if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \
1283 || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@)
1284 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1285 || _GL_USE_STDLIB_ALLOC)
1287 # define realloc rpl_realloc
1289 _GL_FUNCDECL_RPL (realloc,
void *, (
void *ptr,
size_t size)
1290 _GL_ATTRIBUTE_DEALLOC_FREE);
1291 _GL_CXXALIAS_RPL (realloc,
void *, (
void *ptr,
size_t size));
1295 _GL_FUNCDECL_SYS (realloc,
void *, (
void *ptr,
size_t size)
1296 _GL_ATTRIBUTE_DEALLOC_FREE);
1298 _GL_CXXALIAS_SYS (realloc,
void *, (
void *ptr,
size_t size));
1301 _GL_CXXALIASWARN (realloc);
1304 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc
1306 _GL_FUNCDECL_SYS (realloc,
void *, (
void *ptr,
size_t size)
1307 _GL_ATTRIBUTE_DEALLOC_FREE);
1309 # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1312 _GL_WARN_ON_USE (realloc,
"realloc is not POSIX compliant everywhere - "
1313 "use gnulib module realloc-posix for portability");
1318 #if @GNULIB_REALLOCARRAY@
1319 # if @REPLACE_REALLOCARRAY@
1320 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1321 # undef reallocarray
1322 # define reallocarray rpl_reallocarray
1324 _GL_FUNCDECL_RPL (reallocarray,
void *,
1325 (
void *ptr,
size_t nmemb,
size_t size));
1326 _GL_CXXALIAS_RPL (reallocarray,
void *,
1327 (
void *ptr,
size_t nmemb,
size_t size));
1329 # if ! @HAVE_REALLOCARRAY@
1330 _GL_FUNCDECL_SYS (reallocarray,
void *,
1331 (
void *ptr,
size_t nmemb,
size_t size));
1333 _GL_CXXALIAS_SYS (reallocarray,
void *,
1334 (
void *ptr,
size_t nmemb,
size_t size));
1337 _GL_CXXALIASWARN (reallocarray);
1339 #elif defined GNULIB_POSIXCHECK
1340 # undef reallocarray
1341 # if HAVE_RAW_DECL_REALLOCARRAY
1342 _GL_WARN_ON_USE (reallocarray,
"reallocarray is not portable - "
1343 "use gnulib module reallocarray for portability");
1347 #if @GNULIB_REALPATH@
1348 # if @REPLACE_REALPATH@
1349 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1350 # define realpath rpl_realpath
1352 _GL_FUNCDECL_RPL (realpath,
char *,
1353 (
const char *restrict name,
char *restrict resolved)
1354 _GL_ARG_NONNULL ((1)));
1355 _GL_CXXALIAS_RPL (realpath,
char *,
1356 (
const char *restrict name,
char *restrict resolved));
1358 # if !@HAVE_REALPATH@
1359 _GL_FUNCDECL_SYS (realpath,
char *,
1360 (
const char *restrict name,
char *restrict resolved)
1361 _GL_ARG_NONNULL ((1)));
1363 _GL_CXXALIAS_SYS (realpath,
char *,
1364 (
const char *restrict name,
char *restrict resolved));
1366 _GL_CXXALIASWARN (realpath);
1367 #elif defined GNULIB_POSIXCHECK
1369 # if HAVE_RAW_DECL_REALPATH
1370 _GL_WARN_ON_USE (realpath,
"realpath is unportable - use gnulib module "
1371 "canonicalize or canonicalize-lgpl for portability");
1375 #if @GNULIB_RPMATCH@
1378 # if !@HAVE_RPMATCH@
1379 _GL_FUNCDECL_SYS (rpmatch,
int, (
const char *response) _GL_ARG_NONNULL ((1)));
1381 _GL_CXXALIAS_SYS (rpmatch,
int, (
const char *response));
1382 _GL_CXXALIASWARN (rpmatch);
1383 #elif defined GNULIB_POSIXCHECK
1385 # if HAVE_RAW_DECL_RPMATCH
1386 _GL_WARN_ON_USE (rpmatch,
"rpmatch is unportable - "
1387 "use gnulib module rpmatch for portability");
1391 #if @GNULIB_SECURE_GETENV@
1393 # if !@HAVE_SECURE_GETENV@
1394 _GL_FUNCDECL_SYS (secure_getenv,
char *,
1395 (
char const *name) _GL_ARG_NONNULL ((1)));
1397 _GL_CXXALIAS_SYS (secure_getenv,
char *, (
char const *name));
1398 _GL_CXXALIASWARN (secure_getenv);
1399 #elif defined GNULIB_POSIXCHECK
1400 # undef secure_getenv
1401 # if HAVE_RAW_DECL_SECURE_GETENV
1402 _GL_WARN_ON_USE (secure_getenv,
"secure_getenv is unportable - "
1403 "use gnulib module secure_getenv for portability");
1410 # if @REPLACE_SETENV@
1411 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1413 # define setenv rpl_setenv
1415 _GL_FUNCDECL_RPL (setenv,
int,
1416 (
const char *name,
const char *value,
int replace)
1417 _GL_ARG_NONNULL ((1)));
1418 _GL_CXXALIAS_RPL (setenv,
int,
1419 (
const char *name,
const char *value,
int replace));
1421 # if !@HAVE_DECL_SETENV@
1422 _GL_FUNCDECL_SYS (setenv,
int,
1423 (
const char *name,
const char *value,
int replace)
1424 _GL_ARG_NONNULL ((1)));
1426 _GL_CXXALIAS_SYS (setenv,
int,
1427 (
const char *name,
const char *value,
int replace));
1429 # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
1430 _GL_CXXALIASWARN (setenv);
1432 #elif defined GNULIB_POSIXCHECK
1434 # if HAVE_RAW_DECL_SETENV
1435 _GL_WARN_ON_USE (setenv,
"setenv is unportable - "
1436 "use gnulib module setenv for portability");
1442 # if @REPLACE_STRTOD@
1443 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1444 # define strtod rpl_strtod
1446 # define GNULIB_defined_strtod_function 1
1447 _GL_FUNCDECL_RPL (strtod,
double,
1448 (
const char *restrict str,
char **restrict endp)
1449 _GL_ARG_NONNULL ((1)));
1450 _GL_CXXALIAS_RPL (strtod,
double,
1451 (
const char *restrict str,
char **restrict endp));
1454 _GL_FUNCDECL_SYS (strtod,
double,
1455 (
const char *restrict str,
char **restrict endp)
1456 _GL_ARG_NONNULL ((1)));
1458 _GL_CXXALIAS_SYS (strtod,
double,
1459 (
const char *restrict str,
char **restrict endp));
1462 _GL_CXXALIASWARN (strtod);
1464 #elif defined GNULIB_POSIXCHECK
1466 # if HAVE_RAW_DECL_STRTOD
1467 _GL_WARN_ON_USE (strtod,
"strtod is unportable - "
1468 "use gnulib module strtod for portability");
1472 #if @GNULIB_STRTOLD@
1474 # if @REPLACE_STRTOLD@
1475 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1476 # define strtold rpl_strtold
1478 # define GNULIB_defined_strtold_function 1
1479 _GL_FUNCDECL_RPL (strtold,
long double,
1480 (
const char *restrict str,
char **restrict endp)
1481 _GL_ARG_NONNULL ((1)));
1482 _GL_CXXALIAS_RPL (strtold,
long double,
1483 (
const char *restrict str,
char **restrict endp));
1485 # if !@HAVE_STRTOLD@
1486 _GL_FUNCDECL_SYS (strtold,
long double,
1487 (
const char *restrict str,
char **restrict endp)
1488 _GL_ARG_NONNULL ((1)));
1490 _GL_CXXALIAS_SYS (strtold,
long double,
1491 (
const char *restrict str,
char **restrict endp));
1493 _GL_CXXALIASWARN (strtold);
1494 #elif defined GNULIB_POSIXCHECK
1496 # if HAVE_RAW_DECL_STRTOLD
1497 _GL_WARN_ON_USE (strtold,
"strtold is unportable - "
1498 "use gnulib module strtold for portability");
1511 # if @REPLACE_STRTOL@
1512 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1513 # define strtol rpl_strtol
1515 # define GNULIB_defined_strtol_function 1
1516 _GL_FUNCDECL_RPL (strtol,
long,
1517 (
const char *restrict
string,
char **restrict endptr,
1519 _GL_ARG_NONNULL ((1)));
1520 _GL_CXXALIAS_RPL (strtol,
long,
1521 (
const char *restrict
string,
char **restrict endptr,
1525 _GL_FUNCDECL_SYS (strtol,
long,
1526 (
const char *restrict
string,
char **restrict endptr,
1528 _GL_ARG_NONNULL ((1)));
1530 _GL_CXXALIAS_SYS (strtol,
long,
1531 (
const char *restrict
string,
char **restrict endptr,
1535 _GL_CXXALIASWARN (strtol);
1537 #elif defined GNULIB_POSIXCHECK
1539 # if HAVE_RAW_DECL_STRTOL
1540 _GL_WARN_ON_USE (strtol,
"strtol is unportable - "
1541 "use gnulib module strtol for portability");
1545 #if @GNULIB_STRTOLL@
1554 # if @REPLACE_STRTOLL@
1555 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1556 # define strtoll rpl_strtoll
1558 # define GNULIB_defined_strtoll_function 1
1559 _GL_FUNCDECL_RPL (strtoll,
long long,
1560 (
const char *restrict
string,
char **restrict endptr,
1562 _GL_ARG_NONNULL ((1)));
1563 _GL_CXXALIAS_RPL (strtoll,
long long,
1564 (
const char *restrict
string,
char **restrict endptr,
1567 # if !@HAVE_STRTOLL@
1568 _GL_FUNCDECL_SYS (strtoll,
long long,
1569 (
const char *restrict
string,
char **restrict endptr,
1571 _GL_ARG_NONNULL ((1)));
1573 _GL_CXXALIAS_SYS (strtoll,
long long,
1574 (
const char *restrict
string,
char **restrict endptr,
1577 _GL_CXXALIASWARN (strtoll);
1578 #elif defined GNULIB_POSIXCHECK
1580 # if HAVE_RAW_DECL_STRTOLL
1581 _GL_WARN_ON_USE (strtoll,
"strtoll is unportable - "
1582 "use gnulib module strtoll for portability");
1586 #if @GNULIB_STRTOUL@
1594 # if @REPLACE_STRTOUL@
1595 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1596 # define strtoul rpl_strtoul
1598 # define GNULIB_defined_strtoul_function 1
1599 _GL_FUNCDECL_RPL (strtoul,
unsigned long,
1600 (
const char *restrict
string,
char **restrict endptr,
1602 _GL_ARG_NONNULL ((1)));
1603 _GL_CXXALIAS_RPL (strtoul,
unsigned long,
1604 (
const char *restrict
string,
char **restrict endptr,
1607 # if !@HAVE_STRTOUL@
1608 _GL_FUNCDECL_SYS (strtoul,
unsigned long,
1609 (
const char *restrict
string,
char **restrict endptr,
1611 _GL_ARG_NONNULL ((1)));
1613 _GL_CXXALIAS_SYS (strtoul,
unsigned long,
1614 (
const char *restrict
string,
char **restrict endptr,
1618 _GL_CXXALIASWARN (strtoul);
1620 #elif defined GNULIB_POSIXCHECK
1622 # if HAVE_RAW_DECL_STRTOUL
1623 _GL_WARN_ON_USE (strtoul,
"strtoul is unportable - "
1624 "use gnulib module strtoul for portability");
1628 #if @GNULIB_STRTOULL@
1637 # if @REPLACE_STRTOULL@
1638 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1639 # define strtoull rpl_strtoull
1641 # define GNULIB_defined_strtoull_function 1
1642 _GL_FUNCDECL_RPL (strtoull,
unsigned long long,
1643 (
const char *restrict
string,
char **restrict endptr,
1645 _GL_ARG_NONNULL ((1)));
1646 _GL_CXXALIAS_RPL (strtoull,
unsigned long long,
1647 (
const char *restrict
string,
char **restrict endptr,
1650 # if !@HAVE_STRTOULL@
1651 _GL_FUNCDECL_SYS (strtoull,
unsigned long long,
1652 (
const char *restrict
string,
char **restrict endptr,
1654 _GL_ARG_NONNULL ((1)));
1656 _GL_CXXALIAS_SYS (strtoull,
unsigned long long,
1657 (
const char *restrict
string,
char **restrict endptr,
1660 _GL_CXXALIASWARN (strtoull);
1661 #elif defined GNULIB_POSIXCHECK
1663 # if HAVE_RAW_DECL_STRTOULL
1664 _GL_WARN_ON_USE (strtoull,
"strtoull is unportable - "
1665 "use gnulib module strtoull for portability");
1669 #if @GNULIB_UNLOCKPT@
1672 # if !@HAVE_UNLOCKPT@
1673 _GL_FUNCDECL_SYS (unlockpt,
int, (
int fd));
1675 _GL_CXXALIAS_SYS (unlockpt,
int, (
int fd));
1676 _GL_CXXALIASWARN (unlockpt);
1677 #elif defined GNULIB_POSIXCHECK
1679 # if HAVE_RAW_DECL_UNLOCKPT
1680 _GL_WARN_ON_USE (unlockpt,
"unlockpt is not portable - "
1681 "use gnulib module unlockpt for portability");
1685 #if @GNULIB_UNSETENV@
1687 # if @REPLACE_UNSETENV@
1688 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1690 # define unsetenv rpl_unsetenv
1692 _GL_FUNCDECL_RPL (unsetenv,
int, (
const char *name) _GL_ARG_NONNULL ((1)));
1693 _GL_CXXALIAS_RPL (unsetenv,
int, (
const char *name));
1695 # if !@HAVE_DECL_UNSETENV@
1696 _GL_FUNCDECL_SYS (unsetenv,
int, (
const char *name) _GL_ARG_NONNULL ((1)));
1698 _GL_CXXALIAS_SYS (unsetenv,
int, (
const char *name));
1700 # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
1701 _GL_CXXALIASWARN (unsetenv);
1703 #elif defined GNULIB_POSIXCHECK
1705 # if HAVE_RAW_DECL_UNSETENV
1706 _GL_WARN_ON_USE (unsetenv,
"unsetenv is unportable - "
1707 "use gnulib module unsetenv for portability");
1713 # if @REPLACE_WCTOMB@
1714 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1716 # define wctomb rpl_wctomb
1718 _GL_FUNCDECL_RPL (wctomb,
int, (
char *s,
wchar_t wc));
1719 _GL_CXXALIAS_RPL (wctomb,
int, (
char *s,
wchar_t wc));
1721 _GL_CXXALIAS_SYS (wctomb,
int, (
char *s,
wchar_t wc));
1724 _GL_CXXALIASWARN (wctomb);