1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #if __GNUC__ >= 3
20 @PRAGMA_SYSTEM_HEADER@
21 #endif
22 @PRAGMA_COLUMNS@
23
24 #if defined __need_system_stdlib_h || defined __need_malloc_and_calloc
25
26
27
28 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
29
30 #else
31
32
33 #ifndef _@GUARD_PREFIX@_STDLIB_H
34
35
36 #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
37
38 #ifndef _@GUARD_PREFIX@_STDLIB_H
39 #define _@GUARD_PREFIX@_STDLIB_H
40
41
42 #include <stddef.h>
43
44
45 #if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS
46 # include <sys/wait.h>
47 #endif
48
49
50 #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
51
52
53 # include <sys/time.h>
54 # include <sys/loadavg.h>
55 #endif
56
57
58 #if defined _WIN32 && !defined __CYGWIN__
59 # include <io.h>
60 #endif
61
62 #if @GNULIB_RANDOM_R@
63
64
65
66
67 # if @HAVE_RANDOM_H@
68 # include <random.h>
69 # endif
70
71 # if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
72 # include <stdint.h>
73 # endif
74
75 # if !@HAVE_STRUCT_RANDOM_DATA@
76
77
78 # if !GNULIB_defined_struct_random_data
79 struct random_data
80 {
81 int32_t *fptr;
82 int32_t *rptr;
83 int32_t *state;
84 int rand_type;
85 int rand_deg;
86 int rand_sep;
87 int32_t *end_ptr;
88 };
89 # define GNULIB_defined_struct_random_data 1
90 # endif
91 # endif
92 #endif
93
94 #if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__)
95
96
97
98
99
100 # include <unistd.h>
101 #endif
102
103
104
105
106 #ifndef _GL_ATTRIBUTE_DEALLOC
107 # if __GNUC__ >= 11
108 # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
109 # else
110 # define _GL_ATTRIBUTE_DEALLOC(f, i)
111 # endif
112 #endif
113
114
115
116
117 #ifndef _GL_ATTRIBUTE_DEALLOC_FREE
118 # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
119 #endif
120
121
122
123
124 #ifndef _GL_ATTRIBUTE_MALLOC
125 # if __GNUC__ >= 3 || defined __clang__
126 # define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
127 # else
128 # define _GL_ATTRIBUTE_MALLOC
129 # endif
130 #endif
131
132
133
134 #ifndef _GL_ATTRIBUTE_PURE
135 # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__
136 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
137 # else
138 # define _GL_ATTRIBUTE_PURE
139 # endif
140 #endif
141
142
143
144
145
146
147
148
149
150
151
152 #ifndef EXIT_SUCCESS
153 # define EXIT_SUCCESS 0
154 #endif
155
156
157 #ifndef EXIT_FAILURE
158 # define EXIT_FAILURE 1
159 #elif EXIT_FAILURE != 1
160 # undef EXIT_FAILURE
161 # define EXIT_FAILURE 1
162 #endif
163
164
165 #if @GNULIB__EXIT@
166
167
168 # if !@HAVE__EXIT@
169 _GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
170 # endif
171 _GL_CXXALIAS_SYS (_Exit, void, (int status));
172 _GL_CXXALIASWARN (_Exit);
173 #elif defined GNULIB_POSIXCHECK
174 # undef _Exit
175 # if HAVE_RAW_DECL__EXIT
176 _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
177 "use gnulib module _Exit for portability");
178 # endif
179 #endif
180
181
182 #if @GNULIB_FREE_POSIX@
183 # if @REPLACE_FREE@
184 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
185 # undef free
186 # define free rpl_free
187 # endif
188 # if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
189 _GL_FUNCDECL_RPL (free, void, (void *ptr) throw ());
190 # else
191 _GL_FUNCDECL_RPL (free, void, (void *ptr));
192 # endif
193 _GL_CXXALIAS_RPL (free, void, (void *ptr));
194 # else
195 _GL_CXXALIAS_SYS (free, void, (void *ptr));
196 # endif
197 # if __GLIBC__ >= 2
198 _GL_CXXALIASWARN (free);
199 # endif
200 #elif defined GNULIB_POSIXCHECK
201 # undef free
202
203 _GL_WARN_ON_USE (free, "free is not future POSIX compliant everywhere - "
204 "use gnulib module free for portability");
205 #endif
206
207
208
209 #if @GNULIB_ALIGNED_ALLOC@
210 # if @REPLACE_ALIGNED_ALLOC@
211 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
212 # undef aligned_alloc
213 # define aligned_alloc rpl_aligned_alloc
214 # endif
215 _GL_FUNCDECL_RPL (aligned_alloc, void *,
216 (size_t alignment, size_t size)
217 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
218 _GL_CXXALIAS_RPL (aligned_alloc, void *, (size_t alignment, size_t size));
219 # else
220 # if @HAVE_ALIGNED_ALLOC@
221 # if __GNUC__ >= 11
222
223 _GL_FUNCDECL_SYS (aligned_alloc, void *,
224 (size_t alignment, size_t size)
225 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
226 # endif
227 _GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
228 # endif
229 # endif
230 # if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@
231 _GL_CXXALIASWARN (aligned_alloc);
232 # endif
233 #else
234 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined aligned_alloc
235
236 _GL_FUNCDECL_SYS (aligned_alloc, void *,
237 (size_t alignment, size_t size)
238 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
239 # endif
240 # if defined GNULIB_POSIXCHECK
241 # undef aligned_alloc
242 # if HAVE_RAW_DECL_ALIGNED_ALLOC
243 _GL_WARN_ON_USE (aligned_alloc, "aligned_alloc is not portable - "
244 "use gnulib module aligned_alloc for portability");
245 # endif
246 # endif
247 #endif
248
249 #if @GNULIB_ATOLL@
250
251
252 # if !@HAVE_ATOLL@
253 _GL_FUNCDECL_SYS (atoll, long long, (const char *string)
254 _GL_ATTRIBUTE_PURE
255 _GL_ARG_NONNULL ((1)));
256 # endif
257 _GL_CXXALIAS_SYS (atoll, long long, (const char *string));
258 _GL_CXXALIASWARN (atoll);
259 #elif defined GNULIB_POSIXCHECK
260 # undef atoll
261 # if HAVE_RAW_DECL_ATOLL
262 _GL_WARN_ON_USE (atoll, "atoll is unportable - "
263 "use gnulib module atoll for portability");
264 # endif
265 #endif
266
267 #if @GNULIB_CALLOC_POSIX@
268 # if (@GNULIB_CALLOC_POSIX@ && @REPLACE_CALLOC_FOR_CALLOC_POSIX@) \
269 || (@GNULIB_CALLOC_GNU@ && @REPLACE_CALLOC_FOR_CALLOC_GNU@)
270 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
271 # undef calloc
272 # define calloc rpl_calloc
273 # endif
274 _GL_FUNCDECL_RPL (calloc, void *,
275 (size_t nmemb, size_t size)
276 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
277 _GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size));
278 # else
279 # if __GNUC__ >= 11
280
281 _GL_FUNCDECL_SYS (calloc, void *,
282 (size_t nmemb, size_t size)
283 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
284 # endif
285 _GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size));
286 # endif
287 # if __GLIBC__ >= 2
288 _GL_CXXALIASWARN (calloc);
289 # endif
290 #else
291 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined calloc
292
293 _GL_FUNCDECL_SYS (calloc, void *,
294 (size_t nmemb, size_t size)
295 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
296 # endif
297 # if defined GNULIB_POSIXCHECK
298 # undef calloc
299
300 _GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
301 "use gnulib module calloc-posix for portability");
302 # endif
303 #endif
304
305 #if @GNULIB_CANONICALIZE_FILE_NAME@
306 # if @REPLACE_CANONICALIZE_FILE_NAME@
307 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
308 # define canonicalize_file_name rpl_canonicalize_file_name
309 # endif
310 _GL_FUNCDECL_RPL (canonicalize_file_name, char *,
311 (const char *name)
312 _GL_ARG_NONNULL ((1))
313 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
314 _GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name));
315 # else
316 # if !@HAVE_CANONICALIZE_FILE_NAME@ || __GNUC__ >= 11
317 _GL_FUNCDECL_SYS (canonicalize_file_name, char *,
318 (const char *name)
319 _GL_ARG_NONNULL ((1))
320 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
321 # endif
322 _GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
323 # endif
324 # ifndef GNULIB_defined_canonicalize_file_name
325 # define GNULIB_defined_canonicalize_file_name \
326 (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
327 # endif
328 _GL_CXXALIASWARN (canonicalize_file_name);
329 #else
330 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined canonicalize_file_name
331
332
333 _GL_FUNCDECL_SYS (canonicalize_file_name, char *,
334 (const char *name)
335 _GL_ARG_NONNULL ((1))
336 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
337 # endif
338 # if defined GNULIB_POSIXCHECK
339 # undef canonicalize_file_name
340 # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
341 _GL_WARN_ON_USE (canonicalize_file_name,
342 "canonicalize_file_name is unportable - "
343 "use gnulib module canonicalize-lgpl for portability");
344 # endif
345 # endif
346 #endif
347
348 #if @GNULIB_MDA_ECVT@
349
350
351
352
353 # if defined _WIN32 && !defined __CYGWIN__
354 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
355 # undef ecvt
356 # define ecvt _ecvt
357 # endif
358 _GL_CXXALIAS_MDA (ecvt, char *,
359 (double number, int ndigits, int *decptp, int *signp));
360 # else
361 # if @HAVE_DECL_ECVT@
362 _GL_CXXALIAS_SYS (ecvt, char *,
363 (double number, int ndigits, int *decptp, int *signp));
364 # endif
365 # endif
366 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_ECVT@
367 _GL_CXXALIASWARN (ecvt);
368 # endif
369 #endif
370
371 #if @GNULIB_MDA_FCVT@
372
373
374
375
376 # if defined _WIN32 && !defined __CYGWIN__
377 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
378 # undef fcvt
379 # define fcvt _fcvt
380 # endif
381 _GL_CXXALIAS_MDA (fcvt, char *,
382 (double number, int ndigits, int *decptp, int *signp));
383 # else
384 # if @HAVE_DECL_FCVT@
385 _GL_CXXALIAS_SYS (fcvt, char *,
386 (double number, int ndigits, int *decptp, int *signp));
387 # endif
388 # endif
389 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_FCVT@
390 _GL_CXXALIASWARN (fcvt);
391 # endif
392 #endif
393
394 #if @GNULIB_MDA_GCVT@
395
396
397
398
399 # if defined _WIN32 && !defined __CYGWIN__
400 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
401 # undef gcvt
402 # define gcvt _gcvt
403 # endif
404 _GL_CXXALIAS_MDA (gcvt, char *, (double number, int ndigits, char *buf));
405 # else
406 # if @HAVE_DECL_GCVT@
407 _GL_CXXALIAS_SYS (gcvt, char *, (double number, int ndigits, char *buf));
408 # endif
409 # endif
410 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_DECL_GCVT@
411 _GL_CXXALIASWARN (gcvt);
412 # endif
413 #endif
414
415 #if @GNULIB_GETLOADAVG@
416
417
418
419
420 # if !@HAVE_DECL_GETLOADAVG@
421 _GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
422 _GL_ARG_NONNULL ((1)));
423 # endif
424 _GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
425 _GL_CXXALIASWARN (getloadavg);
426 #elif defined GNULIB_POSIXCHECK
427 # undef getloadavg
428 # if HAVE_RAW_DECL_GETLOADAVG
429 _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
430 "use gnulib module getloadavg for portability");
431 # endif
432 #endif
433
434 #if @GNULIB_GETSUBOPT@
435
436
437
438
439
440
441
442
443
444
445
446 # if !@HAVE_GETSUBOPT@
447 _GL_FUNCDECL_SYS (getsubopt, int,
448 (char **optionp, char *const *tokens, char **valuep)
449 _GL_ARG_NONNULL ((1, 2, 3)));
450 # endif
451 _GL_CXXALIAS_SYS (getsubopt, int,
452 (char **optionp, char *const *tokens, char **valuep));
453 _GL_CXXALIASWARN (getsubopt);
454 #elif defined GNULIB_POSIXCHECK
455 # undef getsubopt
456 # if HAVE_RAW_DECL_GETSUBOPT
457 _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
458 "use gnulib module getsubopt for portability");
459 # endif
460 #endif
461
462 #if @GNULIB_GRANTPT@
463
464
465 # if !@HAVE_GRANTPT@
466 _GL_FUNCDECL_SYS (grantpt, int, (int fd));
467 # endif
468 _GL_CXXALIAS_SYS (grantpt, int, (int fd));
469 _GL_CXXALIASWARN (grantpt);
470 #elif defined GNULIB_POSIXCHECK
471 # undef grantpt
472 # if HAVE_RAW_DECL_GRANTPT
473 _GL_WARN_ON_USE (grantpt, "grantpt is not portable - "
474 "use gnulib module grantpt for portability");
475 # endif
476 #endif
477
478
479
480
481
482 #if @GNULIB_MALLOC_POSIX@
483 # if (@GNULIB_MALLOC_POSIX@ && @REPLACE_MALLOC_FOR_MALLOC_POSIX@) \
484 || (@GNULIB_MALLOC_GNU@ && @REPLACE_MALLOC_FOR_MALLOC_GNU@)
485 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
486 || _GL_USE_STDLIB_ALLOC)
487 # undef malloc
488 # define malloc rpl_malloc
489 # endif
490 _GL_FUNCDECL_RPL (malloc, void *,
491 (size_t size)
492 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
493 _GL_CXXALIAS_RPL (malloc, void *, (size_t size));
494 # else
495 # if __GNUC__ >= 11
496
497 _GL_FUNCDECL_SYS (malloc, void *,
498 (size_t size)
499 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
500 # endif
501 _GL_CXXALIAS_SYS (malloc, void *, (size_t size));
502 # endif
503 # if __GLIBC__ >= 2
504 _GL_CXXALIASWARN (malloc);
505 # endif
506 #else
507 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined malloc
508
509 _GL_FUNCDECL_SYS (malloc, void *,
510 (size_t size)
511 _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
512 # endif
513 # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
514 # undef malloc
515
516 _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
517 "use gnulib module malloc-posix for portability");
518 # endif
519 #endif
520
521
522 #if @GNULIB_MBTOWC@
523 # if @REPLACE_MBTOWC@
524 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
525 # undef mbtowc
526 # define mbtowc rpl_mbtowc
527 # endif
528 _GL_FUNCDECL_RPL (mbtowc, int,
529 (wchar_t *restrict pwc, const char *restrict s, size_t n));
530 _GL_CXXALIAS_RPL (mbtowc, int,
531 (wchar_t *restrict pwc, const char *restrict s, size_t n));
532 # else
533 # if !@HAVE_MBTOWC@
534 _GL_FUNCDECL_SYS (mbtowc, int,
535 (wchar_t *restrict pwc, const char *restrict s, size_t n));
536 # endif
537 _GL_CXXALIAS_SYS (mbtowc, int,
538 (wchar_t *restrict pwc, const char *restrict s, size_t n));
539 # endif
540 # if __GLIBC__ >= 2
541 _GL_CXXALIASWARN (mbtowc);
542 # endif
543 #elif defined GNULIB_POSIXCHECK
544 # undef mbtowc
545 # if HAVE_RAW_DECL_MBTOWC
546 _GL_WARN_ON_USE (mbtowc, "mbtowc is not portable - "
547 "use gnulib module mbtowc for portability");
548 # endif
549 #endif
550
551 #if @GNULIB_MKDTEMP@
552
553
554
555
556
557 # if !@HAVE_MKDTEMP@
558 _GL_FUNCDECL_SYS (mkdtemp, char *, (char * ) _GL_ARG_NONNULL ((1)));
559 # endif
560 _GL_CXXALIAS_SYS (mkdtemp, char *, (char * ));
561 _GL_CXXALIASWARN (mkdtemp);
562 #elif defined GNULIB_POSIXCHECK
563 # undef mkdtemp
564 # if HAVE_RAW_DECL_MKDTEMP
565 _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
566 "use gnulib module mkdtemp for portability");
567 # endif
568 #endif
569
570 #if @GNULIB_MKOSTEMP@
571
572
573
574
575
576
577
578
579
580
581
582
583 # if !@HAVE_MKOSTEMP@
584 _GL_FUNCDECL_SYS (mkostemp, int, (char * , int )
585 _GL_ARG_NONNULL ((1)));
586 # endif
587 _GL_CXXALIAS_SYS (mkostemp, int, (char * , int ));
588 _GL_CXXALIASWARN (mkostemp);
589 #elif defined GNULIB_POSIXCHECK
590 # undef mkostemp
591 # if HAVE_RAW_DECL_MKOSTEMP
592 _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
593 "use gnulib module mkostemp for portability");
594 # endif
595 #endif
596
597 #if @GNULIB_MKOSTEMPS@
598
599
600
601
602
603
604
605
606
607
608
609
610
611 # if !@HAVE_MKOSTEMPS@
612 _GL_FUNCDECL_SYS (mkostemps, int,
613 (char * , int , int )
614 _GL_ARG_NONNULL ((1)));
615 # endif
616 _GL_CXXALIAS_SYS (mkostemps, int,
617 (char * , int , int ));
618 _GL_CXXALIASWARN (mkostemps);
619 #elif defined GNULIB_POSIXCHECK
620 # undef mkostemps
621 # if HAVE_RAW_DECL_MKOSTEMPS
622 _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
623 "use gnulib module mkostemps for portability");
624 # endif
625 #endif
626
627 #if @GNULIB_MKSTEMP@
628
629
630
631
632
633
634
635
636
637 # if @REPLACE_MKSTEMP@
638 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
639 # define mkstemp rpl_mkstemp
640 # endif
641 _GL_FUNCDECL_RPL (mkstemp, int, (char * ) _GL_ARG_NONNULL ((1)));
642 _GL_CXXALIAS_RPL (mkstemp, int, (char * ));
643 # else
644 # if ! @HAVE_MKSTEMP@
645 _GL_FUNCDECL_SYS (mkstemp, int, (char * ) _GL_ARG_NONNULL ((1)));
646 # endif
647 _GL_CXXALIAS_SYS (mkstemp, int, (char * ));
648 # endif
649 _GL_CXXALIASWARN (mkstemp);
650 #elif defined GNULIB_POSIXCHECK
651 # undef mkstemp
652 # if HAVE_RAW_DECL_MKSTEMP
653 _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
654 "use gnulib module mkstemp for portability");
655 # endif
656 #endif
657
658 #if @GNULIB_MKSTEMPS@
659
660
661
662
663
664
665
666
667
668
669 # if !@HAVE_MKSTEMPS@
670 _GL_FUNCDECL_SYS (mkstemps, int, (char * , int )
671 _GL_ARG_NONNULL ((1)));
672 # endif
673 _GL_CXXALIAS_SYS (mkstemps, int, (char * , int ));
674 _GL_CXXALIASWARN (mkstemps);
675 #elif defined GNULIB_POSIXCHECK
676 # undef mkstemps
677 # if HAVE_RAW_DECL_MKSTEMPS
678 _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
679 "use gnulib module mkstemps for portability");
680 # endif
681 #endif
682
683 #if @GNULIB_MDA_MKTEMP@
684
685
686
687 # if defined _WIN32 && !defined __CYGWIN__
688 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
689 # undef mktemp
690 # define mktemp _mktemp
691 # endif
692 _GL_CXXALIAS_MDA (mktemp, char *, (char * ));
693 # else
694 _GL_CXXALIAS_SYS (mktemp, char *, (char * ));
695 # endif
696 _GL_CXXALIASWARN (mktemp);
697 #endif
698
699
700 #if @GNULIB_POSIX_MEMALIGN@
701 # if @REPLACE_POSIX_MEMALIGN@
702 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
703 # undef posix_memalign
704 # define posix_memalign rpl_posix_memalign
705 # endif
706 _GL_FUNCDECL_RPL (posix_memalign, int,
707 (void **memptr, size_t alignment, size_t size)
708 _GL_ARG_NONNULL ((1)));
709 _GL_CXXALIAS_RPL (posix_memalign, int,
710 (void **memptr, size_t alignment, size_t size));
711 # else
712 # if @HAVE_POSIX_MEMALIGN@
713 _GL_CXXALIAS_SYS (posix_memalign, int,
714 (void **memptr, size_t alignment, size_t size));
715 # endif
716 # endif
717 # if @HAVE_POSIX_MEMALIGN@
718 _GL_CXXALIASWARN (posix_memalign);
719 # endif
720 #elif defined GNULIB_POSIXCHECK
721 # undef posix_memalign
722 # if HAVE_RAW_DECL_POSIX_MEMALIGN
723 _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
724 "use gnulib module posix_memalign for portability");
725 # endif
726 #endif
727
728 #if @GNULIB_POSIX_OPENPT@
729
730
731 # if !@HAVE_POSIX_OPENPT@
732 _GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
733 # endif
734 _GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
735 _GL_CXXALIASWARN (posix_openpt);
736 #elif defined GNULIB_POSIXCHECK
737 # undef posix_openpt
738 # if HAVE_RAW_DECL_POSIX_OPENPT
739 _GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - "
740 "use gnulib module posix_openpt for portability");
741 # endif
742 #endif
743
744 #if @GNULIB_PTSNAME@
745
746
747 # if @REPLACE_PTSNAME@
748 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
749 # undef ptsname
750 # define ptsname rpl_ptsname
751 # endif
752 _GL_FUNCDECL_RPL (ptsname, char *, (int fd));
753 _GL_CXXALIAS_RPL (ptsname, char *, (int fd));
754 # else
755 # if !@HAVE_PTSNAME@
756 _GL_FUNCDECL_SYS (ptsname, char *, (int fd));
757 # endif
758 _GL_CXXALIAS_SYS (ptsname, char *, (int fd));
759 # endif
760 _GL_CXXALIASWARN (ptsname);
761 #elif defined GNULIB_POSIXCHECK
762 # undef ptsname
763 # if HAVE_RAW_DECL_PTSNAME
764 _GL_WARN_ON_USE (ptsname, "ptsname is not portable - "
765 "use gnulib module ptsname for portability");
766 # endif
767 #endif
768
769 #if @GNULIB_PTSNAME_R@
770
771
772
773 # if @REPLACE_PTSNAME_R@
774 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
775 # undef ptsname_r
776 # define ptsname_r rpl_ptsname_r
777 # endif
778 _GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
779 _GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len));
780 # else
781 # if !@HAVE_PTSNAME_R@
782 _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
783 # endif
784 _GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
785 # endif
786 # ifndef GNULIB_defined_ptsname_r
787 # define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
788 # endif
789 _GL_CXXALIASWARN (ptsname_r);
790 #elif defined GNULIB_POSIXCHECK
791 # undef ptsname_r
792 # if HAVE_RAW_DECL_PTSNAME_R
793 _GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - "
794 "use gnulib module ptsname_r for portability");
795 # endif
796 #endif
797
798 #if @GNULIB_PUTENV@
799 # if @REPLACE_PUTENV@
800 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
801 # undef putenv
802 # define putenv rpl_putenv
803 # endif
804 _GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1)));
805 _GL_CXXALIAS_RPL (putenv, int, (char *string));
806 # elif defined _WIN32 && !defined __CYGWIN__
807 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
808 # undef putenv
809 # define putenv _putenv
810 # endif
811 _GL_CXXALIAS_MDA (putenv, int, (char *string));
812 # else
813 _GL_CXXALIAS_SYS (putenv, int, (char *string));
814 # endif
815 _GL_CXXALIASWARN (putenv);
816 #elif @GNULIB_MDA_PUTENV@
817
818
819
820 # if defined _WIN32 && !defined __CYGWIN__
821 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
822 # undef putenv
823 # define putenv _putenv
824 # endif
825
826
827 _GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
828 # else
829 _GL_CXXALIAS_SYS (putenv, int, (char *string));
830 # endif
831 _GL_CXXALIASWARN (putenv);
832 #endif
833
834 #if @GNULIB_QSORT_R@
835
836
837
838 # ifdef __cplusplus
839 extern "C" {
840 # endif
841 # if !GNULIB_defined_qsort_r_fn_types
842 typedef int (*_gl_qsort_r_compar_fn) (void const *, void const *, void *);
843 # define GNULIB_defined_qsort_r_fn_types 1
844 # endif
845 # ifdef __cplusplus
846 }
847 # endif
848 # if @REPLACE_QSORT_R@
849 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
850 # undef qsort_r
851 # define qsort_r rpl_qsort_r
852 # endif
853 _GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
854 _gl_qsort_r_compar_fn compare,
855 void *arg) _GL_ARG_NONNULL ((1, 4)));
856 _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
857 _gl_qsort_r_compar_fn compare,
858 void *arg));
859 # else
860 # if !@HAVE_QSORT_R@
861 _GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
862 _gl_qsort_r_compar_fn compare,
863 void *arg) _GL_ARG_NONNULL ((1, 4)));
864 # endif
865 _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
866 _gl_qsort_r_compar_fn compare,
867 void *arg));
868 # endif
869 _GL_CXXALIASWARN (qsort_r);
870 #elif defined GNULIB_POSIXCHECK
871 # undef qsort_r
872 # if HAVE_RAW_DECL_QSORT_R
873 _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
874 "use gnulib module qsort_r for portability");
875 # endif
876 #endif
877
878
879 #if @GNULIB_RANDOM_R@
880 # if !@HAVE_RANDOM_R@
881 # ifndef RAND_MAX
882 # define RAND_MAX 2147483647
883 # endif
884 # endif
885 #endif
886
887
888 #if @GNULIB_RANDOM@
889 # if @REPLACE_RANDOM@
890 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
891 # undef random
892 # define random rpl_random
893 # endif
894 _GL_FUNCDECL_RPL (random, long, (void));
895 _GL_CXXALIAS_RPL (random, long, (void));
896 # else
897 # if !@HAVE_RANDOM@
898 _GL_FUNCDECL_SYS (random, long, (void));
899 # endif
900
901
902 _GL_CXXALIAS_SYS_CAST (random, long, (void));
903 # endif
904 _GL_CXXALIASWARN (random);
905 #elif defined GNULIB_POSIXCHECK
906 # undef random
907 # if HAVE_RAW_DECL_RANDOM
908 _GL_WARN_ON_USE (random, "random is unportable - "
909 "use gnulib module random for portability");
910 # endif
911 #endif
912
913 #if @GNULIB_RANDOM@
914 # if @REPLACE_RANDOM@
915 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
916 # undef srandom
917 # define srandom rpl_srandom
918 # endif
919 _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed));
920 _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed));
921 # else
922 # if !@HAVE_RANDOM@
923 _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
924 # endif
925
926
927 _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
928 # endif
929 _GL_CXXALIASWARN (srandom);
930 #elif defined GNULIB_POSIXCHECK
931 # undef srandom
932 # if HAVE_RAW_DECL_SRANDOM
933 _GL_WARN_ON_USE (srandom, "srandom is unportable - "
934 "use gnulib module random for portability");
935 # endif
936 #endif
937
938 #if @GNULIB_RANDOM@
939 # if @REPLACE_INITSTATE@
940 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
941 # undef initstate
942 # define initstate rpl_initstate
943 # endif
944 _GL_FUNCDECL_RPL (initstate, char *,
945 (unsigned int seed, char *buf, size_t buf_size)
946 _GL_ARG_NONNULL ((2)));
947 _GL_CXXALIAS_RPL (initstate, char *,
948 (unsigned int seed, char *buf, size_t buf_size));
949 # else
950 # if !@HAVE_INITSTATE@ || !@HAVE_DECL_INITSTATE@
951 _GL_FUNCDECL_SYS (initstate, char *,
952 (unsigned int seed, char *buf, size_t buf_size)
953 _GL_ARG_NONNULL ((2)));
954 # endif
955
956
957 _GL_CXXALIAS_SYS_CAST (initstate, char *,
958 (unsigned int seed, char *buf, size_t buf_size));
959 # endif
960 _GL_CXXALIASWARN (initstate);
961 #elif defined GNULIB_POSIXCHECK
962 # undef initstate
963 # if HAVE_RAW_DECL_INITSTATE
964 _GL_WARN_ON_USE (initstate, "initstate is unportable - "
965 "use gnulib module random for portability");
966 # endif
967 #endif
968
969 #if @GNULIB_RANDOM@
970 # if @REPLACE_SETSTATE@
971 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
972 # undef setstate
973 # define setstate rpl_setstate
974 # endif
975 _GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
976 _GL_CXXALIAS_RPL (setstate, char *, (char *arg_state));
977 # else
978 # if !@HAVE_SETSTATE@ || !@HAVE_DECL_SETSTATE@
979 _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
980 # endif
981
982
983 _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
984 # endif
985 _GL_CXXALIASWARN (setstate);
986 #elif defined GNULIB_POSIXCHECK
987 # undef setstate
988 # if HAVE_RAW_DECL_SETSTATE
989 _GL_WARN_ON_USE (setstate, "setstate is unportable - "
990 "use gnulib module random for portability");
991 # endif
992 #endif
993
994
995 #if @GNULIB_RANDOM_R@
996 # if @REPLACE_RANDOM_R@
997 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
998 # undef random_r
999 # define random_r rpl_random_r
1000 # endif
1001 _GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result)
1002 _GL_ARG_NONNULL ((1, 2)));
1003 _GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result));
1004 # else
1005 # if !@HAVE_RANDOM_R@
1006 _GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result)
1007 _GL_ARG_NONNULL ((1, 2)));
1008 # endif
1009 _GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result));
1010 # endif
1011 _GL_CXXALIASWARN (random_r);
1012 #elif defined GNULIB_POSIXCHECK
1013 # undef random_r
1014 # if HAVE_RAW_DECL_RANDOM_R
1015 _GL_WARN_ON_USE (random_r, "random_r is unportable - "
1016 "use gnulib module random_r for portability");
1017 # endif
1018 #endif
1019
1020 #if @GNULIB_RANDOM_R@
1021 # if @REPLACE_RANDOM_R@
1022 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1023 # undef srandom_r
1024 # define srandom_r rpl_srandom_r
1025 # endif
1026 _GL_FUNCDECL_RPL (srandom_r, int,
1027 (unsigned int seed, struct random_data *rand_state)
1028 _GL_ARG_NONNULL ((2)));
1029 _GL_CXXALIAS_RPL (srandom_r, int,
1030 (unsigned int seed, struct random_data *rand_state));
1031 # else
1032 # if !@HAVE_RANDOM_R@
1033 _GL_FUNCDECL_SYS (srandom_r, int,
1034 (unsigned int seed, struct random_data *rand_state)
1035 _GL_ARG_NONNULL ((2)));
1036 # endif
1037 _GL_CXXALIAS_SYS (srandom_r, int,
1038 (unsigned int seed, struct random_data *rand_state));
1039 # endif
1040 _GL_CXXALIASWARN (srandom_r);
1041 #elif defined GNULIB_POSIXCHECK
1042 # undef srandom_r
1043 # if HAVE_RAW_DECL_SRANDOM_R
1044 _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
1045 "use gnulib module random_r for portability");
1046 # endif
1047 #endif
1048
1049 #if @GNULIB_RANDOM_R@
1050 # if @REPLACE_RANDOM_R@
1051 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1052 # undef initstate_r
1053 # define initstate_r rpl_initstate_r
1054 # endif
1055 _GL_FUNCDECL_RPL (initstate_r, int,
1056 (unsigned int seed, char *buf, size_t buf_size,
1057 struct random_data *rand_state)
1058 _GL_ARG_NONNULL ((2, 4)));
1059 _GL_CXXALIAS_RPL (initstate_r, int,
1060 (unsigned int seed, char *buf, size_t buf_size,
1061 struct random_data *rand_state));
1062 # else
1063 # if !@HAVE_RANDOM_R@
1064 _GL_FUNCDECL_SYS (initstate_r, int,
1065 (unsigned int seed, char *buf, size_t buf_size,
1066 struct random_data *rand_state)
1067 _GL_ARG_NONNULL ((2, 4)));
1068 # endif
1069
1070
1071 _GL_CXXALIAS_SYS_CAST (initstate_r, int,
1072 (unsigned int seed, char *buf, size_t buf_size,
1073 struct random_data *rand_state));
1074 # endif
1075 _GL_CXXALIASWARN (initstate_r);
1076 #elif defined GNULIB_POSIXCHECK
1077 # undef initstate_r
1078 # if HAVE_RAW_DECL_INITSTATE_R
1079 _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
1080 "use gnulib module random_r for portability");
1081 # endif
1082 #endif
1083
1084 #if @GNULIB_RANDOM_R@
1085 # if @REPLACE_RANDOM_R@
1086 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1087 # undef setstate_r
1088 # define setstate_r rpl_setstate_r
1089 # endif
1090 _GL_FUNCDECL_RPL (setstate_r, int,
1091 (char *arg_state, struct random_data *rand_state)
1092 _GL_ARG_NONNULL ((1, 2)));
1093 _GL_CXXALIAS_RPL (setstate_r, int,
1094 (char *arg_state, struct random_data *rand_state));
1095 # else
1096 # if !@HAVE_RANDOM_R@
1097 _GL_FUNCDECL_SYS (setstate_r, int,
1098 (char *arg_state, struct random_data *rand_state)
1099 _GL_ARG_NONNULL ((1, 2)));
1100 # endif
1101
1102
1103 _GL_CXXALIAS_SYS_CAST (setstate_r, int,
1104 (char *arg_state, struct random_data *rand_state));
1105 # endif
1106 _GL_CXXALIASWARN (setstate_r);
1107 #elif defined GNULIB_POSIXCHECK
1108 # undef setstate_r
1109 # if HAVE_RAW_DECL_SETSTATE_R
1110 _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
1111 "use gnulib module random_r for portability");
1112 # endif
1113 #endif
1114
1115
1116 #if @GNULIB_REALLOC_POSIX@
1117 # if (@GNULIB_REALLOC_POSIX@ && @REPLACE_REALLOC_FOR_REALLOC_POSIX@) \
1118 || (@GNULIB_REALLOC_GNU@ && @REPLACE_REALLOC_FOR_REALLOC_GNU@)
1119 # if !((defined __cplusplus && defined GNULIB_NAMESPACE) \
1120 || _GL_USE_STDLIB_ALLOC)
1121 # undef realloc
1122 # define realloc rpl_realloc
1123 # endif
1124 _GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)
1125 _GL_ATTRIBUTE_DEALLOC_FREE);
1126 _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size));
1127 # else
1128 # if __GNUC__ >= 11
1129
1130 _GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
1131 _GL_ATTRIBUTE_DEALLOC_FREE);
1132 # endif
1133 _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size));
1134 # endif
1135 # if __GLIBC__ >= 2
1136 _GL_CXXALIASWARN (realloc);
1137 # endif
1138 #else
1139 # if @GNULIB_FREE_POSIX@ && __GNUC__ >= 11 && !defined realloc
1140
1141 _GL_FUNCDECL_SYS (realloc, void *, (void *ptr, size_t size)
1142 _GL_ATTRIBUTE_DEALLOC_FREE);
1143 # endif
1144 # if defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC
1145 # undef realloc
1146
1147 _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
1148 "use gnulib module realloc-posix for portability");
1149 # endif
1150 #endif
1151
1152
1153 #if @GNULIB_REALLOCARRAY@
1154 # if @REPLACE_REALLOCARRAY@
1155 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1156 # undef reallocarray
1157 # define reallocarray rpl_reallocarray
1158 # endif
1159 _GL_FUNCDECL_RPL (reallocarray, void *,
1160 (void *ptr, size_t nmemb, size_t size));
1161 _GL_CXXALIAS_RPL (reallocarray, void *,
1162 (void *ptr, size_t nmemb, size_t size));
1163 # else
1164 # if ! @HAVE_REALLOCARRAY@
1165 _GL_FUNCDECL_SYS (reallocarray, void *,
1166 (void *ptr, size_t nmemb, size_t size));
1167 # endif
1168 _GL_CXXALIAS_SYS (reallocarray, void *,
1169 (void *ptr, size_t nmemb, size_t size));
1170 # endif
1171 _GL_CXXALIASWARN (reallocarray);
1172 #elif defined GNULIB_POSIXCHECK
1173 # undef reallocarray
1174 # if HAVE_RAW_DECL_REALLOCARRAY
1175 _GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - "
1176 "use gnulib module reallocarray for portability");
1177 # endif
1178 #endif
1179
1180 #if @GNULIB_REALPATH@
1181 # if @REPLACE_REALPATH@
1182 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1183 # define realpath rpl_realpath
1184 # endif
1185 _GL_FUNCDECL_RPL (realpath, char *,
1186 (const char *restrict name, char *restrict resolved)
1187 _GL_ARG_NONNULL ((1)));
1188 _GL_CXXALIAS_RPL (realpath, char *,
1189 (const char *restrict name, char *restrict resolved));
1190 # else
1191 # if !@HAVE_REALPATH@
1192 _GL_FUNCDECL_SYS (realpath, char *,
1193 (const char *restrict name, char *restrict resolved)
1194 _GL_ARG_NONNULL ((1)));
1195 # endif
1196 _GL_CXXALIAS_SYS (realpath, char *,
1197 (const char *restrict name, char *restrict resolved));
1198 # endif
1199 _GL_CXXALIASWARN (realpath);
1200 #elif defined GNULIB_POSIXCHECK
1201 # undef realpath
1202 # if HAVE_RAW_DECL_REALPATH
1203 _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
1204 "canonicalize or canonicalize-lgpl for portability");
1205 # endif
1206 #endif
1207
1208 #if @GNULIB_RPMATCH@
1209
1210
1211 # if !@HAVE_RPMATCH@
1212 _GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1)));
1213 # endif
1214 _GL_CXXALIAS_SYS (rpmatch, int, (const char *response));
1215 _GL_CXXALIASWARN (rpmatch);
1216 #elif defined GNULIB_POSIXCHECK
1217 # undef rpmatch
1218 # if HAVE_RAW_DECL_RPMATCH
1219 _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
1220 "use gnulib module rpmatch for portability");
1221 # endif
1222 #endif
1223
1224 #if @GNULIB_SECURE_GETENV@
1225
1226 # if !@HAVE_SECURE_GETENV@
1227 _GL_FUNCDECL_SYS (secure_getenv, char *,
1228 (char const *name) _GL_ARG_NONNULL ((1)));
1229 # endif
1230 _GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name));
1231 _GL_CXXALIASWARN (secure_getenv);
1232 #elif defined GNULIB_POSIXCHECK
1233 # undef secure_getenv
1234 # if HAVE_RAW_DECL_SECURE_GETENV
1235 _GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - "
1236 "use gnulib module secure_getenv for portability");
1237 # endif
1238 #endif
1239
1240 #if @GNULIB_SETENV@
1241
1242
1243 # if @REPLACE_SETENV@
1244 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1245 # undef setenv
1246 # define setenv rpl_setenv
1247 # endif
1248 _GL_FUNCDECL_RPL (setenv, int,
1249 (const char *name, const char *value, int replace)
1250 _GL_ARG_NONNULL ((1)));
1251 _GL_CXXALIAS_RPL (setenv, int,
1252 (const char *name, const char *value, int replace));
1253 # else
1254 # if !@HAVE_DECL_SETENV@
1255 _GL_FUNCDECL_SYS (setenv, int,
1256 (const char *name, const char *value, int replace)
1257 _GL_ARG_NONNULL ((1)));
1258 # endif
1259 _GL_CXXALIAS_SYS (setenv, int,
1260 (const char *name, const char *value, int replace));
1261 # endif
1262 # if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@)
1263 _GL_CXXALIASWARN (setenv);
1264 # endif
1265 #elif defined GNULIB_POSIXCHECK
1266 # undef setenv
1267 # if HAVE_RAW_DECL_SETENV
1268 _GL_WARN_ON_USE (setenv, "setenv is unportable - "
1269 "use gnulib module setenv for portability");
1270 # endif
1271 #endif
1272
1273 #if @GNULIB_STRTOD@
1274
1275 # if @REPLACE_STRTOD@
1276 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1277 # define strtod rpl_strtod
1278 # endif
1279 # define GNULIB_defined_strtod_function 1
1280 _GL_FUNCDECL_RPL (strtod, double,
1281 (const char *restrict str, char **restrict endp)
1282 _GL_ARG_NONNULL ((1)));
1283 _GL_CXXALIAS_RPL (strtod, double,
1284 (const char *restrict str, char **restrict endp));
1285 # else
1286 # if !@HAVE_STRTOD@
1287 _GL_FUNCDECL_SYS (strtod, double,
1288 (const char *restrict str, char **restrict endp)
1289 _GL_ARG_NONNULL ((1)));
1290 # endif
1291 _GL_CXXALIAS_SYS (strtod, double,
1292 (const char *restrict str, char **restrict endp));
1293 # endif
1294 # if __GLIBC__ >= 2
1295 _GL_CXXALIASWARN (strtod);
1296 # endif
1297 #elif defined GNULIB_POSIXCHECK
1298 # undef strtod
1299 # if HAVE_RAW_DECL_STRTOD
1300 _GL_WARN_ON_USE (strtod, "strtod is unportable - "
1301 "use gnulib module strtod for portability");
1302 # endif
1303 #endif
1304
1305 #if @GNULIB_STRTOLD@
1306
1307 # if @REPLACE_STRTOLD@
1308 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1309 # define strtold rpl_strtold
1310 # endif
1311 # define GNULIB_defined_strtold_function 1
1312 _GL_FUNCDECL_RPL (strtold, long double,
1313 (const char *restrict str, char **restrict endp)
1314 _GL_ARG_NONNULL ((1)));
1315 _GL_CXXALIAS_RPL (strtold, long double,
1316 (const char *restrict str, char **restrict endp));
1317 # else
1318 # if !@HAVE_STRTOLD@
1319 _GL_FUNCDECL_SYS (strtold, long double,
1320 (const char *restrict str, char **restrict endp)
1321 _GL_ARG_NONNULL ((1)));
1322 # endif
1323 _GL_CXXALIAS_SYS (strtold, long double,
1324 (const char *restrict str, char **restrict endp));
1325 # endif
1326 _GL_CXXALIASWARN (strtold);
1327 #elif defined GNULIB_POSIXCHECK
1328 # undef strtold
1329 # if HAVE_RAW_DECL_STRTOLD
1330 _GL_WARN_ON_USE (strtold, "strtold is unportable - "
1331 "use gnulib module strtold for portability");
1332 # endif
1333 #endif
1334
1335 #if @GNULIB_STRTOL@
1336
1337
1338
1339
1340
1341
1342
1343
1344 # if @REPLACE_STRTOL@
1345 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1346 # define strtol rpl_strtol
1347 # endif
1348 # define GNULIB_defined_strtol_function 1
1349 _GL_FUNCDECL_RPL (strtol, long,
1350 (const char *restrict string, char **restrict endptr,
1351 int base)
1352 _GL_ARG_NONNULL ((1)));
1353 _GL_CXXALIAS_RPL (strtol, long,
1354 (const char *restrict string, char **restrict endptr,
1355 int base));
1356 # else
1357 # if !@HAVE_STRTOL@
1358 _GL_FUNCDECL_SYS (strtol, long,
1359 (const char *restrict string, char **restrict endptr,
1360 int base)
1361 _GL_ARG_NONNULL ((1)));
1362 # endif
1363 _GL_CXXALIAS_SYS (strtol, long,
1364 (const char *restrict string, char **restrict endptr,
1365 int base));
1366 # endif
1367 # if __GLIBC__ >= 2
1368 _GL_CXXALIASWARN (strtol);
1369 # endif
1370 #elif defined GNULIB_POSIXCHECK
1371 # undef strtol
1372 # if HAVE_RAW_DECL_STRTOL
1373 _GL_WARN_ON_USE (strtol, "strtol is unportable - "
1374 "use gnulib module strtol for portability");
1375 # endif
1376 #endif
1377
1378 #if @GNULIB_STRTOLL@
1379
1380
1381
1382
1383
1384
1385
1386
1387 # if @REPLACE_STRTOLL@
1388 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1389 # define strtoll rpl_strtoll
1390 # endif
1391 # define GNULIB_defined_strtoll_function 1
1392 _GL_FUNCDECL_RPL (strtoll, long long,
1393 (const char *restrict string, char **restrict endptr,
1394 int base)
1395 _GL_ARG_NONNULL ((1)));
1396 _GL_CXXALIAS_RPL (strtoll, long long,
1397 (const char *restrict string, char **restrict endptr,
1398 int base));
1399 # else
1400 # if !@HAVE_STRTOLL@
1401 _GL_FUNCDECL_SYS (strtoll, long long,
1402 (const char *restrict string, char **restrict endptr,
1403 int base)
1404 _GL_ARG_NONNULL ((1)));
1405 # endif
1406 _GL_CXXALIAS_SYS (strtoll, long long,
1407 (const char *restrict string, char **restrict endptr,
1408 int base));
1409 # endif
1410 _GL_CXXALIASWARN (strtoll);
1411 #elif defined GNULIB_POSIXCHECK
1412 # undef strtoll
1413 # if HAVE_RAW_DECL_STRTOLL
1414 _GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
1415 "use gnulib module strtoll for portability");
1416 # endif
1417 #endif
1418
1419 #if @GNULIB_STRTOUL@
1420
1421
1422
1423
1424
1425
1426
1427 # if @REPLACE_STRTOUL@
1428 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1429 # define strtoul rpl_strtoul
1430 # endif
1431 # define GNULIB_defined_strtoul_function 1
1432 _GL_FUNCDECL_RPL (strtoul, unsigned long,
1433 (const char *restrict string, char **restrict endptr,
1434 int base)
1435 _GL_ARG_NONNULL ((1)));
1436 _GL_CXXALIAS_RPL (strtoul, unsigned long,
1437 (const char *restrict string, char **restrict endptr,
1438 int base));
1439 # else
1440 # if !@HAVE_STRTOUL@
1441 _GL_FUNCDECL_SYS (strtoul, unsigned long,
1442 (const char *restrict string, char **restrict endptr,
1443 int base)
1444 _GL_ARG_NONNULL ((1)));
1445 # endif
1446 _GL_CXXALIAS_SYS (strtoul, unsigned long,
1447 (const char *restrict string, char **restrict endptr,
1448 int base));
1449 # endif
1450 # if __GLIBC__ >= 2
1451 _GL_CXXALIASWARN (strtoul);
1452 # endif
1453 #elif defined GNULIB_POSIXCHECK
1454 # undef strtoul
1455 # if HAVE_RAW_DECL_STRTOUL
1456 _GL_WARN_ON_USE (strtoul, "strtoul is unportable - "
1457 "use gnulib module strtoul for portability");
1458 # endif
1459 #endif
1460
1461 #if @GNULIB_STRTOULL@
1462
1463
1464
1465
1466
1467
1468
1469
1470 # if @REPLACE_STRTOULL@
1471 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1472 # define strtoull rpl_strtoull
1473 # endif
1474 # define GNULIB_defined_strtoull_function 1
1475 _GL_FUNCDECL_RPL (strtoull, unsigned long long,
1476 (const char *restrict string, char **restrict endptr,
1477 int base)
1478 _GL_ARG_NONNULL ((1)));
1479 _GL_CXXALIAS_RPL (strtoull, unsigned long long,
1480 (const char *restrict string, char **restrict endptr,
1481 int base));
1482 # else
1483 # if !@HAVE_STRTOULL@
1484 _GL_FUNCDECL_SYS (strtoull, unsigned long long,
1485 (const char *restrict string, char **restrict endptr,
1486 int base)
1487 _GL_ARG_NONNULL ((1)));
1488 # endif
1489 _GL_CXXALIAS_SYS (strtoull, unsigned long long,
1490 (const char *restrict string, char **restrict endptr,
1491 int base));
1492 # endif
1493 _GL_CXXALIASWARN (strtoull);
1494 #elif defined GNULIB_POSIXCHECK
1495 # undef strtoull
1496 # if HAVE_RAW_DECL_STRTOULL
1497 _GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
1498 "use gnulib module strtoull for portability");
1499 # endif
1500 #endif
1501
1502 #if @GNULIB_UNLOCKPT@
1503
1504
1505 # if !@HAVE_UNLOCKPT@
1506 _GL_FUNCDECL_SYS (unlockpt, int, (int fd));
1507 # endif
1508 _GL_CXXALIAS_SYS (unlockpt, int, (int fd));
1509 _GL_CXXALIASWARN (unlockpt);
1510 #elif defined GNULIB_POSIXCHECK
1511 # undef unlockpt
1512 # if HAVE_RAW_DECL_UNLOCKPT
1513 _GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - "
1514 "use gnulib module unlockpt for portability");
1515 # endif
1516 #endif
1517
1518 #if @GNULIB_UNSETENV@
1519
1520 # if @REPLACE_UNSETENV@
1521 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1522 # undef unsetenv
1523 # define unsetenv rpl_unsetenv
1524 # endif
1525 _GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1526 _GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
1527 # else
1528 # if !@HAVE_DECL_UNSETENV@
1529 _GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
1530 # endif
1531 _GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
1532 # endif
1533 # if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@)
1534 _GL_CXXALIASWARN (unsetenv);
1535 # endif
1536 #elif defined GNULIB_POSIXCHECK
1537 # undef unsetenv
1538 # if HAVE_RAW_DECL_UNSETENV
1539 _GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
1540 "use gnulib module unsetenv for portability");
1541 # endif
1542 #endif
1543
1544
1545 #if @GNULIB_WCTOMB@
1546 # if @REPLACE_WCTOMB@
1547 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1548 # undef wctomb
1549 # define wctomb rpl_wctomb
1550 # endif
1551 _GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc));
1552 _GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc));
1553 # else
1554 _GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc));
1555 # endif
1556 # if __GLIBC__ >= 2
1557 _GL_CXXALIASWARN (wctomb);
1558 # endif
1559 #endif
1560
1561
1562 #endif
1563 #endif
1564 #endif