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