dhcpd-pools  3.0
ISC dhcpd lease usage analyser
unistd.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Substitute for and wrapper around <unistd.h>.
3  Copyright (C) 2003-2017 Free Software Foundation, Inc.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 3, or (at your option)
8  any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, see <https://www.gnu.org/licenses/>. */
17 
18 #ifndef _GL_UNISTD_H
19 
20 #if __GNUC__ >= 3
21 #pragma GCC system_header
22 #endif
23 
24 
25 #ifdef _GL_INCLUDING_UNISTD_H
26 /* Special invocation convention:
27  - On Mac OS X 10.3.9 we have a sequence of nested includes
28  <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
29  In this situation, the functions are not yet declared, therefore we cannot
30  provide the C++ aliases. */
31 
32 #include_next <unistd.h>
33 
34 #else
35 /* Normal invocation convention. */
36 
37 /* The include_next requires a split double-inclusion guard. */
38 #if 1
39 # define _GL_INCLUDING_UNISTD_H
40 # include_next <unistd.h>
41 # undef _GL_INCLUDING_UNISTD_H
42 #endif
43 
44 /* Get all possible declarations of gethostname(). */
45 #if 0 && 0 \
46  && !defined _GL_INCLUDING_WINSOCK2_H
47 # define _GL_INCLUDING_WINSOCK2_H
48 # include <winsock2.h>
49 # undef _GL_INCLUDING_WINSOCK2_H
50 #endif
51 
52 #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
53 #define _GL_UNISTD_H
54 
55 /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
56 #include <stddef.h>
57 
58 /* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
59 /* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
60  it before we #define unlink rpl_unlink. */
61 /* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
62 /* But avoid namespace pollution on glibc systems. */
63 #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
64  || ((0 || defined GNULIB_POSIXCHECK) \
65  && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \
66  || ((0 || defined GNULIB_POSIXCHECK) \
67  && defined __CYGWIN__)) \
68  && ! defined __GLIBC__
69 # include <stdio.h>
70 #endif
71 
72 /* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
73 /* But avoid namespace pollution on glibc systems. */
74 #if (0 || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \
75  && ! defined __GLIBC__
76 # include <fcntl.h>
77 #endif
78 
79 /* mingw fails to declare _exit in <unistd.h>. */
80 /* mingw, MSVC, BeOS, Haiku declare environ in <stdlib.h>, not in
81  <unistd.h>. */
82 /* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
83 /* OSF Tru64 Unix cannot see gnulib rpl_strtod when system <stdlib.h> is
84  included here. */
85 /* But avoid namespace pollution on glibc systems. */
86 #if !defined __GLIBC__ && !defined __osf__
87 # define __need_system_stdlib_h
88 # include <stdlib.h>
89 # undef __need_system_stdlib_h
90 #endif
91 
92 /* Native Windows platforms declare chdir, getcwd, rmdir in
93  <io.h> and/or <direct.h>, not in <unistd.h>.
94  They also declare access(), chmod(), close(), dup(), dup2(), isatty(),
95  lseek(), read(), unlink(), write() in <io.h>. */
96 #if ((0 || 0 || 0 \
97  || defined GNULIB_POSIXCHECK) \
98  && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
99 # include <io.h> /* mingw32, mingw64 */
100 # include <direct.h> /* mingw64, MSVC 9 */
101 #elif (1 || 0 || 0 || 0 \
102  || 1 || 0 || 0 || 0 \
103  || defined GNULIB_POSIXCHECK) \
104  && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
105 # include <io.h>
106 #endif
107 
108 /* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
109  NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>. */
110 /* But avoid namespace pollution on glibc systems. */
111 #if ((0 && (defined _AIX || defined __osf__)) \
112  || (0 && defined __TANDEM)) \
113  && !defined __GLIBC__
114 # include <netdb.h>
115 #endif
116 
117 /* MSVC defines off_t in <sys/types.h>.
118  May also define off_t to a 64-bit type on native Windows. */
119 #if !1 || 0
120 /* Get off_t. */
121 # include <sys/types.h>
122 #endif
123 
124 #if (0 || 0 \
125  || 0 || 0 \
126  || 0 || 0 || defined GNULIB_POSIXCHECK)
127 /* Get ssize_t. */
128 # include <sys/types.h>
129 #endif
130 
131 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
132 /* C++ compatible function declaration macros.
133  Copyright (C) 2010-2017 Free Software Foundation, Inc.
134 
135  This program is free software: you can redistribute it and/or modify it
136  under the terms of the GNU General Public License as published
137  by the Free Software Foundation; either version 3 of the License, or
138  (at your option) any later version.
139 
140  This program is distributed in the hope that it will be useful,
141  but WITHOUT ANY WARRANTY; without even the implied warranty of
142  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
143  General Public License for more details.
144 
145  You should have received a copy of the GNU General Public License
146  along with this program. If not, see <https://www.gnu.org/licenses/>. */
147 
148 #ifndef _GL_CXXDEFS_H
149 #define _GL_CXXDEFS_H
150 
151 /* Begin/end the GNULIB_NAMESPACE namespace. */
152 #if defined __cplusplus && defined GNULIB_NAMESPACE
153 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
154 # define _GL_END_NAMESPACE }
155 #else
156 # define _GL_BEGIN_NAMESPACE
157 # define _GL_END_NAMESPACE
158 #endif
159 
160 /* The three most frequent use cases of these macros are:
161 
162  * For providing a substitute for a function that is missing on some
163  platforms, but is declared and works fine on the platforms on which
164  it exists:
165 
166  #if @GNULIB_FOO@
167  # if !@HAVE_FOO@
168  _GL_FUNCDECL_SYS (foo, ...);
169  # endif
170  _GL_CXXALIAS_SYS (foo, ...);
171  _GL_CXXALIASWARN (foo);
172  #elif defined GNULIB_POSIXCHECK
173  ...
174  #endif
175 
176  * For providing a replacement for a function that exists on all platforms,
177  but is broken/insufficient and needs to be replaced on some platforms:
178 
179  #if @GNULIB_FOO@
180  # if @REPLACE_FOO@
181  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
182  # undef foo
183  # define foo rpl_foo
184  # endif
185  _GL_FUNCDECL_RPL (foo, ...);
186  _GL_CXXALIAS_RPL (foo, ...);
187  # else
188  _GL_CXXALIAS_SYS (foo, ...);
189  # endif
190  _GL_CXXALIASWARN (foo);
191  #elif defined GNULIB_POSIXCHECK
192  ...
193  #endif
194 
195  * For providing a replacement for a function that exists on some platforms
196  but is broken/insufficient and needs to be replaced on some of them and
197  is additionally either missing or undeclared on some other platforms:
198 
199  #if @GNULIB_FOO@
200  # if @REPLACE_FOO@
201  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
202  # undef foo
203  # define foo rpl_foo
204  # endif
205  _GL_FUNCDECL_RPL (foo, ...);
206  _GL_CXXALIAS_RPL (foo, ...);
207  # else
208  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
209  _GL_FUNCDECL_SYS (foo, ...);
210  # endif
211  _GL_CXXALIAS_SYS (foo, ...);
212  # endif
213  _GL_CXXALIASWARN (foo);
214  #elif defined GNULIB_POSIXCHECK
215  ...
216  #endif
217 */
218 
219 /* _GL_EXTERN_C declaration;
220  performs the declaration with C linkage. */
221 #if defined __cplusplus
222 # define _GL_EXTERN_C extern "C"
223 #else
224 # define _GL_EXTERN_C extern
225 #endif
226 
227 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
228  declares a replacement function, named rpl_func, with the given prototype,
229  consisting of return type, parameters, and attributes.
230  Example:
231  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
232  _GL_ARG_NONNULL ((1)));
233  */
234 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
235  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
236 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
237  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
238 
239 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
240  declares the system function, named func, with the given prototype,
241  consisting of return type, parameters, and attributes.
242  Example:
243  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
244  _GL_ARG_NONNULL ((1)));
245  */
246 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
247  _GL_EXTERN_C rettype func parameters_and_attributes
248 
249 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
250  declares a C++ alias called GNULIB_NAMESPACE::func
251  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
252  Example:
253  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
254 
255  Wrapping rpl_func in an object with an inline conversion operator
256  avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
257  actually used in the program. */
258 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
259  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
260 #if defined __cplusplus && defined GNULIB_NAMESPACE
261 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
262  namespace GNULIB_NAMESPACE \
263  { \
264  static const struct _gl_ ## func ## _wrapper \
265  { \
266  typedef rettype (*type) parameters; \
267  \
268  inline operator type () const \
269  { \
270  return ::rpl_func; \
271  } \
272  } func = {}; \
273  } \
274  _GL_EXTERN_C int _gl_cxxalias_dummy
275 #else
276 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
277  _GL_EXTERN_C int _gl_cxxalias_dummy
278 #endif
279 
280 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
281  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
282  except that the C function rpl_func may have a slightly different
283  declaration. A cast is used to silence the "invalid conversion" error
284  that would otherwise occur. */
285 #if defined __cplusplus && defined GNULIB_NAMESPACE
286 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
287  namespace GNULIB_NAMESPACE \
288  { \
289  static const struct _gl_ ## func ## _wrapper \
290  { \
291  typedef rettype (*type) parameters; \
292  \
293  inline operator type () const \
294  { \
295  return reinterpret_cast<type>(::rpl_func); \
296  } \
297  } func = {}; \
298  } \
299  _GL_EXTERN_C int _gl_cxxalias_dummy
300 #else
301 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
302  _GL_EXTERN_C int _gl_cxxalias_dummy
303 #endif
304 
305 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
306  declares a C++ alias called GNULIB_NAMESPACE::func
307  that redirects to the system provided function func, if GNULIB_NAMESPACE
308  is defined.
309  Example:
310  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
311 
312  Wrapping func in an object with an inline conversion operator
313  avoids a reference to func unless GNULIB_NAMESPACE::func is
314  actually used in the program. */
315 #if defined __cplusplus && defined GNULIB_NAMESPACE
316 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
317  namespace GNULIB_NAMESPACE \
318  { \
319  static const struct _gl_ ## func ## _wrapper \
320  { \
321  typedef rettype (*type) parameters; \
322  \
323  inline operator type () const \
324  { \
325  return ::func; \
326  } \
327  } func = {}; \
328  } \
329  _GL_EXTERN_C int _gl_cxxalias_dummy
330 #else
331 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
332  _GL_EXTERN_C int _gl_cxxalias_dummy
333 #endif
334 
335 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
336  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
337  except that the C function func may have a slightly different declaration.
338  A cast is used to silence the "invalid conversion" error that would
339  otherwise occur. */
340 #if defined __cplusplus && defined GNULIB_NAMESPACE
341 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
342  namespace GNULIB_NAMESPACE \
343  { \
344  static const struct _gl_ ## func ## _wrapper \
345  { \
346  typedef rettype (*type) parameters; \
347  \
348  inline operator type () const \
349  { \
350  return reinterpret_cast<type>(::func); \
351  } \
352  } func = {}; \
353  } \
354  _GL_EXTERN_C int _gl_cxxalias_dummy
355 #else
356 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
357  _GL_EXTERN_C int _gl_cxxalias_dummy
358 #endif
359 
360 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
361  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
362  except that the C function is picked among a set of overloaded functions,
363  namely the one with rettype2 and parameters2. Two consecutive casts
364  are used to silence the "cannot find a match" and "invalid conversion"
365  errors that would otherwise occur. */
366 #if defined __cplusplus && defined GNULIB_NAMESPACE
367  /* The outer cast must be a reinterpret_cast.
368  The inner cast: When the function is defined as a set of overloaded
369  functions, it works as a static_cast<>, choosing the designated variant.
370  When the function is defined as a single variant, it works as a
371  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
372 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
373  namespace GNULIB_NAMESPACE \
374  { \
375  static const struct _gl_ ## func ## _wrapper \
376  { \
377  typedef rettype (*type) parameters; \
378  \
379  inline operator type () const \
380  { \
381  return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
382  } \
383  } func = {}; \
384  } \
385  _GL_EXTERN_C int _gl_cxxalias_dummy
386 #else
387 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
388  _GL_EXTERN_C int _gl_cxxalias_dummy
389 #endif
390 
391 /* _GL_CXXALIASWARN (func);
392  causes a warning to be emitted when ::func is used but not when
393  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
394  variants. */
395 #if defined __cplusplus && defined GNULIB_NAMESPACE
396 # define _GL_CXXALIASWARN(func) \
397  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
398 # define _GL_CXXALIASWARN_1(func,namespace) \
399  _GL_CXXALIASWARN_2 (func, namespace)
400 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
401  we enable the warning only when not optimizing. */
402 # if !__OPTIMIZE__
403 # define _GL_CXXALIASWARN_2(func,namespace) \
404  _GL_WARN_ON_USE (func, \
405  "The symbol ::" #func " refers to the system function. " \
406  "Use " #namespace "::" #func " instead.")
407 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
408 # define _GL_CXXALIASWARN_2(func,namespace) \
409  extern __typeof__ (func) func
410 # else
411 # define _GL_CXXALIASWARN_2(func,namespace) \
412  _GL_EXTERN_C int _gl_cxxalias_dummy
413 # endif
414 #else
415 # define _GL_CXXALIASWARN(func) \
416  _GL_EXTERN_C int _gl_cxxalias_dummy
417 #endif
418 
419 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
420  causes a warning to be emitted when the given overloaded variant of ::func
421  is used but not when GNULIB_NAMESPACE::func is used. */
422 #if defined __cplusplus && defined GNULIB_NAMESPACE
423 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
424  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
425  GNULIB_NAMESPACE)
426 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
427  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
428 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
429  we enable the warning only when not optimizing. */
430 # if !__OPTIMIZE__
431 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
432  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
433  "The symbol ::" #func " refers to the system function. " \
434  "Use " #namespace "::" #func " instead.")
435 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
436 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
437  extern __typeof__ (func) func
438 # else
439 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
440  _GL_EXTERN_C int _gl_cxxalias_dummy
441 # endif
442 #else
443 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
444  _GL_EXTERN_C int _gl_cxxalias_dummy
445 #endif
446 
447 #endif /* _GL_CXXDEFS_H */
448 
449 /* The definition of _GL_ARG_NONNULL is copied here. */
450 /* A C macro for declaring that specific arguments must not be NULL.
451  Copyright (C) 2009-2017 Free Software Foundation, Inc.
452 
453  This program is free software: you can redistribute it and/or modify it
454  under the terms of the GNU General Public License as published
455  by the Free Software Foundation; either version 3 of the License, or
456  (at your option) any later version.
457 
458  This program is distributed in the hope that it will be useful,
459  but WITHOUT ANY WARRANTY; without even the implied warranty of
460  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
461  General Public License for more details.
462 
463  You should have received a copy of the GNU General Public License
464  along with this program. If not, see <https://www.gnu.org/licenses/>. */
465 
466 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
467  that the values passed as arguments n, ..., m must be non-NULL pointers.
468  n = 1 stands for the first argument, n = 2 for the second argument etc. */
469 #ifndef _GL_ARG_NONNULL
470 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
471 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
472 # else
473 # define _GL_ARG_NONNULL(params)
474 # endif
475 #endif
476 
477 /* The definition of _GL_WARN_ON_USE is copied here. */
478 /* A C macro for emitting warnings if a function is used.
479  Copyright (C) 2010-2017 Free Software Foundation, Inc.
480 
481  This program is free software: you can redistribute it and/or modify it
482  under the terms of the GNU General Public License as published
483  by the Free Software Foundation; either version 3 of the License, or
484  (at your option) any later version.
485 
486  This program is distributed in the hope that it will be useful,
487  but WITHOUT ANY WARRANTY; without even the implied warranty of
488  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
489  General Public License for more details.
490 
491  You should have received a copy of the GNU General Public License
492  along with this program. If not, see <https://www.gnu.org/licenses/>. */
493 
494 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
495  for FUNCTION which will then trigger a compiler warning containing
496  the text of "literal string" anywhere that function is called, if
497  supported by the compiler. If the compiler does not support this
498  feature, the macro expands to an unused extern declaration.
499 
500  This macro is useful for marking a function as a potential
501  portability trap, with the intent that "literal string" include
502  instructions on the replacement function that should be used
503  instead. However, one of the reasons that a function is a
504  portability trap is if it has the wrong signature. Declaring
505  FUNCTION with a different signature in C is a compilation error, so
506  this macro must use the same type as any existing declaration so
507  that programs that avoid the problematic FUNCTION do not fail to
508  compile merely because they included a header that poisoned the
509  function. But this implies that _GL_WARN_ON_USE is only safe to
510  use if FUNCTION is known to already have a declaration. Use of
511  this macro implies that there must not be any other macro hiding
512  the declaration of FUNCTION; but undefining FUNCTION first is part
513  of the poisoning process anyway (although for symbols that are
514  provided only via a macro, the result is a compilation error rather
515  than a warning containing "literal string"). Also note that in
516  C++, it is only safe to use if FUNCTION has no overloads.
517 
518  For an example, it is possible to poison 'getline' by:
519  - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
520  [getline]) in configure.ac, which potentially defines
521  HAVE_RAW_DECL_GETLINE
522  - adding this code to a header that wraps the system <stdio.h>:
523  #undef getline
524  #if HAVE_RAW_DECL_GETLINE
525  _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
526  "not universally present; use the gnulib module getline");
527  #endif
528 
529  It is not possible to directly poison global variables. But it is
530  possible to write a wrapper accessor function, and poison that
531  (less common usage, like &environ, will cause a compilation error
532  rather than issue the nice warning, but the end result of informing
533  the developer about their portability problem is still achieved):
534  #if HAVE_RAW_DECL_ENVIRON
535  static char ***rpl_environ (void) { return &environ; }
536  _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
537  # undef environ
538  # define environ (*rpl_environ ())
539  #endif
540  */
541 #ifndef _GL_WARN_ON_USE
542 
543 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
544 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
545 # define _GL_WARN_ON_USE(function, message) \
546 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
547 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
548 /* Verify the existence of the function. */
549 # define _GL_WARN_ON_USE(function, message) \
550 extern __typeof__ (function) function
551 # else /* Unsupported. */
552 # define _GL_WARN_ON_USE(function, message) \
553 _GL_WARN_EXTERN_C int _gl_warn_on_use
554 # endif
555 #endif
556 
557 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
558  is like _GL_WARN_ON_USE (function, "string"), except that the function is
559  declared with the given prototype, consisting of return type, parameters,
560  and attributes.
561  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
562  not work in this case. */
563 #ifndef _GL_WARN_ON_USE_CXX
564 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
565 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
566 extern rettype function parameters_and_attributes \
567  __attribute__ ((__warning__ (msg)))
568 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
569 /* Verify the existence of the function. */
570 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
571 extern rettype function parameters_and_attributes
572 # else /* Unsupported. */
573 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
574 _GL_WARN_EXTERN_C int _gl_warn_on_use
575 # endif
576 #endif
577 
578 /* _GL_WARN_EXTERN_C declaration;
579  performs the declaration with C linkage. */
580 #ifndef _GL_WARN_EXTERN_C
581 # if defined __cplusplus
582 # define _GL_WARN_EXTERN_C extern "C"
583 # else
584 # define _GL_WARN_EXTERN_C extern
585 # endif
586 #endif
587 
588 
589 /* Get getopt(), optarg, optind, opterr, optopt. */
590 #if 0 && !defined _GL_SYSTEM_GETOPT
591 # include <getopt-cdefs.h>
592 # include <getopt-pfx-core.h>
593 #endif
594 
595 #ifndef _GL_INLINE_HEADER_BEGIN
596  #error "Please include config.h first."
597 #endif
599 #ifndef _GL_UNISTD_INLINE
600 # define _GL_UNISTD_INLINE _GL_INLINE
601 #endif
602 
603 /* Hide some function declarations from <winsock2.h>. */
604 
605 #if 0 && 0
606 # if !defined _GL_SYS_SOCKET_H
607 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
608 # undef socket
609 # define socket socket_used_without_including_sys_socket_h
610 # undef connect
611 # define connect connect_used_without_including_sys_socket_h
612 # undef accept
613 # define accept accept_used_without_including_sys_socket_h
614 # undef bind
615 # define bind bind_used_without_including_sys_socket_h
616 # undef getpeername
617 # define getpeername getpeername_used_without_including_sys_socket_h
618 # undef getsockname
619 # define getsockname getsockname_used_without_including_sys_socket_h
620 # undef getsockopt
621 # define getsockopt getsockopt_used_without_including_sys_socket_h
622 # undef listen
623 # define listen listen_used_without_including_sys_socket_h
624 # undef recv
625 # define recv recv_used_without_including_sys_socket_h
626 # undef send
627 # define send send_used_without_including_sys_socket_h
628 # undef recvfrom
629 # define recvfrom recvfrom_used_without_including_sys_socket_h
630 # undef sendto
631 # define sendto sendto_used_without_including_sys_socket_h
632 # undef setsockopt
633 # define setsockopt setsockopt_used_without_including_sys_socket_h
634 # undef shutdown
635 # define shutdown shutdown_used_without_including_sys_socket_h
636 # else
637  _GL_WARN_ON_USE (socket,
638  "socket() used without including <sys/socket.h>");
639  _GL_WARN_ON_USE (connect,
640  "connect() used without including <sys/socket.h>");
641  _GL_WARN_ON_USE (accept,
642  "accept() used without including <sys/socket.h>");
643  _GL_WARN_ON_USE (bind,
644  "bind() used without including <sys/socket.h>");
645  _GL_WARN_ON_USE (getpeername,
646  "getpeername() used without including <sys/socket.h>");
647  _GL_WARN_ON_USE (getsockname,
648  "getsockname() used without including <sys/socket.h>");
649  _GL_WARN_ON_USE (getsockopt,
650  "getsockopt() used without including <sys/socket.h>");
651  _GL_WARN_ON_USE (listen,
652  "listen() used without including <sys/socket.h>");
653  _GL_WARN_ON_USE (recv,
654  "recv() used without including <sys/socket.h>");
655  _GL_WARN_ON_USE (send,
656  "send() used without including <sys/socket.h>");
657  _GL_WARN_ON_USE (recvfrom,
658  "recvfrom() used without including <sys/socket.h>");
659  _GL_WARN_ON_USE (sendto,
660  "sendto() used without including <sys/socket.h>");
661  _GL_WARN_ON_USE (setsockopt,
662  "setsockopt() used without including <sys/socket.h>");
663  _GL_WARN_ON_USE (shutdown,
664  "shutdown() used without including <sys/socket.h>");
665 # endif
666 # endif
667 # if !defined _GL_SYS_SELECT_H
668 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
669 # undef select
670 # define select select_used_without_including_sys_select_h
671 # else
672  _GL_WARN_ON_USE (select,
673  "select() used without including <sys/select.h>");
674 # endif
675 # endif
676 #endif
677 
678 
679 /* OS/2 EMX lacks these macros. */
680 #ifndef STDIN_FILENO
681 # define STDIN_FILENO 0
682 #endif
683 #ifndef STDOUT_FILENO
684 # define STDOUT_FILENO 1
685 #endif
686 #ifndef STDERR_FILENO
687 # define STDERR_FILENO 2
688 #endif
689 
690 /* Ensure *_OK macros exist. */
691 #ifndef F_OK
692 # define F_OK 0
693 # define X_OK 1
694 # define W_OK 2
695 # define R_OK 4
696 #endif
697 
698 
699 /* Declare overridden functions. */
700 
701 
702 #if defined GNULIB_POSIXCHECK
703 /* The access() function is a security risk. */
704 _GL_WARN_ON_USE (access, "the access function is a security risk - "
705  "use the gnulib module faccessat instead");
706 #endif
707 
708 
709 #if 0
710 _GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1)));
711 _GL_CXXALIASWARN (chdir);
712 #elif defined GNULIB_POSIXCHECK
713 # undef chdir
714 # if HAVE_RAW_DECL_CHDIR
715 _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - "
716  "use gnulib module chdir for portability");
717 # endif
718 #endif
719 
720 
721 #if 0
722 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
723  to GID (if GID is not -1). Follow symbolic links.
724  Return 0 if successful, otherwise -1 and errno set.
725  See the POSIX:2008 specification
726  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html. */
727 # if 0
728 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
729 # undef chown
730 # define chown rpl_chown
731 # endif
732 _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)
733  _GL_ARG_NONNULL ((1)));
734 _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid));
735 # else
736 # if !1
737 _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)
738  _GL_ARG_NONNULL ((1)));
739 # endif
740 _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid));
741 # endif
742 _GL_CXXALIASWARN (chown);
743 #elif defined GNULIB_POSIXCHECK
744 # undef chown
745 # if HAVE_RAW_DECL_CHOWN
746 _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
747  "doesn't treat a uid or gid of -1 on some systems - "
748  "use gnulib module chown for portability");
749 # endif
750 #endif
751 
752 
753 #if 1
754 # if 0
755 /* Automatically included by modules that need a replacement for close. */
756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
757 # undef close
758 # define close rpl_close
759 # endif
760 _GL_FUNCDECL_RPL (close, int, (int fd));
761 _GL_CXXALIAS_RPL (close, int, (int fd));
762 # else
763 _GL_CXXALIAS_SYS (close, int, (int fd));
764 # endif
765 _GL_CXXALIASWARN (close);
766 #elif 0
767 # undef close
768 # define close close_used_without_requesting_gnulib_module_close
769 #elif defined GNULIB_POSIXCHECK
770 # undef close
771 /* Assume close is always declared. */
772 _GL_WARN_ON_USE (close, "close does not portably work on sockets - "
773  "use gnulib module close for portability");
774 #endif
775 
776 
777 #if 0
778 # if 0
779 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
780 # define dup rpl_dup
781 # endif
782 _GL_FUNCDECL_RPL (dup, int, (int oldfd));
783 _GL_CXXALIAS_RPL (dup, int, (int oldfd));
784 # else
785 _GL_CXXALIAS_SYS (dup, int, (int oldfd));
786 # endif
787 _GL_CXXALIASWARN (dup);
788 #elif defined GNULIB_POSIXCHECK
789 # undef dup
790 # if HAVE_RAW_DECL_DUP
791 _GL_WARN_ON_USE (dup, "dup is unportable - "
792  "use gnulib module dup for portability");
793 # endif
794 #endif
795 
796 
797 #if 0
798 /* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
799  NEWFD = OLDFD, otherwise close NEWFD first if it is open.
800  Return newfd if successful, otherwise -1 and errno set.
801  See the POSIX:2008 specification
802  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html>. */
803 # if 0
804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
805 # define dup2 rpl_dup2
806 # endif
807 _GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd));
808 _GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd));
809 # else
810 # if !1
811 _GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd));
812 # endif
813 _GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd));
814 # endif
815 _GL_CXXALIASWARN (dup2);
816 #elif defined GNULIB_POSIXCHECK
817 # undef dup2
818 # if HAVE_RAW_DECL_DUP2
819 _GL_WARN_ON_USE (dup2, "dup2 is unportable - "
820  "use gnulib module dup2 for portability");
821 # endif
822 #endif
823 
824 
825 #if 0
826 /* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
827  specified flags.
828  The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
829  and O_TEXT, O_BINARY (defined in "binary-io.h").
830  Close NEWFD first if it is open.
831  Return newfd if successful, otherwise -1 and errno set.
832  See the Linux man page at
833  <https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
834 # if 1
835 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
836 # define dup3 rpl_dup3
837 # endif
838 _GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
839 _GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
840 # else
841 _GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
842 _GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
843 # endif
844 _GL_CXXALIASWARN (dup3);
845 #elif defined GNULIB_POSIXCHECK
846 # undef dup3
847 # if HAVE_RAW_DECL_DUP3
848 _GL_WARN_ON_USE (dup3, "dup3 is unportable - "
849  "use gnulib module dup3 for portability");
850 # endif
851 #endif
852 
853 
854 #if 1
855 # if !1
856 /* Set of environment variables and values. An array of strings of the form
857  "VARIABLE=VALUE", terminated with a NULL. */
858 # if defined __APPLE__ && defined __MACH__
859 # include <TargetConditionals.h>
860 # if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
861 # define _GL_USE_CRT_EXTERNS
862 # endif
863 # endif
864 # ifdef _GL_USE_CRT_EXTERNS
865 # include <crt_externs.h>
866 # define environ (*_NSGetEnviron ())
867 # else
868 # ifdef __cplusplus
869 extern "C" {
870 # endif
871 extern char **environ;
872 # ifdef __cplusplus
873 }
874 # endif
875 # endif
876 # endif
877 #elif defined GNULIB_POSIXCHECK
878 # if HAVE_RAW_DECL_ENVIRON
879 _GL_UNISTD_INLINE char ***
880 rpl_environ (void)
881 {
882  return &environ;
883 }
884 _GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
885  "use gnulib module environ for portability");
886 # undef environ
887 # define environ (*rpl_environ ())
888 # endif
889 #endif
890 
891 
892 #if 0
893 /* Like access(), except that it uses the effective user id and group id of
894  the current process. */
895 # if !1
896 _GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode)
897  _GL_ARG_NONNULL ((1)));
898 # endif
899 _GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode));
900 _GL_CXXALIASWARN (euidaccess);
901 # if defined GNULIB_POSIXCHECK
902 /* Like access(), this function is a security risk. */
903 _GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - "
904  "use the gnulib module faccessat instead");
905 # endif
906 #elif defined GNULIB_POSIXCHECK
907 # undef euidaccess
908 # if HAVE_RAW_DECL_EUIDACCESS
909 _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
910  "use gnulib module euidaccess for portability");
911 # endif
912 #endif
913 
914 
915 #if 0
916 # if 0
917 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
918 # undef faccessat
919 # define faccessat rpl_faccessat
920 # endif
921 _GL_FUNCDECL_RPL (faccessat, int,
922  (int fd, char const *name, int mode, int flag)
923  _GL_ARG_NONNULL ((2)));
924 _GL_CXXALIAS_RPL (faccessat, int,
925  (int fd, char const *name, int mode, int flag));
926 # else
927 # if !1
928 _GL_FUNCDECL_SYS (faccessat, int,
929  (int fd, char const *file, int mode, int flag)
930  _GL_ARG_NONNULL ((2)));
931 # endif
932 _GL_CXXALIAS_SYS (faccessat, int,
933  (int fd, char const *file, int mode, int flag));
934 # endif
935 _GL_CXXALIASWARN (faccessat);
936 #elif defined GNULIB_POSIXCHECK
937 # undef faccessat
938 # if HAVE_RAW_DECL_FACCESSAT
939 _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
940  "use gnulib module faccessat for portability");
941 # endif
942 #endif
943 
944 
945 #if 0
946 /* Change the process' current working directory to the directory on which
947  the given file descriptor is open.
948  Return 0 if successful, otherwise -1 and errno set.
949  See the POSIX:2008 specification
950  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>. */
951 # if ! 1
952 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
953 
954 /* Gnulib internal hooks needed to maintain the fchdir metadata. */
955 _GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
956  _GL_ARG_NONNULL ((2));
957 _GL_EXTERN_C void _gl_unregister_fd (int fd);
958 _GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
959 _GL_EXTERN_C const char *_gl_directory_name (int fd);
960 
961 # else
962 # if !1
963 _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
964 # endif
965 # endif
966 _GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
967 _GL_CXXALIASWARN (fchdir);
968 #elif defined GNULIB_POSIXCHECK
969 # undef fchdir
970 # if HAVE_RAW_DECL_FCHDIR
971 _GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
972  "use gnulib module fchdir for portability");
973 # endif
974 #endif
975 
976 
977 #if 0
978 # if 0
979 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
980 # undef fchownat
981 # define fchownat rpl_fchownat
982 # endif
983 _GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file,
984  uid_t owner, gid_t group, int flag)
985  _GL_ARG_NONNULL ((2)));
986 _GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file,
987  uid_t owner, gid_t group, int flag));
988 # else
989 # if !1
990 _GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file,
991  uid_t owner, gid_t group, int flag)
992  _GL_ARG_NONNULL ((2)));
993 # endif
994 _GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file,
995  uid_t owner, gid_t group, int flag));
996 # endif
997 _GL_CXXALIASWARN (fchownat);
998 #elif defined GNULIB_POSIXCHECK
999 # undef fchownat
1000 # if HAVE_RAW_DECL_FCHOWNAT
1001 _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
1002  "use gnulib module openat for portability");
1003 # endif
1004 #endif
1005 
1006 
1007 #if 0
1008 /* Synchronize changes to a file.
1009  Return 0 if successful, otherwise -1 and errno set.
1010  See POSIX:2008 specification
1011  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
1012 # if !1 || !1
1013 _GL_FUNCDECL_SYS (fdatasync, int, (int fd));
1014 # endif
1015 _GL_CXXALIAS_SYS (fdatasync, int, (int fd));
1016 _GL_CXXALIASWARN (fdatasync);
1017 #elif defined GNULIB_POSIXCHECK
1018 # undef fdatasync
1019 # if HAVE_RAW_DECL_FDATASYNC
1020 _GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - "
1021  "use gnulib module fdatasync for portability");
1022 # endif
1023 #endif
1024 
1025 
1026 #if 0
1027 /* Synchronize changes, including metadata, to a file.
1028  Return 0 if successful, otherwise -1 and errno set.
1029  See POSIX:2008 specification
1030  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html>. */
1031 # if !1
1032 _GL_FUNCDECL_SYS (fsync, int, (int fd));
1033 # endif
1034 _GL_CXXALIAS_SYS (fsync, int, (int fd));
1035 _GL_CXXALIASWARN (fsync);
1036 #elif defined GNULIB_POSIXCHECK
1037 # undef fsync
1038 # if HAVE_RAW_DECL_FSYNC
1039 _GL_WARN_ON_USE (fsync, "fsync is unportable - "
1040  "use gnulib module fsync for portability");
1041 # endif
1042 #endif
1043 
1044 
1045 #if 0
1046 /* Change the size of the file to which FD is opened to become equal to LENGTH.
1047  Return 0 if successful, otherwise -1 and errno set.
1048  See the POSIX:2008 specification
1049  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html>. */
1050 # if 0
1051 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1052 # undef ftruncate
1053 # define ftruncate rpl_ftruncate
1054 # endif
1055 _GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length));
1056 _GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length));
1057 # else
1058 # if !1
1059 _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
1060 # endif
1061 _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
1062 # endif
1063 _GL_CXXALIASWARN (ftruncate);
1064 #elif defined GNULIB_POSIXCHECK
1065 # undef ftruncate
1066 # if HAVE_RAW_DECL_FTRUNCATE
1067 _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
1068  "use gnulib module ftruncate for portability");
1069 # endif
1070 #endif
1071 
1072 
1073 #if 0
1074 /* Get the name of the current working directory, and put it in SIZE bytes
1075  of BUF.
1076  Return BUF if successful, or NULL if the directory couldn't be determined
1077  or SIZE was too small.
1078  See the POSIX:2008 specification
1079  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
1080  Additionally, the gnulib module 'getcwd' guarantees the following GNU
1081  extension: If BUF is NULL, an array is allocated with 'malloc'; the array
1082  is SIZE bytes long, unless SIZE == 0, in which case it is as big as
1083  necessary. */
1084 # if 0
1085 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1086 # define getcwd rpl_getcwd
1087 # endif
1088 _GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size));
1089 _GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size));
1090 # else
1091 /* Need to cast, because on mingw, the second parameter is
1092  int size. */
1093 _GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size));
1094 # endif
1095 _GL_CXXALIASWARN (getcwd);
1096 #elif defined GNULIB_POSIXCHECK
1097 # undef getcwd
1098 # if HAVE_RAW_DECL_GETCWD
1099 _GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
1100  "use gnulib module getcwd for portability");
1101 # endif
1102 #endif
1103 
1104 
1105 #if 0
1106 /* Return the NIS domain name of the machine.
1107  WARNING! The NIS domain name is unrelated to the fully qualified host name
1108  of the machine. It is also unrelated to email addresses.
1109  WARNING! The NIS domain name is usually the empty string or "(none)" when
1110  not using NIS.
1111 
1112  Put up to LEN bytes of the NIS domain name into NAME.
1113  Null terminate it if the name is shorter than LEN.
1114  If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
1115  Return 0 if successful, otherwise set errno and return -1. */
1116 # if 0
1117 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1118 # undef getdomainname
1119 # define getdomainname rpl_getdomainname
1120 # endif
1121 _GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len)
1122  _GL_ARG_NONNULL ((1)));
1123 _GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len));
1124 # else
1125 # if !1
1126 _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
1127  _GL_ARG_NONNULL ((1)));
1128 # endif
1129 _GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
1130 # endif
1131 _GL_CXXALIASWARN (getdomainname);
1132 #elif defined GNULIB_POSIXCHECK
1133 # undef getdomainname
1134 # if HAVE_RAW_DECL_GETDOMAINNAME
1135 _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
1136  "use gnulib module getdomainname for portability");
1137 # endif
1138 #endif
1139 
1140 
1141 #if 0
1142 /* Return the maximum number of file descriptors in the current process.
1143  In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
1144 # if 0
1145 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1146 # undef getdtablesize
1147 # define getdtablesize rpl_getdtablesize
1148 # endif
1149 _GL_FUNCDECL_RPL (getdtablesize, int, (void));
1150 _GL_CXXALIAS_RPL (getdtablesize, int, (void));
1151 # else
1152 # if !1
1153 _GL_FUNCDECL_SYS (getdtablesize, int, (void));
1154 # endif
1155 _GL_CXXALIAS_SYS (getdtablesize, int, (void));
1156 # endif
1157 _GL_CXXALIASWARN (getdtablesize);
1158 #elif defined GNULIB_POSIXCHECK
1159 # undef getdtablesize
1160 # if HAVE_RAW_DECL_GETDTABLESIZE
1161 _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
1162  "use gnulib module getdtablesize for portability");
1163 # endif
1164 #endif
1165 
1166 
1167 #if 0
1168 /* Return the supplemental groups that the current process belongs to.
1169  It is unspecified whether the effective group id is in the list.
1170  If N is 0, return the group count; otherwise, N describes how many
1171  entries are available in GROUPS. Return -1 and set errno if N is
1172  not 0 and not large enough. Fails with ENOSYS on some systems. */
1173 # if 0
1174 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1175 # undef getgroups
1176 # define getgroups rpl_getgroups
1177 # endif
1178 _GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups));
1179 _GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups));
1180 # else
1181 # if !1
1182 _GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups));
1183 # endif
1184 _GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups));
1185 # endif
1186 _GL_CXXALIASWARN (getgroups);
1187 #elif defined GNULIB_POSIXCHECK
1188 # undef getgroups
1189 # if HAVE_RAW_DECL_GETGROUPS
1190 _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
1191  "use gnulib module getgroups for portability");
1192 # endif
1193 #endif
1194 
1195 
1196 #if 0
1197 /* Return the standard host name of the machine.
1198  WARNING! The host name may or may not be fully qualified.
1199 
1200  Put up to LEN bytes of the host name into NAME.
1201  Null terminate it if the name is shorter than LEN.
1202  If the host name is longer than LEN, set errno = EINVAL and return -1.
1203  Return 0 if successful, otherwise set errno and return -1. */
1204 # if 0
1205 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1206 # undef gethostname
1207 # define gethostname rpl_gethostname
1208 # endif
1209 _GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len)
1210  _GL_ARG_NONNULL ((1)));
1211 _GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len));
1212 # else
1213 # if !1
1214 _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
1215  _GL_ARG_NONNULL ((1)));
1216 # endif
1217 /* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second
1218  parameter is
1219  int len. */
1220 _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
1221 # endif
1222 _GL_CXXALIASWARN (gethostname);
1223 #elif 0
1224 # undef gethostname
1225 # define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
1226 #elif defined GNULIB_POSIXCHECK
1227 # undef gethostname
1228 # if HAVE_RAW_DECL_GETHOSTNAME
1229 _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
1230  "use gnulib module gethostname for portability");
1231 # endif
1232 #endif
1233 
1234 
1235 #if 0
1236 /* Returns the user's login name, or NULL if it cannot be found. Upon error,
1237  returns NULL with errno set.
1238 
1239  See <http://www.opengroup.org/susv3xsh/getlogin.html>.
1240 
1241  Most programs don't need to use this function, because the information is
1242  available through environment variables:
1243  ${LOGNAME-$USER} on Unix platforms,
1244  $USERNAME on native Windows platforms.
1245  */
1246 # if !1
1247 _GL_FUNCDECL_SYS (getlogin, char *, (void));
1248 # endif
1249 _GL_CXXALIAS_SYS (getlogin, char *, (void));
1250 _GL_CXXALIASWARN (getlogin);
1251 #elif defined GNULIB_POSIXCHECK
1252 # undef getlogin
1253 # if HAVE_RAW_DECL_GETLOGIN
1254 _GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
1255  "use gnulib module getlogin for portability");
1256 # endif
1257 #endif
1258 
1259 
1260 #if 0
1261 /* Copies the user's login name to NAME.
1262  The array pointed to by NAME has room for SIZE bytes.
1263 
1264  Returns 0 if successful. Upon error, an error number is returned, or -1 in
1265  the case that the login name cannot be found but no specific error is
1266  provided (this case is hopefully rare but is left open by the POSIX spec).
1267 
1268  See <http://www.opengroup.org/susv3xsh/getlogin.html>.
1269 
1270  Most programs don't need to use this function, because the information is
1271  available through environment variables:
1272  ${LOGNAME-$USER} on Unix platforms,
1273  $USERNAME on native Windows platforms.
1274  */
1275 # if 0
1276 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1277 # define getlogin_r rpl_getlogin_r
1278 # endif
1279 _GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size)
1280  _GL_ARG_NONNULL ((1)));
1281 _GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size));
1282 # else
1283 # if !1
1284 _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
1285  _GL_ARG_NONNULL ((1)));
1286 # endif
1287 /* Need to cast, because on Solaris 10 systems, the second argument is
1288  int size. */
1289 _GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
1290 # endif
1291 _GL_CXXALIASWARN (getlogin_r);
1292 #elif defined GNULIB_POSIXCHECK
1293 # undef getlogin_r
1294 # if HAVE_RAW_DECL_GETLOGIN_R
1295 _GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
1296  "use gnulib module getlogin_r for portability");
1297 # endif
1298 #endif
1299 
1300 
1301 #if 0
1302 # if 0
1303 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1304 # define getpagesize rpl_getpagesize
1305 # endif
1306 _GL_FUNCDECL_RPL (getpagesize, int, (void));
1307 _GL_CXXALIAS_RPL (getpagesize, int, (void));
1308 # else
1309 # if !1
1310 # if !defined getpagesize
1311 /* This is for POSIX systems. */
1312 # if !defined _gl_getpagesize && defined _SC_PAGESIZE
1313 # if ! (defined __VMS && __VMS_VER < 70000000)
1314 # define _gl_getpagesize() sysconf (_SC_PAGESIZE)
1315 # endif
1316 # endif
1317 /* This is for older VMS. */
1318 # if !defined _gl_getpagesize && defined __VMS
1319 # ifdef __ALPHA
1320 # define _gl_getpagesize() 8192
1321 # else
1322 # define _gl_getpagesize() 512
1323 # endif
1324 # endif
1325 /* This is for BeOS. */
1326 # if !defined _gl_getpagesize && 0
1327 # include <OS.h>
1328 # if defined B_PAGE_SIZE
1329 # define _gl_getpagesize() B_PAGE_SIZE
1330 # endif
1331 # endif
1332 /* This is for AmigaOS4.0. */
1333 # if !defined _gl_getpagesize && defined __amigaos4__
1334 # define _gl_getpagesize() 2048
1335 # endif
1336 /* This is for older Unix systems. */
1337 # if !defined _gl_getpagesize && 0
1338 # include <sys/param.h>
1339 # ifdef EXEC_PAGESIZE
1340 # define _gl_getpagesize() EXEC_PAGESIZE
1341 # else
1342 # ifdef NBPG
1343 # ifndef CLSIZE
1344 # define CLSIZE 1
1345 # endif
1346 # define _gl_getpagesize() (NBPG * CLSIZE)
1347 # else
1348 # ifdef NBPC
1349 # define _gl_getpagesize() NBPC
1350 # endif
1351 # endif
1352 # endif
1353 # endif
1354 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1355 # define getpagesize() _gl_getpagesize ()
1356 # else
1357 # if !GNULIB_defined_getpagesize_function
1359 getpagesize ()
1360 {
1361  return _gl_getpagesize ();
1362 }
1363 # define GNULIB_defined_getpagesize_function 1
1364 # endif
1365 # endif
1366 # endif
1367 # endif
1368 /* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */
1369 _GL_CXXALIAS_SYS_CAST (getpagesize, int, (void));
1370 # endif
1371 # if 1
1372 _GL_CXXALIASWARN (getpagesize);
1373 # endif
1374 #elif defined GNULIB_POSIXCHECK
1375 # undef getpagesize
1376 # if HAVE_RAW_DECL_GETPAGESIZE
1377 _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
1378  "use gnulib module getpagesize for portability");
1379 # endif
1380 #endif
1381 
1382 
1383 #if 0
1384 /* Return the next valid login shell on the system, or NULL when the end of
1385  the list has been reached. */
1386 # if !1
1387 _GL_FUNCDECL_SYS (getusershell, char *, (void));
1388 # endif
1389 _GL_CXXALIAS_SYS (getusershell, char *, (void));
1390 _GL_CXXALIASWARN (getusershell);
1391 #elif defined GNULIB_POSIXCHECK
1392 # undef getusershell
1393 # if HAVE_RAW_DECL_GETUSERSHELL
1394 _GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
1395  "use gnulib module getusershell for portability");
1396 # endif
1397 #endif
1398 
1399 #if 0
1400 /* Rewind to pointer that is advanced at each getusershell() call. */
1401 # if !1
1402 _GL_FUNCDECL_SYS (setusershell, void, (void));
1403 # endif
1404 _GL_CXXALIAS_SYS (setusershell, void, (void));
1405 _GL_CXXALIASWARN (setusershell);
1406 #elif defined GNULIB_POSIXCHECK
1407 # undef setusershell
1408 # if HAVE_RAW_DECL_SETUSERSHELL
1409 _GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
1410  "use gnulib module getusershell for portability");
1411 # endif
1412 #endif
1413 
1414 #if 0
1415 /* Free the pointer that is advanced at each getusershell() call and
1416  associated resources. */
1417 # if !1
1418 _GL_FUNCDECL_SYS (endusershell, void, (void));
1419 # endif
1420 _GL_CXXALIAS_SYS (endusershell, void, (void));
1421 _GL_CXXALIASWARN (endusershell);
1422 #elif defined GNULIB_POSIXCHECK
1423 # undef endusershell
1424 # if HAVE_RAW_DECL_ENDUSERSHELL
1425 _GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
1426  "use gnulib module getusershell for portability");
1427 # endif
1428 #endif
1429 
1430 
1431 #if 0
1432 /* Determine whether group id is in calling user's group list. */
1433 # if !1
1434 _GL_FUNCDECL_SYS (group_member, int, (gid_t gid));
1435 # endif
1436 _GL_CXXALIAS_SYS (group_member, int, (gid_t gid));
1437 _GL_CXXALIASWARN (group_member);
1438 #elif defined GNULIB_POSIXCHECK
1439 # undef group_member
1440 # if HAVE_RAW_DECL_GROUP_MEMBER
1441 _GL_WARN_ON_USE (group_member, "group_member is unportable - "
1442  "use gnulib module group-member for portability");
1443 # endif
1444 #endif
1445 
1446 
1447 #if 0
1448 # if 0
1449 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1450 # undef isatty
1451 # define isatty rpl_isatty
1452 # endif
1453 _GL_FUNCDECL_RPL (isatty, int, (int fd));
1454 _GL_CXXALIAS_RPL (isatty, int, (int fd));
1455 # else
1456 _GL_CXXALIAS_SYS (isatty, int, (int fd));
1457 # endif
1458 _GL_CXXALIASWARN (isatty);
1459 #elif defined GNULIB_POSIXCHECK
1460 # undef isatty
1461 # if HAVE_RAW_DECL_ISATTY
1462 _GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - "
1463  "use gnulib module isatty for portability");
1464 # endif
1465 #endif
1466 
1467 
1468 #if 0
1469 /* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
1470  to GID (if GID is not -1). Do not follow symbolic links.
1471  Return 0 if successful, otherwise -1 and errno set.
1472  See the POSIX:2008 specification
1473  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lchown.html>. */
1474 # if 0
1475 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1476 # undef lchown
1477 # define lchown rpl_lchown
1478 # endif
1479 _GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)
1480  _GL_ARG_NONNULL ((1)));
1481 _GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group));
1482 # else
1483 # if !1
1484 _GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)
1485  _GL_ARG_NONNULL ((1)));
1486 # endif
1487 _GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group));
1488 # endif
1489 _GL_CXXALIASWARN (lchown);
1490 #elif defined GNULIB_POSIXCHECK
1491 # undef lchown
1492 # if HAVE_RAW_DECL_LCHOWN
1493 _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
1494  "use gnulib module lchown for portability");
1495 # endif
1496 #endif
1497 
1498 
1499 #if 0
1500 /* Create a new hard link for an existing file.
1501  Return 0 if successful, otherwise -1 and errno set.
1502  See POSIX:2008 specification
1503  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html>. */
1504 # if 0
1505 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1506 # define link rpl_link
1507 # endif
1508 _GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2)
1509  _GL_ARG_NONNULL ((1, 2)));
1510 _GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2));
1511 # else
1512 # if !1
1513 _GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2)
1514  _GL_ARG_NONNULL ((1, 2)));
1515 # endif
1516 _GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2));
1517 # endif
1518 _GL_CXXALIASWARN (link);
1519 #elif defined GNULIB_POSIXCHECK
1520 # undef link
1521 # if HAVE_RAW_DECL_LINK
1522 _GL_WARN_ON_USE (link, "link is unportable - "
1523  "use gnulib module link for portability");
1524 # endif
1525 #endif
1526 
1527 
1528 #if 0
1529 /* Create a new hard link for an existing file, relative to two
1530  directories. FLAG controls whether symlinks are followed.
1531  Return 0 if successful, otherwise -1 and errno set. */
1532 # if 0
1533 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1534 # undef linkat
1535 # define linkat rpl_linkat
1536 # endif
1537 _GL_FUNCDECL_RPL (linkat, int,
1538  (int fd1, const char *path1, int fd2, const char *path2,
1539  int flag)
1540  _GL_ARG_NONNULL ((2, 4)));
1541 _GL_CXXALIAS_RPL (linkat, int,
1542  (int fd1, const char *path1, int fd2, const char *path2,
1543  int flag));
1544 # else
1545 # if !1
1546 _GL_FUNCDECL_SYS (linkat, int,
1547  (int fd1, const char *path1, int fd2, const char *path2,
1548  int flag)
1549  _GL_ARG_NONNULL ((2, 4)));
1550 # endif
1551 _GL_CXXALIAS_SYS (linkat, int,
1552  (int fd1, const char *path1, int fd2, const char *path2,
1553  int flag));
1554 # endif
1555 _GL_CXXALIASWARN (linkat);
1556 #elif defined GNULIB_POSIXCHECK
1557 # undef linkat
1558 # if HAVE_RAW_DECL_LINKAT
1559 _GL_WARN_ON_USE (linkat, "linkat is unportable - "
1560  "use gnulib module linkat for portability");
1561 # endif
1562 #endif
1563 
1564 
1565 #if 1
1566 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
1567  Return the new offset if successful, otherwise -1 and errno set.
1568  See the POSIX:2008 specification
1569  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html>. */
1570 # if 0
1571 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1572 # define lseek rpl_lseek
1573 # endif
1574 _GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1575 _GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence));
1576 # else
1577 _GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence));
1578 # endif
1579 _GL_CXXALIASWARN (lseek);
1580 #elif defined GNULIB_POSIXCHECK
1581 # undef lseek
1582 # if HAVE_RAW_DECL_LSEEK
1583 _GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
1584  "systems - use gnulib module lseek for portability");
1585 # endif
1586 #endif
1587 
1588 
1589 #if 0
1590 /* Create a pipe, defaulting to O_BINARY mode.
1591  Store the read-end as fd[0] and the write-end as fd[1].
1592  Return 0 upon success, or -1 with errno set upon failure. */
1593 # if !1
1594 _GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1)));
1595 # endif
1596 _GL_CXXALIAS_SYS (pipe, int, (int fd[2]));
1597 _GL_CXXALIASWARN (pipe);
1598 #elif defined GNULIB_POSIXCHECK
1599 # undef pipe
1600 # if HAVE_RAW_DECL_PIPE
1601 _GL_WARN_ON_USE (pipe, "pipe is unportable - "
1602  "use gnulib module pipe-posix for portability");
1603 # endif
1604 #endif
1605 
1606 
1607 #if 0
1608 /* Create a pipe, applying the given flags when opening the read-end of the
1609  pipe and the write-end of the pipe.
1610  The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
1611  and O_TEXT, O_BINARY (defined in "binary-io.h").
1612  Store the read-end as fd[0] and the write-end as fd[1].
1613  Return 0 upon success, or -1 with errno set upon failure.
1614  See also the Linux man page at
1615  <https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
1616 # if 1
1617 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1618 # define pipe2 rpl_pipe2
1619 # endif
1620 _GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1621 _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
1622 # else
1623 _GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
1624 _GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
1625 # endif
1626 _GL_CXXALIASWARN (pipe2);
1627 #elif defined GNULIB_POSIXCHECK
1628 # undef pipe2
1629 # if HAVE_RAW_DECL_PIPE2
1630 _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
1631  "use gnulib module pipe2 for portability");
1632 # endif
1633 #endif
1634 
1635 
1636 #if 0
1637 /* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
1638  Return the number of bytes placed into BUF if successful, otherwise
1639  set errno and return -1. 0 indicates EOF.
1640  See the POSIX:2008 specification
1641  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html>. */
1642 # if 0
1643 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1644 # undef pread
1645 # define pread rpl_pread
1646 # endif
1647 _GL_FUNCDECL_RPL (pread, ssize_t,
1648  (int fd, void *buf, size_t bufsize, off_t offset)
1649  _GL_ARG_NONNULL ((2)));
1650 _GL_CXXALIAS_RPL (pread, ssize_t,
1651  (int fd, void *buf, size_t bufsize, off_t offset));
1652 # else
1653 # if !1
1654 _GL_FUNCDECL_SYS (pread, ssize_t,
1655  (int fd, void *buf, size_t bufsize, off_t offset)
1656  _GL_ARG_NONNULL ((2)));
1657 # endif
1658 _GL_CXXALIAS_SYS (pread, ssize_t,
1659  (int fd, void *buf, size_t bufsize, off_t offset));
1660 # endif
1661 _GL_CXXALIASWARN (pread);
1662 #elif defined GNULIB_POSIXCHECK
1663 # undef pread
1664 # if HAVE_RAW_DECL_PREAD
1665 _GL_WARN_ON_USE (pread, "pread is unportable - "
1666  "use gnulib module pread for portability");
1667 # endif
1668 #endif
1669 
1670 
1671 #if 0
1672 /* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
1673  Return the number of bytes written if successful, otherwise
1674  set errno and return -1. 0 indicates nothing written. See the
1675  POSIX:2008 specification
1676  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/pwrite.html>. */
1677 # if 0
1678 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1679 # undef pwrite
1680 # define pwrite rpl_pwrite
1681 # endif
1682 _GL_FUNCDECL_RPL (pwrite, ssize_t,
1683  (int fd, const void *buf, size_t bufsize, off_t offset)
1684  _GL_ARG_NONNULL ((2)));
1685 _GL_CXXALIAS_RPL (pwrite, ssize_t,
1686  (int fd, const void *buf, size_t bufsize, off_t offset));
1687 # else
1688 # if !1
1689 _GL_FUNCDECL_SYS (pwrite, ssize_t,
1690  (int fd, const void *buf, size_t bufsize, off_t offset)
1691  _GL_ARG_NONNULL ((2)));
1692 # endif
1693 _GL_CXXALIAS_SYS (pwrite, ssize_t,
1694  (int fd, const void *buf, size_t bufsize, off_t offset));
1695 # endif
1696 _GL_CXXALIASWARN (pwrite);
1697 #elif defined GNULIB_POSIXCHECK
1698 # undef pwrite
1699 # if HAVE_RAW_DECL_PWRITE
1700 _GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
1701  "use gnulib module pwrite for portability");
1702 # endif
1703 #endif
1704 
1705 
1706 #if 0
1707 /* Read up to COUNT bytes from file descriptor FD into the buffer starting
1708  at BUF. See the POSIX:2008 specification
1709  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html>. */
1710 # if 0
1711 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1712 # undef read
1713 # define read rpl_read
1714 # endif
1715 _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count)
1716  _GL_ARG_NONNULL ((2)));
1717 _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count));
1718 # else
1719 /* Need to cast, because on mingw, the third parameter is
1720  unsigned int count
1721  and the return type is 'int'. */
1722 _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count));
1723 # endif
1724 _GL_CXXALIASWARN (read);
1725 #endif
1726 
1727 
1728 #if 0
1729 /* Read the contents of the symbolic link FILE and place the first BUFSIZE
1730  bytes of it into BUF. Return the number of bytes placed into BUF if
1731  successful, otherwise -1 and errno set.
1732  See the POSIX:2008 specification
1733  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/readlink.html>. */
1734 # if 0
1735 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1736 # define readlink rpl_readlink
1737 # endif
1738 _GL_FUNCDECL_RPL (readlink, ssize_t,
1739  (const char *file, char *buf, size_t bufsize)
1740  _GL_ARG_NONNULL ((1, 2)));
1741 _GL_CXXALIAS_RPL (readlink, ssize_t,
1742  (const char *file, char *buf, size_t bufsize));
1743 # else
1744 # if !1
1745 _GL_FUNCDECL_SYS (readlink, ssize_t,
1746  (const char *file, char *buf, size_t bufsize)
1747  _GL_ARG_NONNULL ((1, 2)));
1748 # endif
1749 _GL_CXXALIAS_SYS (readlink, ssize_t,
1750  (const char *file, char *buf, size_t bufsize));
1751 # endif
1752 _GL_CXXALIASWARN (readlink);
1753 #elif defined GNULIB_POSIXCHECK
1754 # undef readlink
1755 # if HAVE_RAW_DECL_READLINK
1756 _GL_WARN_ON_USE (readlink, "readlink is unportable - "
1757  "use gnulib module readlink for portability");
1758 # endif
1759 #endif
1760 
1761 
1762 #if 0
1763 # if 0
1764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1765 # define readlinkat rpl_readlinkat
1766 # endif
1767 _GL_FUNCDECL_RPL (readlinkat, ssize_t,
1768  (int fd, char const *file, char *buf, size_t len)
1769  _GL_ARG_NONNULL ((2, 3)));
1770 _GL_CXXALIAS_RPL (readlinkat, ssize_t,
1771  (int fd, char const *file, char *buf, size_t len));
1772 # else
1773 # if !1
1774 _GL_FUNCDECL_SYS (readlinkat, ssize_t,
1775  (int fd, char const *file, char *buf, size_t len)
1776  _GL_ARG_NONNULL ((2, 3)));
1777 # endif
1778 _GL_CXXALIAS_SYS (readlinkat, ssize_t,
1779  (int fd, char const *file, char *buf, size_t len));
1780 # endif
1781 _GL_CXXALIASWARN (readlinkat);
1782 #elif defined GNULIB_POSIXCHECK
1783 # undef readlinkat
1784 # if HAVE_RAW_DECL_READLINKAT
1785 _GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
1786  "use gnulib module readlinkat for portability");
1787 # endif
1788 #endif
1789 
1790 
1791 #if 0
1792 /* Remove the directory DIR. */
1793 # if 0
1794 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1795 # define rmdir rpl_rmdir
1796 # endif
1797 _GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1)));
1798 _GL_CXXALIAS_RPL (rmdir, int, (char const *name));
1799 # else
1800 _GL_CXXALIAS_SYS (rmdir, int, (char const *name));
1801 # endif
1802 _GL_CXXALIASWARN (rmdir);
1803 #elif defined GNULIB_POSIXCHECK
1804 # undef rmdir
1805 # if HAVE_RAW_DECL_RMDIR
1806 _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
1807  "use gnulib module rmdir for portability");
1808 # endif
1809 #endif
1810 
1811 
1812 #if 0
1813 /* Set the host name of the machine.
1814  The host name may or may not be fully qualified.
1815 
1816  Put LEN bytes of NAME into the host name.
1817  Return 0 if successful, otherwise, set errno and return -1.
1818 
1819  Platforms with no ability to set the hostname return -1 and set
1820  errno = ENOSYS. */
1821 # if !1 || !1
1822 _GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
1823  _GL_ARG_NONNULL ((1)));
1824 # endif
1825 /* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
1826  and FreeBSD 6.4 the second parameter is int. On Solaris 11
1827  2011-10, the first parameter is not const. */
1828 _GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
1829 _GL_CXXALIASWARN (sethostname);
1830 #elif defined GNULIB_POSIXCHECK
1831 # undef sethostname
1832 # if HAVE_RAW_DECL_SETHOSTNAME
1833 _GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
1834  "use gnulib module sethostname for portability");
1835 # endif
1836 #endif
1837 
1838 
1839 #if 0
1840 /* Pause the execution of the current thread for N seconds.
1841  Returns the number of seconds left to sleep.
1842  See the POSIX:2008 specification
1843  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sleep.html>. */
1844 # if 0
1845 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1846 # undef sleep
1847 # define sleep rpl_sleep
1848 # endif
1849 _GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n));
1850 _GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n));
1851 # else
1852 # if !1
1853 _GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n));
1854 # endif
1855 _GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n));
1856 # endif
1857 _GL_CXXALIASWARN (sleep);
1858 #elif defined GNULIB_POSIXCHECK
1859 # undef sleep
1860 # if HAVE_RAW_DECL_SLEEP
1861 _GL_WARN_ON_USE (sleep, "sleep is unportable - "
1862  "use gnulib module sleep for portability");
1863 # endif
1864 #endif
1865 
1866 
1867 #if 0
1868 # if 0
1869 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1870 # undef symlink
1871 # define symlink rpl_symlink
1872 # endif
1873 _GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file)
1874  _GL_ARG_NONNULL ((1, 2)));
1875 _GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file));
1876 # else
1877 # if !1
1878 _GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file)
1879  _GL_ARG_NONNULL ((1, 2)));
1880 # endif
1881 _GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file));
1882 # endif
1883 _GL_CXXALIASWARN (symlink);
1884 #elif defined GNULIB_POSIXCHECK
1885 # undef symlink
1886 # if HAVE_RAW_DECL_SYMLINK
1887 _GL_WARN_ON_USE (symlink, "symlink is not portable - "
1888  "use gnulib module symlink for portability");
1889 # endif
1890 #endif
1891 
1892 
1893 #if 0
1894 # if 0
1895 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1896 # undef symlinkat
1897 # define symlinkat rpl_symlinkat
1898 # endif
1899 _GL_FUNCDECL_RPL (symlinkat, int,
1900  (char const *contents, int fd, char const *file)
1901  _GL_ARG_NONNULL ((1, 3)));
1902 _GL_CXXALIAS_RPL (symlinkat, int,
1903  (char const *contents, int fd, char const *file));
1904 # else
1905 # if !1
1906 _GL_FUNCDECL_SYS (symlinkat, int,
1907  (char const *contents, int fd, char const *file)
1908  _GL_ARG_NONNULL ((1, 3)));
1909 # endif
1910 _GL_CXXALIAS_SYS (symlinkat, int,
1911  (char const *contents, int fd, char const *file));
1912 # endif
1913 _GL_CXXALIASWARN (symlinkat);
1914 #elif defined GNULIB_POSIXCHECK
1915 # undef symlinkat
1916 # if HAVE_RAW_DECL_SYMLINKAT
1917 _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
1918  "use gnulib module symlinkat for portability");
1919 # endif
1920 #endif
1921 
1922 
1923 #if 0
1924 /* Change the size of the file designated by FILENAME to become equal to LENGTH.
1925  Return 0 if successful, otherwise -1 and errno set.
1926  See the POSIX:2008 specification
1927  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html>. */
1928 # if 0
1929 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1930 # undef truncate
1931 # define truncate rpl_truncate
1932 # endif
1933 _GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length)
1934  _GL_ARG_NONNULL ((1)));
1935 _GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length));
1936 # else
1937 # if !1
1938 _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
1939  _GL_ARG_NONNULL ((1)));
1940 # endif
1941 _GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
1942 # endif
1943 _GL_CXXALIASWARN (truncate);
1944 #elif defined GNULIB_POSIXCHECK
1945 # undef truncate
1946 # if HAVE_RAW_DECL_TRUNCATE
1947 _GL_WARN_ON_USE (truncate, "truncate is unportable - "
1948  "use gnulib module truncate for portability");
1949 # endif
1950 #endif
1951 
1952 
1953 #if 0
1954 /* Store at most BUFLEN characters of the pathname of the terminal FD is
1955  open on in BUF. Return 0 on success, otherwise an error number. */
1956 # if 0
1957 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1958 # undef ttyname_r
1959 # define ttyname_r rpl_ttyname_r
1960 # endif
1961 _GL_FUNCDECL_RPL (ttyname_r, int,
1962  (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1963 _GL_CXXALIAS_RPL (ttyname_r, int,
1964  (int fd, char *buf, size_t buflen));
1965 # else
1966 # if !1
1967 _GL_FUNCDECL_SYS (ttyname_r, int,
1968  (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
1969 # endif
1970 _GL_CXXALIAS_SYS (ttyname_r, int,
1971  (int fd, char *buf, size_t buflen));
1972 # endif
1973 _GL_CXXALIASWARN (ttyname_r);
1974 #elif defined GNULIB_POSIXCHECK
1975 # undef ttyname_r
1976 # if HAVE_RAW_DECL_TTYNAME_R
1977 _GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - "
1978  "use gnulib module ttyname_r for portability");
1979 # endif
1980 #endif
1981 
1982 
1983 #if 0
1984 # if 0
1985 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1986 # undef unlink
1987 # define unlink rpl_unlink
1988 # endif
1989 _GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1)));
1990 _GL_CXXALIAS_RPL (unlink, int, (char const *file));
1991 # else
1992 _GL_CXXALIAS_SYS (unlink, int, (char const *file));
1993 # endif
1994 _GL_CXXALIASWARN (unlink);
1995 #elif defined GNULIB_POSIXCHECK
1996 # undef unlink
1997 # if HAVE_RAW_DECL_UNLINK
1998 _GL_WARN_ON_USE (unlink, "unlink is not portable - "
1999  "use gnulib module unlink for portability");
2000 # endif
2001 #endif
2002 
2003 
2004 #if 0
2005 # if 0
2006 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2007 # undef unlinkat
2008 # define unlinkat rpl_unlinkat
2009 # endif
2010 _GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag)
2011  _GL_ARG_NONNULL ((2)));
2012 _GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag));
2013 # else
2014 # if !1
2015 _GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag)
2016  _GL_ARG_NONNULL ((2)));
2017 # endif
2018 _GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag));
2019 # endif
2020 _GL_CXXALIASWARN (unlinkat);
2021 #elif defined GNULIB_POSIXCHECK
2022 # undef unlinkat
2023 # if HAVE_RAW_DECL_UNLINKAT
2024 _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
2025  "use gnulib module openat for portability");
2026 # endif
2027 #endif
2028 
2029 
2030 #if 0
2031 /* Pause the execution of the current thread for N microseconds.
2032  Returns 0 on completion, or -1 on range error.
2033  See the POSIX:2001 specification
2034  <http://www.opengroup.org/susv3xsh/usleep.html>. */
2035 # if 0
2036 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2037 # undef usleep
2038 # define usleep rpl_usleep
2039 # endif
2040 _GL_FUNCDECL_RPL (usleep, int, (useconds_t n));
2041 _GL_CXXALIAS_RPL (usleep, int, (useconds_t n));
2042 # else
2043 # if !1
2044 _GL_FUNCDECL_SYS (usleep, int, (useconds_t n));
2045 # endif
2046 _GL_CXXALIAS_SYS (usleep, int, (useconds_t n));
2047 # endif
2048 _GL_CXXALIASWARN (usleep);
2049 #elif defined GNULIB_POSIXCHECK
2050 # undef usleep
2051 # if HAVE_RAW_DECL_USLEEP
2052 _GL_WARN_ON_USE (usleep, "usleep is unportable - "
2053  "use gnulib module usleep for portability");
2054 # endif
2055 #endif
2056 
2057 
2058 #if 0
2059 /* Write up to COUNT bytes starting at BUF to file descriptor FD.
2060  See the POSIX:2008 specification
2061  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html>. */
2062 # if 0
2063 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
2064 # undef write
2065 # define write rpl_write
2066 # endif
2067 _GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count)
2068  _GL_ARG_NONNULL ((2)));
2069 _GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count));
2070 # else
2071 /* Need to cast, because on mingw, the third parameter is
2072  unsigned int count
2073  and the return type is 'int'. */
2074 _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
2075 # endif
2076 _GL_CXXALIASWARN (write);
2077 #endif
2078 
2080 
2081 #endif /* _GL_UNISTD_H */
2082 #endif /* _GL_INCLUDING_UNISTD_H */
2083 #endif /* _GL_UNISTD_H */
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: inet.h:278
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: inet.h:168
#define _GL_UNISTD_INLINE
Definition: unistd.h:600
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: inet.h:180
_GL_ARG_NONNULL((1)))
_GL_CXXALIASWARN(close)
#define _GL_EXTERN_C
Definition: inet.h:146
#define _GL_INLINE_HEADER_BEGIN
Definition: config.h:1817
_GL_CXXALIAS_SYS(close, int,(int fd))
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: inet.h:156
#define _GL_INLINE_HEADER_END
Definition: config.h:1818
#define _GL_WARN_ON_USE(function, message)
Definition: inet.h:474