This source file includes following definitions.
- _GL_WARN_ON_USE_ATTRIBUTE
- getpagesize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #ifndef _@GUARD_PREFIX@_UNISTD_H
18
19 #if __GNUC__ >= 3
20 @PRAGMA_SYSTEM_HEADER@
21 #endif
22 @PRAGMA_COLUMNS@
23
24 #if @HAVE_UNISTD_H@ && defined _GL_INCLUDING_UNISTD_H
25
26
27
28
29
30
31 #@INCLUDE_NEXT@ @NEXT_UNISTD_H@
32
33 #else
34
35
36
37 #if @HAVE_UNISTD_H@
38 # define _GL_INCLUDING_UNISTD_H
39 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
40 # undef _GL_INCLUDING_UNISTD_H
41 #endif
42
43
44 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
45 && !defined _GL_INCLUDING_WINSOCK2_H
46 # define _GL_INCLUDING_WINSOCK2_H
47 # include <winsock2.h>
48 # undef _GL_INCLUDING_WINSOCK2_H
49 #endif
50
51 #if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
52 #define _@GUARD_PREFIX@_UNISTD_H
53
54
55
56 #ifndef __GLIBC__
57 # include <stddef.h>
58 #endif
59
60
61
62
63
64
65 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
66 || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
67 && (defined _WIN32 && ! defined __CYGWIN__)) \
68 || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
69 && defined __CYGWIN__)) \
70 && ! defined __GLIBC__
71 # include <stdio.h>
72 #endif
73
74
75
76
77 #if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) \
78 && (defined __CYGWIN__ || defined __ANDROID__) \
79 && ! defined __GLIBC__
80 # include <fcntl.h>
81 #endif
82
83
84
85
86
87
88
89
90 #if !defined __GLIBC__ && !defined __osf__
91 # define __need_system_stdlib_h
92 # include <stdlib.h>
93 # undef __need_system_stdlib_h
94 #endif
95
96
97
98
99
100 #if defined _WIN32 && !defined __CYGWIN__
101 # include <io.h>
102 # include <direct.h>
103 #endif
104
105
106 #if defined _WIN32 && !defined __CYGWIN__
107 # include <process.h>
108 #endif
109
110
111
112
113 #if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
114 || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
115 && !defined __GLIBC__
116 # include <netdb.h>
117 #endif
118
119
120
121
122 #if (@GNULIB_GETENTROPY@ || defined GNULIB_POSIXCHECK) \
123 && ((defined __APPLE__ && defined __MACH__) || defined __sun \
124 || defined __ANDROID__) \
125 && @UNISTD_H_HAVE_SYS_RANDOM_H@ \
126 && !defined __GLIBC__
127 # include <sys/random.h>
128 #endif
129
130
131
132 #if (@GNULIB_FCHOWNAT@ || defined GNULIB_POSIXCHECK) && defined __ANDROID__ \
133 && !defined __GLIBC__
134 # include <sys/stat.h>
135 #endif
136
137
138
139
140 #include <sys/types.h>
141
142
143
144
145
146
147
148
149
150 #if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
151 # include <getopt-cdefs.h>
152 # include <getopt-pfx-core.h>
153 #endif
154
155 #ifndef _GL_INLINE_HEADER_BEGIN
156 #error "Please include config.h first."
157 #endif
158 _GL_INLINE_HEADER_BEGIN
159 #ifndef _GL_UNISTD_INLINE
160 # define _GL_UNISTD_INLINE _GL_INLINE
161 #endif
162
163
164
165 #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
166 # if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
167 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
168 # undef socket
169 # define socket socket_used_without_including_sys_socket_h
170 # undef connect
171 # define connect connect_used_without_including_sys_socket_h
172 # undef accept
173 # define accept accept_used_without_including_sys_socket_h
174 # undef bind
175 # define bind bind_used_without_including_sys_socket_h
176 # undef getpeername
177 # define getpeername getpeername_used_without_including_sys_socket_h
178 # undef getsockname
179 # define getsockname getsockname_used_without_including_sys_socket_h
180 # undef getsockopt
181 # define getsockopt getsockopt_used_without_including_sys_socket_h
182 # undef listen
183 # define listen listen_used_without_including_sys_socket_h
184 # undef recv
185 # define recv recv_used_without_including_sys_socket_h
186 # undef send
187 # define send send_used_without_including_sys_socket_h
188 # undef recvfrom
189 # define recvfrom recvfrom_used_without_including_sys_socket_h
190 # undef sendto
191 # define sendto sendto_used_without_including_sys_socket_h
192 # undef setsockopt
193 # define setsockopt setsockopt_used_without_including_sys_socket_h
194 # undef shutdown
195 # define shutdown shutdown_used_without_including_sys_socket_h
196 # else
197 _GL_WARN_ON_USE (socket,
198 "socket() used without including <sys/socket.h>");
199 _GL_WARN_ON_USE (connect,
200 "connect() used without including <sys/socket.h>");
201 _GL_WARN_ON_USE (accept,
202 "accept() used without including <sys/socket.h>");
203 _GL_WARN_ON_USE (bind,
204 "bind() used without including <sys/socket.h>");
205 _GL_WARN_ON_USE (getpeername,
206 "getpeername() used without including <sys/socket.h>");
207 _GL_WARN_ON_USE (getsockname,
208 "getsockname() used without including <sys/socket.h>");
209 _GL_WARN_ON_USE (getsockopt,
210 "getsockopt() used without including <sys/socket.h>");
211 _GL_WARN_ON_USE (listen,
212 "listen() used without including <sys/socket.h>");
213 _GL_WARN_ON_USE (recv,
214 "recv() used without including <sys/socket.h>");
215 _GL_WARN_ON_USE (send,
216 "send() used without including <sys/socket.h>");
217 _GL_WARN_ON_USE (recvfrom,
218 "recvfrom() used without including <sys/socket.h>");
219 _GL_WARN_ON_USE (sendto,
220 "sendto() used without including <sys/socket.h>");
221 _GL_WARN_ON_USE (setsockopt,
222 "setsockopt() used without including <sys/socket.h>");
223 _GL_WARN_ON_USE (shutdown,
224 "shutdown() used without including <sys/socket.h>");
225 # endif
226 # endif
227 # if !defined _@GUARD_PREFIX@_SYS_SELECT_H
228 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
229 # undef select
230 # define select select_used_without_including_sys_select_h
231 # else
232 _GL_WARN_ON_USE (select,
233 "select() used without including <sys/select.h>");
234 # endif
235 # endif
236 #endif
237
238
239
240 #ifndef STDIN_FILENO
241 # define STDIN_FILENO 0
242 #endif
243 #ifndef STDOUT_FILENO
244 # define STDOUT_FILENO 1
245 #endif
246 #ifndef STDERR_FILENO
247 # define STDERR_FILENO 2
248 #endif
249
250
251 #ifndef F_OK
252 # define F_OK 0
253 # define X_OK 1
254 # define W_OK 2
255 # define R_OK 4
256 #endif
257
258
259
260
261
262 #if @GNULIB_ACCESS@
263 # if @REPLACE_ACCESS@
264 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
265 # undef access
266 # define access rpl_access
267 # endif
268 _GL_FUNCDECL_RPL (access, int, (const char *file, int mode)
269 _GL_ARG_NONNULL ((1)));
270 _GL_CXXALIAS_RPL (access, int, (const char *file, int mode));
271 # elif defined _WIN32 && !defined __CYGWIN__
272 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
273 # undef access
274 # define access _access
275 # endif
276 _GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
277 # else
278 _GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
279 # endif
280 _GL_CXXALIASWARN (access);
281 #elif defined GNULIB_POSIXCHECK
282 # undef access
283 # if HAVE_RAW_DECL_ACCESS
284
285 _GL_WARN_ON_USE (access, "access does not always support X_OK - "
286 "use gnulib module access for portability; "
287 "also, this function is a security risk - "
288 "use the gnulib module faccessat instead");
289 # endif
290 #elif @GNULIB_MDA_ACCESS@
291
292
293
294 # if defined _WIN32 && !defined __CYGWIN__
295 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
296 # undef access
297 # define access _access
298 # endif
299 _GL_CXXALIAS_MDA (access, int, (const char *file, int mode));
300 # else
301 _GL_CXXALIAS_SYS (access, int, (const char *file, int mode));
302 # endif
303 _GL_CXXALIASWARN (access);
304 #endif
305
306
307 #if @GNULIB_CHDIR@
308 # if defined _WIN32 && !defined __CYGWIN__
309 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
310 # undef chdir
311 # define chdir _chdir
312 # endif
313 _GL_CXXALIAS_MDA (chdir, int, (const char *file));
314 # else
315 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
316 # endif
317 _GL_CXXALIASWARN (chdir);
318 #elif defined GNULIB_POSIXCHECK
319 # undef chdir
320 # if HAVE_RAW_DECL_CHDIR
321 _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
322 "use gnulib module chdir for portability");
323 # endif
324 #elif @GNULIB_MDA_CHDIR@
325
326
327
328 # if defined _WIN32 && !defined __CYGWIN__
329 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
330 # undef chdir
331 # define chdir _chdir
332 # endif
333 _GL_CXXALIAS_MDA (chdir, int, (const char *file));
334 # else
335 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
336 # endif
337 _GL_CXXALIASWARN (chdir);
338 #endif
339
340
341 #if @GNULIB_CHOWN@
342
343
344
345
346
347 # if @REPLACE_CHOWN@
348 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
349 # undef chown
350 # define chown rpl_chown
351 # endif
352 _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)
353 _GL_ARG_NONNULL ((1)));
354 _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid));
355 # else
356 # if !@HAVE_CHOWN@
357 _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)
358 _GL_ARG_NONNULL ((1)));
359 # endif
360 _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid));
361 # endif
362 _GL_CXXALIASWARN (chown);
363 #elif defined GNULIB_POSIXCHECK
364 # undef chown
365 # if HAVE_RAW_DECL_CHOWN
366 _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
367 "doesn't treat a uid or gid of -1 on some systems - "
368 "use gnulib module chown for portability");
369 # endif
370 #endif
371
372
373 #if @GNULIB_CLOSE@
374 # if @REPLACE_CLOSE@
375
376 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
377 # undef close
378 # define close rpl_close
379 # endif
380 _GL_FUNCDECL_RPL (close, int, (int fd));
381 _GL_CXXALIAS_RPL (close, int, (int fd));
382 # elif defined _WIN32 && !defined __CYGWIN__
383 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
384 # undef close
385 # define close _close
386 # endif
387 _GL_CXXALIAS_MDA (close, int, (int fd));
388 # else
389 _GL_CXXALIAS_SYS (close, int, (int fd));
390 # endif
391 _GL_CXXALIASWARN (close);
392 #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
393 # undef close
394 # define close close_used_without_requesting_gnulib_module_close
395 #elif defined GNULIB_POSIXCHECK
396 # undef close
397
398 _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
399 "use gnulib module close for portability");
400 #elif @GNULIB_MDA_CLOSE@
401
402
403
404 # if defined _WIN32 && !defined __CYGWIN__
405 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
406 # undef close
407 # define close _close
408 # endif
409 _GL_CXXALIAS_MDA (close, int, (int fd));
410 # else
411 _GL_CXXALIAS_SYS (close, int, (int fd));
412 # endif
413 _GL_CXXALIASWARN (close);
414 #endif
415
416
417 #if @GNULIB_COPY_FILE_RANGE@
418 # if !@HAVE_COPY_FILE_RANGE@
419 _GL_FUNCDECL_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
420 int ofd, off_t *opos,
421 size_t len, unsigned flags));
422 _GL_CXXALIAS_SYS (copy_file_range, ssize_t, (int ifd, off_t *ipos,
423 int ofd, off_t *opos,
424 size_t len, unsigned flags));
425 # endif
426 _GL_CXXALIASWARN (copy_file_range);
427 #elif defined GNULIB_POSIXCHECK
428 # if HAVE_RAW_DECL_COPY_FILE_RANGE
429 _GL_WARN_ON_USE (copy_file_range,
430 "copy_file_range is unportable - "
431 "use gnulib module copy_file_range for portability");
432 # endif
433 #endif
434
435
436 #if @GNULIB_DUP@
437 # if @REPLACE_DUP@
438 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
439 # define dup rpl_dup
440 # endif
441 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
442 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
443 # elif defined _WIN32 && !defined __CYGWIN__
444 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
445 # undef dup
446 # define dup _dup
447 # endif
448 _GL_CXXALIAS_MDA (dup, int, (int oldfd));
449 # else
450 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
451 # endif
452 _GL_CXXALIASWARN (dup);
453 #elif defined GNULIB_POSIXCHECK
454 # undef dup
455 # if HAVE_RAW_DECL_DUP
456 _GL_WARN_ON_USE (dup, "dup is unportable - "
457 "use gnulib module dup for portability");
458 # endif
459 #elif @GNULIB_MDA_DUP@
460
461
462
463 # if defined _WIN32 && !defined __CYGWIN__
464 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
465 # undef dup
466 # define dup _dup
467 # endif
468 _GL_CXXALIAS_MDA (dup, int, (int oldfd));
469 # else
470 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
471 # endif
472 _GL_CXXALIASWARN (dup);
473 #endif
474
475
476 #if @GNULIB_DUP2@
477
478
479
480
481
482 # if @REPLACE_DUP2@
483 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
484 # define dup2 rpl_dup2
485 # endif
486 _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
487 _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
488 # elif defined _WIN32 && !defined __CYGWIN__
489 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
490 # undef dup2
491 # define dup2 _dup2
492 # endif
493 _GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
494 # else
495 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
496 # endif
497 _GL_CXXALIASWARN (dup2);
498 #elif defined GNULIB_POSIXCHECK
499 # undef dup2
500 # if HAVE_RAW_DECL_DUP2
501 _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
502 "use gnulib module dup2 for portability");
503 # endif
504 #elif @GNULIB_MDA_DUP2@
505
506
507
508 # if defined _WIN32 && !defined __CYGWIN__
509 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
510 # undef dup2
511 # define dup2 _dup2
512 # endif
513 _GL_CXXALIAS_MDA (dup2, int, (int oldfd, int newfd));
514 # else
515 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
516 # endif
517 _GL_CXXALIASWARN (dup2);
518 #endif
519
520
521 #if @GNULIB_DUP3@
522
523
524
525
526
527
528
529
530 # if @HAVE_DUP3@
531 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
532 # define dup3 rpl_dup3
533 # endif
534 _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
535 _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
536 # else
537 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
538 _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
539 # endif
540 _GL_CXXALIASWARN (dup3);
541 #elif defined GNULIB_POSIXCHECK
542 # undef dup3
543 # if HAVE_RAW_DECL_DUP3
544 _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
545 "use gnulib module dup3 for portability");
546 # endif
547 #endif
548
549
550 #if @GNULIB_ENVIRON@
551 # if defined __CYGWIN__ && !defined __i386__
552
553
554
555
556 _GL_EXTERN_C __declspec(dllimport) char **environ;
557 # endif
558 # if !@HAVE_DECL_ENVIRON@
559
560
561 # if defined __APPLE__ && defined __MACH__
562 # include <TargetConditionals.h>
563 # if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
564 # define _GL_USE_CRT_EXTERNS
565 # endif
566 # endif
567 # ifdef _GL_USE_CRT_EXTERNS
568 # include <crt_externs.h>
569 # define environ (*_NSGetEnviron ())
570 # else
571 # ifdef __cplusplus
572 extern "C" {
573 # endif
574 extern char **environ;
575 # ifdef __cplusplus
576 }
577 # endif
578 # endif
579 # endif
580 #elif defined GNULIB_POSIXCHECK
581 # if HAVE_RAW_DECL_ENVIRON
582 _GL_UNISTD_INLINE char ***
583 _GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - "
584 "use gnulib module environ for portability")
585 rpl_environ (void)
586 {
587 return &environ;
588 }
589 # undef environ
590 # define environ (*rpl_environ ())
591 # endif
592 #endif
593
594
595 #if @GNULIB_EUIDACCESS@
596
597
598 # if !@HAVE_EUIDACCESS@
599 _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
600 _GL_ARG_NONNULL ((1)));
601 # endif
602 _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
603 _GL_CXXALIASWARN (euidaccess);
604 # if defined GNULIB_POSIXCHECK
605
606 _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
607 "use the gnulib module faccessat instead");
608 # endif
609 #elif defined GNULIB_POSIXCHECK
610 # undef euidaccess
611 # if HAVE_RAW_DECL_EUIDACCESS
612 _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
613 "use gnulib module euidaccess for portability");
614 # endif
615 #endif
616
617
618 #if @GNULIB_EXECL@
619 # if @REPLACE_EXECL@
620 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
621 # undef execl
622 # define execl rpl_execl
623 # endif
624 _GL_FUNCDECL_RPL (execl, int, (const char *program, const char *arg, ...)
625 _GL_ARG_NONNULL ((1)));
626 _GL_CXXALIAS_RPL (execl, int, (const char *program, const char *arg, ...));
627 # else
628 _GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
629 # endif
630 _GL_CXXALIASWARN (execl);
631 #elif defined GNULIB_POSIXCHECK
632 # undef execl
633 # if HAVE_RAW_DECL_EXECL
634 _GL_WARN_ON_USE (execl, "execl behaves very differently on mingw - "
635 "use gnulib module execl for portability");
636 # endif
637 #elif @GNULIB_MDA_EXECL@
638
639
640
641 # if defined _WIN32 && !defined __CYGWIN__
642 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
643 # undef execl
644 # define execl _execl
645 # endif
646 _GL_CXXALIAS_MDA (execl, intptr_t, (const char *program, const char *arg, ...));
647 # else
648 _GL_CXXALIAS_SYS (execl, int, (const char *program, const char *arg, ...));
649 # endif
650 _GL_CXXALIASWARN (execl);
651 #endif
652
653 #if @GNULIB_EXECLE@
654 # if @REPLACE_EXECLE@
655 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
656 # undef execle
657 # define execle rpl_execle
658 # endif
659 _GL_FUNCDECL_RPL (execle, int, (const char *program, const char *arg, ...)
660 _GL_ARG_NONNULL ((1)));
661 _GL_CXXALIAS_RPL (execle, int, (const char *program, const char *arg, ...));
662 # else
663 _GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
664 # endif
665 _GL_CXXALIASWARN (execle);
666 #elif defined GNULIB_POSIXCHECK
667 # undef execle
668 # if HAVE_RAW_DECL_EXECLE
669 _GL_WARN_ON_USE (execle, "execle behaves very differently on mingw - "
670 "use gnulib module execle for portability");
671 # endif
672 #elif @GNULIB_MDA_EXECLE@
673
674
675
676 # if defined _WIN32 && !defined __CYGWIN__
677 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
678 # undef execle
679 # define execle _execle
680 # endif
681 _GL_CXXALIAS_MDA (execle, intptr_t,
682 (const char *program, const char *arg, ...));
683 # else
684 _GL_CXXALIAS_SYS (execle, int, (const char *program, const char *arg, ...));
685 # endif
686 _GL_CXXALIASWARN (execle);
687 #endif
688
689 #if @GNULIB_EXECLP@
690 # if @REPLACE_EXECLP@
691 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
692 # undef execlp
693 # define execlp rpl_execlp
694 # endif
695 _GL_FUNCDECL_RPL (execlp, int, (const char *program, const char *arg, ...)
696 _GL_ARG_NONNULL ((1)));
697 _GL_CXXALIAS_RPL (execlp, int, (const char *program, const char *arg, ...));
698 # else
699 _GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
700 # endif
701 _GL_CXXALIASWARN (execlp);
702 #elif defined GNULIB_POSIXCHECK
703 # undef execlp
704 # if HAVE_RAW_DECL_EXECLP
705 _GL_WARN_ON_USE (execlp, "execlp behaves very differently on mingw - "
706 "use gnulib module execlp for portability");
707 # endif
708 #elif @GNULIB_MDA_EXECLP@
709
710
711
712 # if defined _WIN32 && !defined __CYGWIN__
713 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
714 # undef execlp
715 # define execlp _execlp
716 # endif
717 _GL_CXXALIAS_MDA (execlp, intptr_t,
718 (const char *program, const char *arg, ...));
719 # else
720 _GL_CXXALIAS_SYS (execlp, int, (const char *program, const char *arg, ...));
721 # endif
722 _GL_CXXALIASWARN (execlp);
723 #endif
724
725
726 #if @GNULIB_EXECV@
727 # if @REPLACE_EXECV@
728 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
729 # undef execv
730 # define execv rpl_execv
731 # endif
732 _GL_FUNCDECL_RPL (execv, int, (const char *program, char * const *argv)
733 _GL_ARG_NONNULL ((1, 2)));
734 _GL_CXXALIAS_RPL (execv, int, (const char *program, char * const *argv));
735 # else
736 _GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
737 # endif
738 _GL_CXXALIASWARN (execv);
739 #elif defined GNULIB_POSIXCHECK
740 # undef execv
741 # if HAVE_RAW_DECL_EXECV
742 _GL_WARN_ON_USE (execv, "execv behaves very differently on mingw - "
743 "use gnulib module execv for portability");
744 # endif
745 #elif @GNULIB_MDA_EXECV@
746
747
748
749 # if defined _WIN32 && !defined __CYGWIN__
750 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
751 # undef execv
752 # define execv _execv
753 # endif
754 _GL_CXXALIAS_MDA_CAST (execv, intptr_t,
755 (const char *program, char * const *argv));
756 # else
757 _GL_CXXALIAS_SYS (execv, int, (const char *program, char * const *argv));
758 # endif
759 _GL_CXXALIASWARN (execv);
760 #endif
761
762 #if @GNULIB_EXECVE@
763 # if @REPLACE_EXECVE@
764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
765 # undef execve
766 # define execve rpl_execve
767 # endif
768 _GL_FUNCDECL_RPL (execve, int,
769 (const char *program, char * const *argv, char * const *env)
770 _GL_ARG_NONNULL ((1, 2)));
771 _GL_CXXALIAS_RPL (execve, int,
772 (const char *program, char * const *argv, char * const *env));
773 # else
774 _GL_CXXALIAS_SYS (execve, int,
775 (const char *program, char * const *argv, char * const *env));
776 # endif
777 _GL_CXXALIASWARN (execve);
778 #elif defined GNULIB_POSIXCHECK
779 # undef execve
780 # if HAVE_RAW_DECL_EXECVE
781 _GL_WARN_ON_USE (execve, "execve behaves very differently on mingw - "
782 "use gnulib module execve for portability");
783 # endif
784 #elif @GNULIB_MDA_EXECVE@
785
786
787
788 # if defined _WIN32 && !defined __CYGWIN__
789 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
790 # undef execve
791 # define execve _execve
792 # endif
793 _GL_CXXALIAS_MDA_CAST (execve, intptr_t,
794 (const char *program, char * const *argv,
795 char * const *env));
796 # else
797 _GL_CXXALIAS_SYS (execve, int,
798 (const char *program, char * const *argv, char * const *env));
799 # endif
800 _GL_CXXALIASWARN (execve);
801 #endif
802
803 #if @GNULIB_EXECVP@
804 # if @REPLACE_EXECVP@
805 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
806 # undef execvp
807 # define execvp rpl_execvp
808 # endif
809 _GL_FUNCDECL_RPL (execvp, int, (const char *program, char * const *argv)
810 _GL_ARG_NONNULL ((1, 2)));
811 _GL_CXXALIAS_RPL (execvp, int, (const char *program, char * const *argv));
812 # else
813 _GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
814 # endif
815 _GL_CXXALIASWARN (execvp);
816 #elif defined GNULIB_POSIXCHECK
817 # undef execvp
818 # if HAVE_RAW_DECL_EXECVP
819 _GL_WARN_ON_USE (execvp, "execvp behaves very differently on mingw - "
820 "use gnulib module execvp for portability");
821 # endif
822 #elif @GNULIB_MDA_EXECVP@
823
824
825
826 # if defined _WIN32 && !defined __CYGWIN__
827 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
828 # undef execvp
829 # define execvp _execvp
830 # endif
831 _GL_CXXALIAS_MDA_CAST (execvp, intptr_t,
832 (const char *program, char * const *argv));
833 # else
834 _GL_CXXALIAS_SYS (execvp, int, (const char *program, char * const *argv));
835 # endif
836 _GL_CXXALIASWARN (execvp);
837 #endif
838
839 #if @GNULIB_EXECVPE@
840 # if @REPLACE_EXECVPE@
841 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
842 # undef execvpe
843 # define execvpe rpl_execvpe
844 # endif
845 _GL_FUNCDECL_RPL (execvpe, int,
846 (const char *program, char * const *argv, char * const *env)
847 _GL_ARG_NONNULL ((1, 2)));
848 _GL_CXXALIAS_RPL (execvpe, int,
849 (const char *program, char * const *argv, char * const *env));
850 # else
851 # if !@HAVE_DECL_EXECVPE@
852 _GL_FUNCDECL_SYS (execvpe, int,
853 (const char *program, char * const *argv, char * const *env)
854 _GL_ARG_NONNULL ((1, 2)));
855 # endif
856 _GL_CXXALIAS_SYS (execvpe, int,
857 (const char *program, char * const *argv, char * const *env));
858 # endif
859 _GL_CXXALIASWARN (execvpe);
860 #elif defined GNULIB_POSIXCHECK
861 # undef execvpe
862 # if HAVE_RAW_DECL_EXECVPE
863 _GL_WARN_ON_USE (execvpe, "execvpe behaves very differently on mingw - "
864 "use gnulib module execvpe for portability");
865 # endif
866 #elif @GNULIB_MDA_EXECVPE@
867
868
869
870
871 # if defined _WIN32 && !defined __CYGWIN__
872 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
873 # undef execvpe
874 # define execvpe _execvpe
875 # endif
876 _GL_CXXALIAS_MDA_CAST (execvpe, intptr_t,
877 (const char *program, char * const *argv,
878 char * const *env));
879 # elif @HAVE_EXECVPE@
880 # if !@HAVE_DECL_EXECVPE@
881 _GL_FUNCDECL_SYS (execvpe, int,
882 (const char *program, char * const *argv, char * const *env)
883 _GL_ARG_NONNULL ((1, 2)));
884 # endif
885 _GL_CXXALIAS_SYS (execvpe, int,
886 (const char *program, char * const *argv, char * const *env));
887 # endif
888 # if (defined _WIN32 && !defined __CYGWIN__) || @HAVE_EXECVPE@
889 _GL_CXXALIASWARN (execvpe);
890 # endif
891 #endif
892
893
894 #if @GNULIB_FACCESSAT@
895 # if @REPLACE_FACCESSAT@
896 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
897 # undef faccessat
898 # define faccessat rpl_faccessat
899 # endif
900 _GL_FUNCDECL_RPL (faccessat, int,
901 (int fd, char const *name, int mode, int flag)
902 _GL_ARG_NONNULL ((2)));
903 _GL_CXXALIAS_RPL (faccessat, int,
904 (int fd, char const *name, int mode, int flag));
905 # else
906 # if !@HAVE_FACCESSAT@
907 _GL_FUNCDECL_SYS (faccessat, int,
908 (int fd, char const *file, int mode, int flag)
909 _GL_ARG_NONNULL ((2)));
910 # endif
911 _GL_CXXALIAS_SYS (faccessat, int,
912 (int fd, char const *file, int mode, int flag));
913 # endif
914 _GL_CXXALIASWARN (faccessat);
915 #elif defined GNULIB_POSIXCHECK
916 # undef faccessat
917 # if HAVE_RAW_DECL_FACCESSAT
918 _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
919 "use gnulib module faccessat for portability");
920 # endif
921 #endif
922
923
924 #if @GNULIB_FCHDIR@
925
926
927
928
929
930 # if ! @HAVE_FCHDIR@
931 _GL_FUNCDECL_SYS (fchdir, int, (int ));
932
933
934 _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
935 _GL_ARG_NONNULL ((2));
936 _GL_EXTERN_C void _gl_unregister_fd (int fd);
937 _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
938 _GL_EXTERN_C const char *_gl_directory_name (int fd);
939
940 # else
941 # if !@HAVE_DECL_FCHDIR@
942 _GL_FUNCDECL_SYS (fchdir, int, (int ));
943 # endif
944 # endif
945 _GL_CXXALIAS_SYS (fchdir, int, (int ));
946 _GL_CXXALIASWARN (fchdir);
947 #elif defined GNULIB_POSIXCHECK
948 # undef fchdir
949 # if HAVE_RAW_DECL_FCHDIR
950 _GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
951 "use gnulib module fchdir for portability");
952 # endif
953 #endif
954
955
956 #if @GNULIB_FCHOWNAT@
957 # if @REPLACE_FCHOWNAT@
958 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
959 # undef fchownat
960 # define fchownat rpl_fchownat
961 # endif
962 _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
963 uid_t owner, gid_t group, int flag)
964 _GL_ARG_NONNULL ((2)));
965 _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
966 uid_t owner, gid_t group, int flag));
967 # else
968 # if !@HAVE_FCHOWNAT@
969 _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
970 uid_t owner, gid_t group, int flag)
971 _GL_ARG_NONNULL ((2)));
972 # endif
973 _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
974 uid_t owner, gid_t group, int flag));
975 # endif
976 _GL_CXXALIASWARN (fchownat);
977 #elif defined GNULIB_POSIXCHECK
978 # undef fchownat
979 # if HAVE_RAW_DECL_FCHOWNAT
980 _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
981 "use gnulib module fchownat for portability");
982 # endif
983 #endif
984
985
986 #if @GNULIB_FDATASYNC@
987
988
989
990
991 # if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
992 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
993 # endif
994 _GL_CXXALIAS_SYS (fdatasync, int, (int fd));
995 _GL_CXXALIASWARN (fdatasync);
996 #elif defined GNULIB_POSIXCHECK
997 # undef fdatasync
998 # if HAVE_RAW_DECL_FDATASYNC
999 _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
1000 "use gnulib module fdatasync for portability");
1001 # endif
1002 #endif
1003
1004
1005 #if @GNULIB_FSYNC@
1006
1007
1008
1009
1010 # if !@HAVE_FSYNC@
1011 _GL_FUNCDECL_SYS (fsync, int, (int fd));
1012 # endif
1013 _GL_CXXALIAS_SYS (fsync, int, (int fd));
1014 _GL_CXXALIASWARN (fsync);
1015 #elif defined GNULIB_POSIXCHECK
1016 # undef fsync
1017 # if HAVE_RAW_DECL_FSYNC
1018 _GL_WARN_ON_USE (fsync, "fsync is unportable - "
1019 "use gnulib module fsync for portability");
1020 # endif
1021 #endif
1022
1023
1024 #if @GNULIB_FTRUNCATE@
1025
1026
1027
1028
1029 # if @REPLACE_FTRUNCATE@
1030 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1031 # undef ftruncate
1032 # define ftruncate rpl_ftruncate
1033 # endif
1034 _GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
1035 _GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
1036 # else
1037 # if !@HAVE_FTRUNCATE@
1038 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
1039 # endif
1040 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
1041 # endif
1042 _GL_CXXALIASWARN (ftruncate);
1043 #elif defined GNULIB_POSIXCHECK
1044 # undef ftruncate
1045 # if HAVE_RAW_DECL_FTRUNCATE
1046 _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
1047 "use gnulib module ftruncate for portability");
1048 # endif
1049 #endif
1050
1051
1052 #if @GNULIB_GETCWD@
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063 # if @REPLACE_GETCWD@
1064 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1065 # define getcwd rpl_getcwd
1066 # endif
1067 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
1068 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
1069 # elif defined _WIN32 && !defined __CYGWIN__
1070 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1071 # undef getcwd
1072 # define getcwd _getcwd
1073 # endif
1074 _GL_CXXALIAS_MDA (getcwd, char *, (char *buf, size_t size));
1075 # else
1076
1077
1078 _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
1079 # endif
1080 _GL_CXXALIASWARN (getcwd);
1081 #elif defined GNULIB_POSIXCHECK
1082 # undef getcwd
1083 # if HAVE_RAW_DECL_GETCWD
1084 _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
1085 "use gnulib module getcwd for portability");
1086 # endif
1087 #elif @GNULIB_MDA_GETCWD@
1088
1089
1090
1091 # if defined _WIN32 && !defined __CYGWIN__
1092 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1093 # undef getcwd
1094 # define getcwd _getcwd
1095 # endif
1096
1097
1098 _GL_CXXALIAS_MDA_CAST (getcwd, char *, (char *buf, size_t size));
1099 # else
1100 _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
1101 # endif
1102 _GL_CXXALIASWARN (getcwd);
1103 #endif
1104
1105
1106 #if @GNULIB_GETDOMAINNAME@
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117 # if @REPLACE_GETDOMAINNAME@
1118 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1119 # undef getdomainname
1120 # define getdomainname rpl_getdomainname
1121 # endif
1122 _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
1123 _GL_ARG_NONNULL ((1)));
1124 _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
1125 # else
1126 # if !@HAVE_DECL_GETDOMAINNAME@
1127 _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
1128 _GL_ARG_NONNULL ((1)));
1129 # endif
1130 _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
1131 # endif
1132 _GL_CXXALIASWARN (getdomainname);
1133 #elif defined GNULIB_POSIXCHECK
1134 # undef getdomainname
1135 # if HAVE_RAW_DECL_GETDOMAINNAME
1136 _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
1137 "use gnulib module getdomainname for portability");
1138 # endif
1139 #endif
1140
1141
1142 #if @GNULIB_GETDTABLESIZE@
1143
1144
1145 # if @REPLACE_GETDTABLESIZE@
1146 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1147 # undef getdtablesize
1148 # define getdtablesize rpl_getdtablesize
1149 # endif
1150 _GL_FUNCDECL_RPL (getdtablesize, int, (void));
1151 _GL_CXXALIAS_RPL (getdtablesize, int, (void));
1152 # else
1153 # if !@HAVE_GETDTABLESIZE@
1154 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
1155 # endif
1156
1157
1158 _GL_CXXALIAS_SYS_CAST (getdtablesize, int, (void));
1159 # endif
1160 _GL_CXXALIASWARN (getdtablesize);
1161 #elif defined GNULIB_POSIXCHECK
1162 # undef getdtablesize
1163 # if HAVE_RAW_DECL_GETDTABLESIZE
1164 _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
1165 "use gnulib module getdtablesize for portability");
1166 # endif
1167 #endif
1168
1169
1170 #if @GNULIB_GETENTROPY@
1171
1172 # if !@HAVE_GETENTROPY@
1173 _GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length));
1174 # endif
1175 _GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length));
1176 _GL_CXXALIASWARN (getentropy);
1177 #elif defined GNULIB_POSIXCHECK
1178 # undef getentropy
1179 # if HAVE_RAW_DECL_GETENTROPY
1180 _GL_WARN_ON_USE (getentropy, "getentropy is unportable - "
1181 "use gnulib module getentropy for portability");
1182 # endif
1183 #endif
1184
1185
1186 #if @GNULIB_GETGROUPS@
1187
1188
1189
1190
1191
1192 # if @REPLACE_GETGROUPS@
1193 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1194 # undef getgroups
1195 # define getgroups rpl_getgroups
1196 # endif
1197 _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
1198 _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
1199 # else
1200 # if !@HAVE_GETGROUPS@
1201 _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
1202 # endif
1203 _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
1204 # endif
1205 _GL_CXXALIASWARN (getgroups);
1206 #elif defined GNULIB_POSIXCHECK
1207 # undef getgroups
1208 # if HAVE_RAW_DECL_GETGROUPS
1209 _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
1210 "use gnulib module getgroups for portability");
1211 # endif
1212 #endif
1213
1214
1215 #if @GNULIB_GETHOSTNAME@
1216
1217
1218
1219
1220
1221
1222
1223 # if @UNISTD_H_HAVE_WINSOCK2_H@
1224 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1225 # undef gethostname
1226 # define gethostname rpl_gethostname
1227 # endif
1228 _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
1229 _GL_ARG_NONNULL ((1)));
1230 _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
1231 # else
1232 # if !@HAVE_GETHOSTNAME@
1233 _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
1234 _GL_ARG_NONNULL ((1)));
1235 # endif
1236
1237
1238
1239 _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
1240 # endif
1241 _GL_CXXALIASWARN (gethostname);
1242 #elif @UNISTD_H_HAVE_WINSOCK2_H@
1243 # undef gethostname
1244 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
1245 #elif defined GNULIB_POSIXCHECK
1246 # undef gethostname
1247 # if HAVE_RAW_DECL_GETHOSTNAME
1248 _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
1249 "use gnulib module gethostname for portability");
1250 # endif
1251 #endif
1252
1253
1254 #if @GNULIB_GETLOGIN@
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265 # if !@HAVE_DECL_GETLOGIN@
1266 _GL_FUNCDECL_SYS (getlogin, char *, (void));
1267 # endif
1268 _GL_CXXALIAS_SYS (getlogin, char *, (void));
1269 _GL_CXXALIASWARN (getlogin);
1270 #elif defined GNULIB_POSIXCHECK
1271 # undef getlogin
1272 # if HAVE_RAW_DECL_GETLOGIN
1273 _GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
1274 "use gnulib module getlogin for portability");
1275 # endif
1276 #endif
1277
1278
1279 #if @GNULIB_GETLOGIN_R@
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294 # if @REPLACE_GETLOGIN_R@
1295 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1296 # define getlogin_r rpl_getlogin_r
1297 # endif
1298 _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
1299 _GL_ARG_NONNULL ((1)));
1300 _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
1301 # else
1302 # if !@HAVE_DECL_GETLOGIN_R@
1303 _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
1304 _GL_ARG_NONNULL ((1)));
1305 # endif
1306
1307
1308 _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
1309 # endif
1310 _GL_CXXALIASWARN (getlogin_r);
1311 #elif defined GNULIB_POSIXCHECK
1312 # undef getlogin_r
1313 # if HAVE_RAW_DECL_GETLOGIN_R
1314 _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
1315 "use gnulib module getlogin_r for portability");
1316 # endif
1317 #endif
1318
1319
1320 #if @GNULIB_GETPAGESIZE@
1321 # if @REPLACE_GETPAGESIZE@
1322 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1323 # define getpagesize rpl_getpagesize
1324 # endif
1325 _GL_FUNCDECL_RPL (getpagesize, int, (void));
1326 _GL_CXXALIAS_RPL (getpagesize, int, (void));
1327 # else
1328
1329
1330 # if defined __hpux
1331 _GL_FUNCDECL_SYS (getpagesize, int, (void));
1332 # endif
1333 # if !@HAVE_GETPAGESIZE@
1334 # if !defined getpagesize
1335
1336 # if !defined _gl_getpagesize && defined _SC_PAGESIZE
1337 # if ! (defined __VMS && __VMS_VER < 70000000)
1338 # define _gl_getpagesize() sysconf (_SC_PAGESIZE)
1339 # endif
1340 # endif
1341
1342 # if !defined _gl_getpagesize && defined __VMS
1343 # ifdef __ALPHA
1344 # define _gl_getpagesize() 8192
1345 # else
1346 # define _gl_getpagesize() 512
1347 # endif
1348 # endif
1349
1350 # if !defined _gl_getpagesize && @HAVE_OS_H@
1351 # include <OS.h>
1352 # if defined B_PAGE_SIZE
1353 # define _gl_getpagesize() B_PAGE_SIZE
1354 # endif
1355 # endif
1356
1357 # if !defined _gl_getpagesize && defined __amigaos4__
1358 # define _gl_getpagesize() 2048
1359 # endif
1360
1361 # if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@
1362 # include <sys/param.h>
1363 # ifdef EXEC_PAGESIZE
1364 # define _gl_getpagesize() EXEC_PAGESIZE
1365 # else
1366 # ifdef NBPG
1367 # ifndef CLSIZE
1368 # define CLSIZE 1
1369 # endif
1370 # define _gl_getpagesize() (NBPG * CLSIZE)
1371 # else
1372 # ifdef NBPC
1373 # define _gl_getpagesize() NBPC
1374 # endif
1375 # endif
1376 # endif
1377 # endif
1378 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1379 # define getpagesize() _gl_getpagesize ()
1380 # else
1381 # if !GNULIB_defined_getpagesize_function
1382 _GL_UNISTD_INLINE int
1383 getpagesize ()
1384 {
1385 return _gl_getpagesize ();
1386 }
1387 # define GNULIB_defined_getpagesize_function 1
1388 # endif
1389 # endif
1390 # endif
1391 # endif
1392
1393 _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
1394 # endif
1395 # if @HAVE_DECL_GETPAGESIZE@
1396 _GL_CXXALIASWARN (getpagesize);
1397 # endif
1398 #elif defined GNULIB_POSIXCHECK
1399 # undef getpagesize
1400 # if HAVE_RAW_DECL_GETPAGESIZE
1401 _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
1402 "use gnulib module getpagesize for portability");
1403 # endif
1404 #endif
1405
1406
1407 #if @GNULIB_GETPASS@
1408
1409
1410
1411
1412 # if @REPLACE_GETPASS@
1413 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1414 # undef getpass
1415 # define getpass rpl_getpass
1416 # endif
1417 _GL_FUNCDECL_RPL (getpass, char *, (const char *prompt)
1418 _GL_ARG_NONNULL ((1)));
1419 _GL_CXXALIAS_RPL (getpass, char *, (const char *prompt));
1420 # else
1421 # if !@HAVE_GETPASS@
1422 _GL_FUNCDECL_SYS (getpass, char *, (const char *prompt)
1423 _GL_ARG_NONNULL ((1)));
1424 # endif
1425 _GL_CXXALIAS_SYS (getpass, char *, (const char *prompt));
1426 # endif
1427 _GL_CXXALIASWARN (getpass);
1428 #elif defined GNULIB_POSIXCHECK
1429 # undef getpass
1430 # if HAVE_RAW_DECL_GETPASS
1431 _GL_WARN_ON_USE (getpass, "getpass is unportable - "
1432 "use gnulib module getpass or getpass-gnu for portability");
1433 # endif
1434 #endif
1435
1436
1437 #if @GNULIB_MDA_GETPID@
1438
1439
1440
1441 # if defined _WIN32 && !defined __CYGWIN__
1442 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1443 # undef getpid
1444 # define getpid _getpid
1445 # endif
1446 _GL_CXXALIAS_MDA (getpid, int, (void));
1447 # else
1448 _GL_CXXALIAS_SYS (getpid, pid_t, (void));
1449 # endif
1450 _GL_CXXALIASWARN (getpid);
1451 #endif
1452
1453
1454 #if @GNULIB_GETUSERSHELL@
1455
1456
1457 # if !@HAVE_DECL_GETUSERSHELL@
1458 _GL_FUNCDECL_SYS (getusershell, char *, (void));
1459 # endif
1460 _GL_CXXALIAS_SYS (getusershell, char *, (void));
1461 _GL_CXXALIASWARN (getusershell);
1462 #elif defined GNULIB_POSIXCHECK
1463 # undef getusershell
1464 # if HAVE_RAW_DECL_GETUSERSHELL
1465 _GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
1466 "use gnulib module getusershell for portability");
1467 # endif
1468 #endif
1469
1470 #if @GNULIB_GETUSERSHELL@
1471
1472 # if !@HAVE_DECL_GETUSERSHELL@
1473 _GL_FUNCDECL_SYS (setusershell, void, (void));
1474 # endif
1475 _GL_CXXALIAS_SYS (setusershell, void, (void));
1476 _GL_CXXALIASWARN (setusershell);
1477 #elif defined GNULIB_POSIXCHECK
1478 # undef setusershell
1479 # if HAVE_RAW_DECL_SETUSERSHELL
1480 _GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
1481 "use gnulib module getusershell for portability");
1482 # endif
1483 #endif
1484
1485 #if @GNULIB_GETUSERSHELL@
1486
1487
1488 # if !@HAVE_DECL_GETUSERSHELL@
1489 _GL_FUNCDECL_SYS (endusershell, void, (void));
1490 # endif
1491 _GL_CXXALIAS_SYS (endusershell, void, (void));
1492 _GL_CXXALIASWARN (endusershell);
1493 #elif defined GNULIB_POSIXCHECK
1494 # undef endusershell
1495 # if HAVE_RAW_DECL_ENDUSERSHELL
1496 _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
1497 "use gnulib module getusershell for portability");
1498 # endif
1499 #endif
1500
1501
1502 #if @GNULIB_GROUP_MEMBER@
1503
1504 # if !@HAVE_GROUP_MEMBER@
1505 _GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
1506 # endif
1507 _GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
1508 _GL_CXXALIASWARN (group_member);
1509 #elif defined GNULIB_POSIXCHECK
1510 # undef group_member
1511 # if HAVE_RAW_DECL_GROUP_MEMBER
1512 _GL_WARN_ON_USE (group_member, "group_member is unportable - "
1513 "use gnulib module group-member for portability");
1514 # endif
1515 #endif
1516
1517
1518 #if @GNULIB_ISATTY@
1519 # if @REPLACE_ISATTY@
1520 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1521 # undef isatty
1522 # define isatty rpl_isatty
1523 # endif
1524 # define GNULIB_defined_isatty 1
1525 _GL_FUNCDECL_RPL (isatty, int, (int fd));
1526 _GL_CXXALIAS_RPL (isatty, int, (int fd));
1527 # elif defined _WIN32 && !defined __CYGWIN__
1528 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1529 # undef isatty
1530 # define isatty _isatty
1531 # endif
1532 _GL_CXXALIAS_MDA (isatty, int, (int fd));
1533 # else
1534 _GL_CXXALIAS_SYS (isatty, int, (int fd));
1535 # endif
1536 _GL_CXXALIASWARN (isatty);
1537 #elif defined GNULIB_POSIXCHECK
1538 # undef isatty
1539 # if HAVE_RAW_DECL_ISATTY
1540 _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
1541 "use gnulib module isatty for portability");
1542 # endif
1543 #elif @GNULIB_MDA_ISATTY@
1544
1545
1546
1547 # if defined _WIN32 && !defined __CYGWIN__
1548 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1549 # undef isatty
1550 # define isatty _isatty
1551 # endif
1552 _GL_CXXALIAS_MDA (isatty, int, (int fd));
1553 # else
1554 _GL_CXXALIAS_SYS (isatty, int, (int fd));
1555 # endif
1556 _GL_CXXALIASWARN (isatty);
1557 #endif
1558
1559
1560 #if @GNULIB_LCHOWN@
1561
1562
1563
1564
1565
1566 # if @REPLACE_LCHOWN@
1567 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1568 # undef lchown
1569 # define lchown rpl_lchown
1570 # endif
1571 _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
1572 _GL_ARG_NONNULL ((1)));
1573 _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
1574 # else
1575 # if !@HAVE_LCHOWN@
1576 _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
1577 _GL_ARG_NONNULL ((1)));
1578 # endif
1579 _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
1580 # endif
1581 _GL_CXXALIASWARN (lchown);
1582 #elif defined GNULIB_POSIXCHECK
1583 # undef lchown
1584 # if HAVE_RAW_DECL_LCHOWN
1585 _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
1586 "use gnulib module lchown for portability");
1587 # endif
1588 #endif
1589
1590
1591 #if @GNULIB_LINK@
1592
1593
1594
1595
1596 # if @REPLACE_LINK@
1597 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1598 # define link rpl_link
1599 # endif
1600 _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
1601 _GL_ARG_NONNULL ((1, 2)));
1602 _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
1603 # else
1604 # if !@HAVE_LINK@
1605 _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
1606 _GL_ARG_NONNULL ((1, 2)));
1607 # endif
1608 _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
1609 # endif
1610 _GL_CXXALIASWARN (link);
1611 #elif defined GNULIB_POSIXCHECK
1612 # undef link
1613 # if HAVE_RAW_DECL_LINK
1614 _GL_WARN_ON_USE (link, "link is unportable - "
1615 "use gnulib module link for portability");
1616 # endif
1617 #endif
1618
1619
1620 #if @GNULIB_LINKAT@
1621
1622
1623
1624 # if @REPLACE_LINKAT@
1625 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1626 # undef linkat
1627 # define linkat rpl_linkat
1628 # endif
1629 _GL_FUNCDECL_RPL (linkat, int,
1630 (int fd1, const char *path1, int fd2, const char *path2,
1631 int flag)
1632 _GL_ARG_NONNULL ((2, 4)));
1633 _GL_CXXALIAS_RPL (linkat, int,
1634 (int fd1, const char *path1, int fd2, const char *path2,
1635 int flag));
1636 # else
1637 # if !@HAVE_LINKAT@
1638 _GL_FUNCDECL_SYS (linkat, int,
1639 (int fd1, const char *path1, int fd2, const char *path2,
1640 int flag)
1641 _GL_ARG_NONNULL ((2, 4)));
1642 # endif
1643 _GL_CXXALIAS_SYS (linkat, int,
1644 (int fd1, const char *path1, int fd2, const char *path2,
1645 int flag));
1646 # endif
1647 _GL_CXXALIASWARN (linkat);
1648 #elif defined GNULIB_POSIXCHECK
1649 # undef linkat
1650 # if HAVE_RAW_DECL_LINKAT
1651 _GL_WARN_ON_USE (linkat, "linkat is unportable - "
1652 "use gnulib module linkat for portability");
1653 # endif
1654 #endif
1655
1656
1657 #if @GNULIB_LSEEK@
1658
1659
1660
1661
1662 # if @REPLACE_LSEEK@
1663 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1664 # define lseek rpl_lseek
1665 # endif
1666 _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1667 _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1668 # elif defined _WIN32 && !defined __CYGWIN__
1669 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1670 # undef lseek
1671 # define lseek _lseek
1672 # endif
1673 _GL_CXXALIAS_MDA (lseek, off_t, (int fd, off_t offset, int whence));
1674 # else
1675 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
1676 # endif
1677 _GL_CXXALIASWARN (lseek);
1678 #elif defined GNULIB_POSIXCHECK
1679 # undef lseek
1680 # if HAVE_RAW_DECL_LSEEK
1681 _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
1682 "systems - use gnulib module lseek for portability");
1683 # endif
1684 #elif @GNULIB_MDA_LSEEK@
1685
1686
1687
1688 # if defined _WIN32 && !defined __CYGWIN__
1689 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1690 # undef lseek
1691 # define lseek _lseek
1692 # endif
1693 _GL_CXXALIAS_MDA (lseek, long, (int fd, long offset, int whence));
1694 # else
1695 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
1696 # endif
1697 _GL_CXXALIASWARN (lseek);
1698 #endif
1699
1700
1701 #if @GNULIB_PIPE@
1702
1703
1704
1705 # if !@HAVE_PIPE@
1706 _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
1707 # endif
1708 _GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
1709 _GL_CXXALIASWARN (pipe);
1710 #elif defined GNULIB_POSIXCHECK
1711 # undef pipe
1712 # if HAVE_RAW_DECL_PIPE
1713 _GL_WARN_ON_USE (pipe, "pipe is unportable - "
1714 "use gnulib module pipe-posix for portability");
1715 # endif
1716 #endif
1717
1718
1719 #if @GNULIB_PIPE2@
1720
1721
1722
1723
1724
1725
1726
1727
1728 # if @HAVE_PIPE2@
1729 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1730 # define pipe2 rpl_pipe2
1731 # endif
1732 _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1733 _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
1734 # else
1735 _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1736 _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
1737 # endif
1738 _GL_CXXALIASWARN (pipe2);
1739 #elif defined GNULIB_POSIXCHECK
1740 # undef pipe2
1741 # if HAVE_RAW_DECL_PIPE2
1742 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
1743 "use gnulib module pipe2 for portability");
1744 # endif
1745 #endif
1746
1747
1748 #if @GNULIB_PREAD@
1749
1750
1751
1752
1753
1754 # if @REPLACE_PREAD@
1755 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1756 # undef pread
1757 # define pread rpl_pread
1758 # endif
1759 _GL_FUNCDECL_RPL (pread, ssize_t,
1760 (int fd, void *buf, size_t bufsize, off_t offset)
1761 _GL_ARG_NONNULL ((2)));
1762 _GL_CXXALIAS_RPL (pread, ssize_t,
1763 (int fd, void *buf, size_t bufsize, off_t offset));
1764 # else
1765 # if !@HAVE_PREAD@
1766 _GL_FUNCDECL_SYS (pread, ssize_t,
1767 (int fd, void *buf, size_t bufsize, off_t offset)
1768 _GL_ARG_NONNULL ((2)));
1769 # endif
1770 _GL_CXXALIAS_SYS (pread, ssize_t,
1771 (int fd, void *buf, size_t bufsize, off_t offset));
1772 # endif
1773 _GL_CXXALIASWARN (pread);
1774 #elif defined GNULIB_POSIXCHECK
1775 # undef pread
1776 # if HAVE_RAW_DECL_PREAD
1777 _GL_WARN_ON_USE (pread, "pread is unportable - "
1778 "use gnulib module pread for portability");
1779 # endif
1780 #endif
1781
1782
1783 #if @GNULIB_PWRITE@
1784
1785
1786
1787
1788
1789 # if @REPLACE_PWRITE@
1790 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1791 # undef pwrite
1792 # define pwrite rpl_pwrite
1793 # endif
1794 _GL_FUNCDECL_RPL (pwrite, ssize_t,
1795 (int fd, const void *buf, size_t bufsize, off_t offset)
1796 _GL_ARG_NONNULL ((2)));
1797 _GL_CXXALIAS_RPL (pwrite, ssize_t,
1798 (int fd, const void *buf, size_t bufsize, off_t offset));
1799 # else
1800 # if !@HAVE_PWRITE@
1801 _GL_FUNCDECL_SYS (pwrite, ssize_t,
1802 (int fd, const void *buf, size_t bufsize, off_t offset)
1803 _GL_ARG_NONNULL ((2)));
1804 # endif
1805 _GL_CXXALIAS_SYS (pwrite, ssize_t,
1806 (int fd, const void *buf, size_t bufsize, off_t offset));
1807 # endif
1808 _GL_CXXALIASWARN (pwrite);
1809 #elif defined GNULIB_POSIXCHECK
1810 # undef pwrite
1811 # if HAVE_RAW_DECL_PWRITE
1812 _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
1813 "use gnulib module pwrite for portability");
1814 # endif
1815 #endif
1816
1817
1818 #if @GNULIB_READ@
1819
1820
1821
1822 # if @REPLACE_READ@
1823 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1824 # undef read
1825 # define read rpl_read
1826 # endif
1827 _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
1828 _GL_ARG_NONNULL ((2)));
1829 _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
1830 # elif defined _WIN32 && !defined __CYGWIN__
1831 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1832 # undef read
1833 # define read _read
1834 # endif
1835 _GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count));
1836 # else
1837 _GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
1838 # endif
1839 _GL_CXXALIASWARN (read);
1840 #elif @GNULIB_MDA_READ@
1841
1842
1843
1844 # if defined _WIN32 && !defined __CYGWIN__
1845 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1846 # undef read
1847 # define read _read
1848 # endif
1849 # ifdef __MINGW32__
1850 _GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count));
1851 # else
1852 _GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count));
1853 # endif
1854 # else
1855 _GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
1856 # endif
1857 _GL_CXXALIASWARN (read);
1858 #endif
1859
1860
1861 #if @GNULIB_READLINK@
1862
1863
1864
1865
1866
1867 # if @REPLACE_READLINK@
1868 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1869 # define readlink rpl_readlink
1870 # endif
1871 _GL_FUNCDECL_RPL (readlink, ssize_t,
1872 (const char *restrict file,
1873 char *restrict buf, size_t bufsize)
1874 _GL_ARG_NONNULL ((1, 2)));
1875 _GL_CXXALIAS_RPL (readlink, ssize_t,
1876 (const char *restrict file,
1877 char *restrict buf, size_t bufsize));
1878 # else
1879 # if !@HAVE_READLINK@
1880 _GL_FUNCDECL_SYS (readlink, ssize_t,
1881 (const char *restrict file,
1882 char *restrict buf, size_t bufsize)
1883 _GL_ARG_NONNULL ((1, 2)));
1884 # endif
1885 _GL_CXXALIAS_SYS (readlink, ssize_t,
1886 (const char *restrict file,
1887 char *restrict buf, size_t bufsize));
1888 # endif
1889 _GL_CXXALIASWARN (readlink);
1890 #elif defined GNULIB_POSIXCHECK
1891 # undef readlink
1892 # if HAVE_RAW_DECL_READLINK
1893 _GL_WARN_ON_USE (readlink, "readlink is unportable - "
1894 "use gnulib module readlink for portability");
1895 # endif
1896 #endif
1897
1898
1899 #if @GNULIB_READLINKAT@
1900 # if @REPLACE_READLINKAT@
1901 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1902 # define readlinkat rpl_readlinkat
1903 # endif
1904 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
1905 (int fd, char const *restrict file,
1906 char *restrict buf, size_t len)
1907 _GL_ARG_NONNULL ((2, 3)));
1908 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
1909 (int fd, char const *restrict file,
1910 char *restrict buf, size_t len));
1911 # else
1912 # if !@HAVE_READLINKAT@
1913 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
1914 (int fd, char const *restrict file,
1915 char *restrict buf, size_t len)
1916 _GL_ARG_NONNULL ((2, 3)));
1917 # endif
1918 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
1919 (int fd, char const *restrict file,
1920 char *restrict buf, size_t len));
1921 # endif
1922 _GL_CXXALIASWARN (readlinkat);
1923 #elif defined GNULIB_POSIXCHECK
1924 # undef readlinkat
1925 # if HAVE_RAW_DECL_READLINKAT
1926 _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
1927 "use gnulib module readlinkat for portability");
1928 # endif
1929 #endif
1930
1931
1932 #if @GNULIB_RMDIR@
1933
1934 # if @REPLACE_RMDIR@
1935 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1936 # define rmdir rpl_rmdir
1937 # endif
1938 _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
1939 _GL_CXXALIAS_RPL (rmdir, int, (char const *name));
1940 # elif defined _WIN32 && !defined __CYGWIN__
1941 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1942 # undef rmdir
1943 # define rmdir _rmdir
1944 # endif
1945 _GL_CXXALIAS_MDA (rmdir, int, (char const *name));
1946 # else
1947 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
1948 # endif
1949 _GL_CXXALIASWARN (rmdir);
1950 #elif defined GNULIB_POSIXCHECK
1951 # undef rmdir
1952 # if HAVE_RAW_DECL_RMDIR
1953 _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
1954 "use gnulib module rmdir for portability");
1955 # endif
1956 #elif @GNULIB_MDA_RMDIR@
1957
1958
1959
1960 # if defined _WIN32 && !defined __CYGWIN__
1961 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1962 # undef rmdir
1963 # define rmdir _rmdir
1964 # endif
1965 _GL_CXXALIAS_MDA (rmdir, int, (char const *name));
1966 # else
1967 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
1968 # endif
1969 _GL_CXXALIASWARN (rmdir);
1970 #endif
1971
1972
1973 #if @GNULIB_SETHOSTNAME@
1974
1975
1976
1977
1978
1979
1980
1981
1982 # if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
1983 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
1984 _GL_ARG_NONNULL ((1)));
1985 # endif
1986
1987
1988
1989 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
1990 _GL_CXXALIASWARN (sethostname);
1991 #elif defined GNULIB_POSIXCHECK
1992 # undef sethostname
1993 # if HAVE_RAW_DECL_SETHOSTNAME
1994 _GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
1995 "use gnulib module sethostname for portability");
1996 # endif
1997 #endif
1998
1999
2000 #if @GNULIB_SLEEP@
2001
2002
2003
2004
2005 # if @REPLACE_SLEEP@
2006 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2007 # undef sleep
2008 # define sleep rpl_sleep
2009 # endif
2010 _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
2011 _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
2012 # else
2013 # if !@HAVE_SLEEP@
2014 _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
2015 # endif
2016 _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
2017 # endif
2018 _GL_CXXALIASWARN (sleep);
2019 #elif defined GNULIB_POSIXCHECK
2020 # undef sleep
2021 # if HAVE_RAW_DECL_SLEEP
2022 _GL_WARN_ON_USE (sleep, "sleep is unportable - "
2023 "use gnulib module sleep for portability");
2024 # endif
2025 #endif
2026
2027
2028 #if @GNULIB_MDA_SWAB@
2029
2030
2031
2032 # if defined _WIN32 && !defined __CYGWIN__
2033 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2034 # undef swab
2035 # define swab _swab
2036 # endif
2037
2038
2039 _GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n));
2040 # else
2041 # if defined __hpux
2042 _GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n));
2043 # elif defined __sun && !defined _XPG4
2044 _GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n));
2045 # else
2046 _GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
2047 # endif
2048 # endif
2049 _GL_CXXALIASWARN (swab);
2050 #endif
2051
2052
2053 #if @GNULIB_SYMLINK@
2054 # if @REPLACE_SYMLINK@
2055 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2056 # undef symlink
2057 # define symlink rpl_symlink
2058 # endif
2059 _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
2060 _GL_ARG_NONNULL ((1, 2)));
2061 _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
2062 # else
2063 # if !@HAVE_SYMLINK@
2064 _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
2065 _GL_ARG_NONNULL ((1, 2)));
2066 # endif
2067 _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
2068 # endif
2069 _GL_CXXALIASWARN (symlink);
2070 #elif defined GNULIB_POSIXCHECK
2071 # undef symlink
2072 # if HAVE_RAW_DECL_SYMLINK
2073 _GL_WARN_ON_USE (symlink, "symlink is not portable - "
2074 "use gnulib module symlink for portability");
2075 # endif
2076 #endif
2077
2078
2079 #if @GNULIB_SYMLINKAT@
2080 # if @REPLACE_SYMLINKAT@
2081 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2082 # undef symlinkat
2083 # define symlinkat rpl_symlinkat
2084 # endif
2085 _GL_FUNCDECL_RPL (symlinkat, int,
2086 (char const *contents, int fd, char const *file)
2087 _GL_ARG_NONNULL ((1, 3)));
2088 _GL_CXXALIAS_RPL (symlinkat, int,
2089 (char const *contents, int fd, char const *file));
2090 # else
2091 # if !@HAVE_SYMLINKAT@
2092 _GL_FUNCDECL_SYS (symlinkat, int,
2093 (char const *contents, int fd, char const *file)
2094 _GL_ARG_NONNULL ((1, 3)));
2095 # endif
2096 _GL_CXXALIAS_SYS (symlinkat, int,
2097 (char const *contents, int fd, char const *file));
2098 # endif
2099 _GL_CXXALIASWARN (symlinkat);
2100 #elif defined GNULIB_POSIXCHECK
2101 # undef symlinkat
2102 # if HAVE_RAW_DECL_SYMLINKAT
2103 _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
2104 "use gnulib module symlinkat for portability");
2105 # endif
2106 #endif
2107
2108
2109 #if @GNULIB_TRUNCATE@
2110
2111
2112
2113
2114 # if @REPLACE_TRUNCATE@
2115 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2116 # undef truncate
2117 # define truncate rpl_truncate
2118 # endif
2119 _GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length)
2120 _GL_ARG_NONNULL ((1)));
2121 _GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length));
2122 # else
2123 # if !@HAVE_DECL_TRUNCATE@
2124 _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
2125 _GL_ARG_NONNULL ((1)));
2126 # endif
2127 _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
2128 # endif
2129 _GL_CXXALIASWARN (truncate);
2130 #elif defined GNULIB_POSIXCHECK
2131 # undef truncate
2132 # if HAVE_RAW_DECL_TRUNCATE
2133 _GL_WARN_ON_USE (truncate, "truncate is unportable - "
2134 "use gnulib module truncate for portability");
2135 # endif
2136 #endif
2137
2138
2139 #if @GNULIB_TTYNAME_R@
2140
2141
2142 # if @REPLACE_TTYNAME_R@
2143 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2144 # undef ttyname_r
2145 # define ttyname_r rpl_ttyname_r
2146 # endif
2147 _GL_FUNCDECL_RPL (ttyname_r, int,
2148 (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
2149 _GL_CXXALIAS_RPL (ttyname_r, int,
2150 (int fd, char *buf, size_t buflen));
2151 # else
2152 # if !@HAVE_DECL_TTYNAME_R@
2153 _GL_FUNCDECL_SYS (ttyname_r, int,
2154 (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
2155 # endif
2156 _GL_CXXALIAS_SYS (ttyname_r, int,
2157 (int fd, char *buf, size_t buflen));
2158 # endif
2159 _GL_CXXALIASWARN (ttyname_r);
2160 #elif defined GNULIB_POSIXCHECK
2161 # undef ttyname_r
2162 # if HAVE_RAW_DECL_TTYNAME_R
2163 _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
2164 "use gnulib module ttyname_r for portability");
2165 # endif
2166 #endif
2167
2168
2169 #if @GNULIB_UNLINK@
2170 # if @REPLACE_UNLINK@
2171 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2172 # undef unlink
2173 # define unlink rpl_unlink
2174 # endif
2175 _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
2176 _GL_CXXALIAS_RPL (unlink, int, (char const *file));
2177 # elif defined _WIN32 && !defined __CYGWIN__
2178 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2179 # undef unlink
2180 # define unlink _unlink
2181 # endif
2182 _GL_CXXALIAS_MDA (unlink, int, (char const *file));
2183 # else
2184 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
2185 # endif
2186 _GL_CXXALIASWARN (unlink);
2187 #elif defined GNULIB_POSIXCHECK
2188 # undef unlink
2189 # if HAVE_RAW_DECL_UNLINK
2190 _GL_WARN_ON_USE (unlink, "unlink is not portable - "
2191 "use gnulib module unlink for portability");
2192 # endif
2193 #elif @GNULIB_MDA_UNLINK@
2194
2195
2196
2197 # if defined _WIN32 && !defined __CYGWIN__
2198 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2199 # undef unlink
2200 # define unlink _unlink
2201 # endif
2202 _GL_CXXALIAS_MDA (unlink, int, (char const *file));
2203 # else
2204 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
2205 # endif
2206 _GL_CXXALIASWARN (unlink);
2207 #endif
2208
2209
2210 #if @GNULIB_UNLINKAT@
2211 # if @REPLACE_UNLINKAT@
2212 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2213 # undef unlinkat
2214 # define unlinkat rpl_unlinkat
2215 # endif
2216 _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
2217 _GL_ARG_NONNULL ((2)));
2218 _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
2219 # else
2220 # if !@HAVE_UNLINKAT@
2221 _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
2222 _GL_ARG_NONNULL ((2)));
2223 # endif
2224 _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
2225 # endif
2226 _GL_CXXALIASWARN (unlinkat);
2227 #elif defined GNULIB_POSIXCHECK
2228 # undef unlinkat
2229 # if HAVE_RAW_DECL_UNLINKAT
2230 _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
2231 "use gnulib module unlinkat for portability");
2232 # endif
2233 #endif
2234
2235
2236 #if @GNULIB_USLEEP@
2237
2238
2239
2240
2241 # if @REPLACE_USLEEP@
2242 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2243 # undef usleep
2244 # define usleep rpl_usleep
2245 # endif
2246 _GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
2247 _GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
2248 # else
2249 # if !@HAVE_USLEEP@
2250 _GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
2251 # endif
2252
2253
2254 _GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n));
2255 # endif
2256 _GL_CXXALIASWARN (usleep);
2257 #elif defined GNULIB_POSIXCHECK
2258 # undef usleep
2259 # if HAVE_RAW_DECL_USLEEP
2260 _GL_WARN_ON_USE (usleep, "usleep is unportable - "
2261 "use gnulib module usleep for portability");
2262 # endif
2263 #endif
2264
2265
2266 #if @GNULIB_WRITE@
2267
2268
2269
2270 # if @REPLACE_WRITE@
2271 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2272 # undef write
2273 # define write rpl_write
2274 # endif
2275 _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
2276 _GL_ARG_NONNULL ((2)));
2277 _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
2278 # elif defined _WIN32 && !defined __CYGWIN__
2279 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2280 # undef write
2281 # define write _write
2282 # endif
2283 _GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, size_t count));
2284 # else
2285 _GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
2286 # endif
2287 _GL_CXXALIASWARN (write);
2288 #elif @GNULIB_MDA_WRITE@
2289
2290
2291
2292 # if defined _WIN32 && !defined __CYGWIN__
2293 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2294 # undef write
2295 # define write _write
2296 # endif
2297 # ifdef __MINGW32__
2298 _GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count));
2299 # else
2300 _GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int count));
2301 # endif
2302 # else
2303 _GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
2304 # endif
2305 _GL_CXXALIASWARN (write);
2306 #endif
2307
2308 _GL_INLINE_HEADER_END
2309
2310 #endif
2311 #endif
2312 #endif