dhcpd-pools  3.0
ISC dhcpd lease usage analyser
stdio.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A GNU-like <stdio.h>.
3 
4  Copyright (C) 2004, 2007-2017 Free Software Foundation, Inc.
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 3, or (at your option)
9  any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, see <https://www.gnu.org/licenses/>. */
18 
19 #if __GNUC__ >= 3
20 #pragma GCC system_header
21 #endif
22 
23 
24 #if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
25 /* Special invocation convention:
26  - Inside glibc header files.
27  - On OSF/1 5.1 we have a sequence of nested includes
28  <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
29  <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
30  In this situation, the functions are not yet declared, therefore we cannot
31  provide the C++ aliases. */
32 
33 #include_next <stdio.h>
34 
35 #else
36 /* Normal invocation convention. */
37 
38 #ifndef _GL_STDIO_H
39 
40 #define _GL_ALREADY_INCLUDING_STDIO_H
41 
42 /* The include_next requires a split double-inclusion guard. */
43 #include_next <stdio.h>
44 
45 #undef _GL_ALREADY_INCLUDING_STDIO_H
46 
47 #ifndef _GL_STDIO_H
48 #define _GL_STDIO_H
49 
50 /* Get va_list. Needed on many systems, including glibc 2.8. */
51 #include <stdarg.h>
52 
53 #include <stddef.h>
54 
55 /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8
56  and eglibc 2.11.2.
57  May also define off_t to a 64-bit type on native Windows. */
58 #include <sys/types.h>
59 
60 /* The __attribute__ feature is available in gcc versions 2.5 and later.
61  The __-protected variants of the attributes 'format' and 'printf' are
62  accepted by gcc versions 2.6.4 (effectively 2.7) and later.
63  We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
64  gnulib and libintl do '#define printf __printf__' when they override
65  the 'printf' function. */
66 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
67 # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
68 #else
69 # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
70 #endif
71 
72 /* _GL_ATTRIBUTE_FORMAT_PRINTF
73  indicates to GCC that the function takes a format string and arguments,
74  where the format string directives are the ones standardized by ISO C99
75  and POSIX. */
76 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
77 # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
78  _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument))
79 #else
80 # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \
81  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
82 #endif
83 
84 /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF,
85  except that it indicates to GCC that the supported format string directives
86  are the ones of the system printf(), rather than the ones standardized by
87  ISO C99 and POSIX. */
88 #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
89 # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
90  _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument)
91 #else
92 # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \
93  _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument))
94 #endif
95 
96 /* _GL_ATTRIBUTE_FORMAT_SCANF
97  indicates to GCC that the function takes a format string and arguments,
98  where the format string directives are the ones standardized by ISO C99
99  and POSIX. */
100 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
101 # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
102  _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument))
103 #else
104 # define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \
105  _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
106 #endif
107 
108 /* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF,
109  except that it indicates to GCC that the supported format string directives
110  are the ones of the system scanf(), rather than the ones standardized by
111  ISO C99 and POSIX. */
112 #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \
113  _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument))
114 
115 /* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>. */
116 /* But in any case avoid namespace pollution on glibc systems. */
117 #if (0 || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \
118  && ! defined __GLIBC__
119 # include <unistd.h>
120 #endif
121 
122 /* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
123  it before we #define perror rpl_perror. */
124 /* But in any case avoid namespace pollution on glibc systems. */
125 #if (0 || defined GNULIB_POSIXCHECK) \
126  && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
127  && ! defined __GLIBC__
128 # include <stdlib.h>
129 #endif
130 
131 /* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include
132  it before we #define remove rpl_remove. */
133 /* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include
134  it before we #define rename rpl_rename. */
135 /* But in any case avoid namespace pollution on glibc systems. */
136 #if (0 || 0 || defined GNULIB_POSIXCHECK) \
137  && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
138  && ! defined __GLIBC__
139 # include <io.h>
140 #endif
141 
142 
143 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
144 /* C++ compatible function declaration macros.
145  Copyright (C) 2010-2017 Free Software Foundation, Inc.
146 
147  This program is free software: you can redistribute it and/or modify it
148  under the terms of the GNU General Public License as published
149  by the Free Software Foundation; either version 3 of the License, or
150  (at your option) any later version.
151 
152  This program is distributed in the hope that it will be useful,
153  but WITHOUT ANY WARRANTY; without even the implied warranty of
154  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
155  General Public License for more details.
156 
157  You should have received a copy of the GNU General Public License
158  along with this program. If not, see <https://www.gnu.org/licenses/>. */
159 
160 #ifndef _GL_CXXDEFS_H
161 #define _GL_CXXDEFS_H
162 
163 /* Begin/end the GNULIB_NAMESPACE namespace. */
164 #if defined __cplusplus && defined GNULIB_NAMESPACE
165 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
166 # define _GL_END_NAMESPACE }
167 #else
168 # define _GL_BEGIN_NAMESPACE
169 # define _GL_END_NAMESPACE
170 #endif
171 
172 /* The three most frequent use cases of these macros are:
173 
174  * For providing a substitute for a function that is missing on some
175  platforms, but is declared and works fine on the platforms on which
176  it exists:
177 
178  #if @GNULIB_FOO@
179  # if !@HAVE_FOO@
180  _GL_FUNCDECL_SYS (foo, ...);
181  # endif
182  _GL_CXXALIAS_SYS (foo, ...);
183  _GL_CXXALIASWARN (foo);
184  #elif defined GNULIB_POSIXCHECK
185  ...
186  #endif
187 
188  * For providing a replacement for a function that exists on all platforms,
189  but is broken/insufficient and needs to be replaced on some platforms:
190 
191  #if @GNULIB_FOO@
192  # if @REPLACE_FOO@
193  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
194  # undef foo
195  # define foo rpl_foo
196  # endif
197  _GL_FUNCDECL_RPL (foo, ...);
198  _GL_CXXALIAS_RPL (foo, ...);
199  # else
200  _GL_CXXALIAS_SYS (foo, ...);
201  # endif
202  _GL_CXXALIASWARN (foo);
203  #elif defined GNULIB_POSIXCHECK
204  ...
205  #endif
206 
207  * For providing a replacement for a function that exists on some platforms
208  but is broken/insufficient and needs to be replaced on some of them and
209  is additionally either missing or undeclared on some other platforms:
210 
211  #if @GNULIB_FOO@
212  # if @REPLACE_FOO@
213  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
214  # undef foo
215  # define foo rpl_foo
216  # endif
217  _GL_FUNCDECL_RPL (foo, ...);
218  _GL_CXXALIAS_RPL (foo, ...);
219  # else
220  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
221  _GL_FUNCDECL_SYS (foo, ...);
222  # endif
223  _GL_CXXALIAS_SYS (foo, ...);
224  # endif
225  _GL_CXXALIASWARN (foo);
226  #elif defined GNULIB_POSIXCHECK
227  ...
228  #endif
229 */
230 
231 /* _GL_EXTERN_C declaration;
232  performs the declaration with C linkage. */
233 #if defined __cplusplus
234 # define _GL_EXTERN_C extern "C"
235 #else
236 # define _GL_EXTERN_C extern
237 #endif
238 
239 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
240  declares a replacement function, named rpl_func, with the given prototype,
241  consisting of return type, parameters, and attributes.
242  Example:
243  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
244  _GL_ARG_NONNULL ((1)));
245  */
246 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
247  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
248 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
249  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
250 
251 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
252  declares the system function, named func, with the given prototype,
253  consisting of return type, parameters, and attributes.
254  Example:
255  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
256  _GL_ARG_NONNULL ((1)));
257  */
258 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
259  _GL_EXTERN_C rettype func parameters_and_attributes
260 
261 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
262  declares a C++ alias called GNULIB_NAMESPACE::func
263  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
264  Example:
265  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
266 
267  Wrapping rpl_func in an object with an inline conversion operator
268  avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
269  actually used in the program. */
270 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
271  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
272 #if defined __cplusplus && defined GNULIB_NAMESPACE
273 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
274  namespace GNULIB_NAMESPACE \
275  { \
276  static const struct _gl_ ## func ## _wrapper \
277  { \
278  typedef rettype (*type) parameters; \
279  \
280  inline operator type () const \
281  { \
282  return ::rpl_func; \
283  } \
284  } func = {}; \
285  } \
286  _GL_EXTERN_C int _gl_cxxalias_dummy
287 #else
288 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
289  _GL_EXTERN_C int _gl_cxxalias_dummy
290 #endif
291 
292 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
293  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
294  except that the C function rpl_func may have a slightly different
295  declaration. A cast is used to silence the "invalid conversion" error
296  that would otherwise occur. */
297 #if defined __cplusplus && defined GNULIB_NAMESPACE
298 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
299  namespace GNULIB_NAMESPACE \
300  { \
301  static const struct _gl_ ## func ## _wrapper \
302  { \
303  typedef rettype (*type) parameters; \
304  \
305  inline operator type () const \
306  { \
307  return reinterpret_cast<type>(::rpl_func); \
308  } \
309  } func = {}; \
310  } \
311  _GL_EXTERN_C int _gl_cxxalias_dummy
312 #else
313 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
314  _GL_EXTERN_C int _gl_cxxalias_dummy
315 #endif
316 
317 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
318  declares a C++ alias called GNULIB_NAMESPACE::func
319  that redirects to the system provided function func, if GNULIB_NAMESPACE
320  is defined.
321  Example:
322  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
323 
324  Wrapping func in an object with an inline conversion operator
325  avoids a reference to func unless GNULIB_NAMESPACE::func is
326  actually used in the program. */
327 #if defined __cplusplus && defined GNULIB_NAMESPACE
328 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
329  namespace GNULIB_NAMESPACE \
330  { \
331  static const struct _gl_ ## func ## _wrapper \
332  { \
333  typedef rettype (*type) parameters; \
334  \
335  inline operator type () const \
336  { \
337  return ::func; \
338  } \
339  } func = {}; \
340  } \
341  _GL_EXTERN_C int _gl_cxxalias_dummy
342 #else
343 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
344  _GL_EXTERN_C int _gl_cxxalias_dummy
345 #endif
346 
347 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
348  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
349  except that the C function func may have a slightly different declaration.
350  A cast is used to silence the "invalid conversion" error that would
351  otherwise occur. */
352 #if defined __cplusplus && defined GNULIB_NAMESPACE
353 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
354  namespace GNULIB_NAMESPACE \
355  { \
356  static const struct _gl_ ## func ## _wrapper \
357  { \
358  typedef rettype (*type) parameters; \
359  \
360  inline operator type () const \
361  { \
362  return reinterpret_cast<type>(::func); \
363  } \
364  } func = {}; \
365  } \
366  _GL_EXTERN_C int _gl_cxxalias_dummy
367 #else
368 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
369  _GL_EXTERN_C int _gl_cxxalias_dummy
370 #endif
371 
372 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
373  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
374  except that the C function is picked among a set of overloaded functions,
375  namely the one with rettype2 and parameters2. Two consecutive casts
376  are used to silence the "cannot find a match" and "invalid conversion"
377  errors that would otherwise occur. */
378 #if defined __cplusplus && defined GNULIB_NAMESPACE
379  /* The outer cast must be a reinterpret_cast.
380  The inner cast: When the function is defined as a set of overloaded
381  functions, it works as a static_cast<>, choosing the designated variant.
382  When the function is defined as a single variant, it works as a
383  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
384 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
385  namespace GNULIB_NAMESPACE \
386  { \
387  static const struct _gl_ ## func ## _wrapper \
388  { \
389  typedef rettype (*type) parameters; \
390  \
391  inline operator type () const \
392  { \
393  return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
394  } \
395  } func = {}; \
396  } \
397  _GL_EXTERN_C int _gl_cxxalias_dummy
398 #else
399 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
400  _GL_EXTERN_C int _gl_cxxalias_dummy
401 #endif
402 
403 /* _GL_CXXALIASWARN (func);
404  causes a warning to be emitted when ::func is used but not when
405  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
406  variants. */
407 #if defined __cplusplus && defined GNULIB_NAMESPACE
408 # define _GL_CXXALIASWARN(func) \
409  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
410 # define _GL_CXXALIASWARN_1(func,namespace) \
411  _GL_CXXALIASWARN_2 (func, namespace)
412 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
413  we enable the warning only when not optimizing. */
414 # if !__OPTIMIZE__
415 # define _GL_CXXALIASWARN_2(func,namespace) \
416  _GL_WARN_ON_USE (func, \
417  "The symbol ::" #func " refers to the system function. " \
418  "Use " #namespace "::" #func " instead.")
419 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
420 # define _GL_CXXALIASWARN_2(func,namespace) \
421  extern __typeof__ (func) func
422 # else
423 # define _GL_CXXALIASWARN_2(func,namespace) \
424  _GL_EXTERN_C int _gl_cxxalias_dummy
425 # endif
426 #else
427 # define _GL_CXXALIASWARN(func) \
428  _GL_EXTERN_C int _gl_cxxalias_dummy
429 #endif
430 
431 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
432  causes a warning to be emitted when the given overloaded variant of ::func
433  is used but not when GNULIB_NAMESPACE::func is used. */
434 #if defined __cplusplus && defined GNULIB_NAMESPACE
435 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
436  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
437  GNULIB_NAMESPACE)
438 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
439  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
440 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
441  we enable the warning only when not optimizing. */
442 # if !__OPTIMIZE__
443 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
444  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
445  "The symbol ::" #func " refers to the system function. " \
446  "Use " #namespace "::" #func " instead.")
447 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
448 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
449  extern __typeof__ (func) func
450 # else
451 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
452  _GL_EXTERN_C int _gl_cxxalias_dummy
453 # endif
454 #else
455 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
456  _GL_EXTERN_C int _gl_cxxalias_dummy
457 #endif
458 
459 #endif /* _GL_CXXDEFS_H */
460 
461 /* The definition of _GL_ARG_NONNULL is copied here. */
462 /* A C macro for declaring that specific arguments must not be NULL.
463  Copyright (C) 2009-2017 Free Software Foundation, Inc.
464 
465  This program is free software: you can redistribute it and/or modify it
466  under the terms of the GNU General Public License as published
467  by the Free Software Foundation; either version 3 of the License, or
468  (at your option) any later version.
469 
470  This program is distributed in the hope that it will be useful,
471  but WITHOUT ANY WARRANTY; without even the implied warranty of
472  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
473  General Public License for more details.
474 
475  You should have received a copy of the GNU General Public License
476  along with this program. If not, see <https://www.gnu.org/licenses/>. */
477 
478 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
479  that the values passed as arguments n, ..., m must be non-NULL pointers.
480  n = 1 stands for the first argument, n = 2 for the second argument etc. */
481 #ifndef _GL_ARG_NONNULL
482 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
483 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
484 # else
485 # define _GL_ARG_NONNULL(params)
486 # endif
487 #endif
488 
489 /* The definition of _GL_WARN_ON_USE is copied here. */
490 /* A C macro for emitting warnings if a function is used.
491  Copyright (C) 2010-2017 Free Software Foundation, Inc.
492 
493  This program is free software: you can redistribute it and/or modify it
494  under the terms of the GNU General Public License as published
495  by the Free Software Foundation; either version 3 of the License, or
496  (at your option) any later version.
497 
498  This program is distributed in the hope that it will be useful,
499  but WITHOUT ANY WARRANTY; without even the implied warranty of
500  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
501  General Public License for more details.
502 
503  You should have received a copy of the GNU General Public License
504  along with this program. If not, see <https://www.gnu.org/licenses/>. */
505 
506 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
507  for FUNCTION which will then trigger a compiler warning containing
508  the text of "literal string" anywhere that function is called, if
509  supported by the compiler. If the compiler does not support this
510  feature, the macro expands to an unused extern declaration.
511 
512  This macro is useful for marking a function as a potential
513  portability trap, with the intent that "literal string" include
514  instructions on the replacement function that should be used
515  instead. However, one of the reasons that a function is a
516  portability trap is if it has the wrong signature. Declaring
517  FUNCTION with a different signature in C is a compilation error, so
518  this macro must use the same type as any existing declaration so
519  that programs that avoid the problematic FUNCTION do not fail to
520  compile merely because they included a header that poisoned the
521  function. But this implies that _GL_WARN_ON_USE is only safe to
522  use if FUNCTION is known to already have a declaration. Use of
523  this macro implies that there must not be any other macro hiding
524  the declaration of FUNCTION; but undefining FUNCTION first is part
525  of the poisoning process anyway (although for symbols that are
526  provided only via a macro, the result is a compilation error rather
527  than a warning containing "literal string"). Also note that in
528  C++, it is only safe to use if FUNCTION has no overloads.
529 
530  For an example, it is possible to poison 'getline' by:
531  - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
532  [getline]) in configure.ac, which potentially defines
533  HAVE_RAW_DECL_GETLINE
534  - adding this code to a header that wraps the system <stdio.h>:
535  #undef getline
536  #if HAVE_RAW_DECL_GETLINE
537  _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
538  "not universally present; use the gnulib module getline");
539  #endif
540 
541  It is not possible to directly poison global variables. But it is
542  possible to write a wrapper accessor function, and poison that
543  (less common usage, like &environ, will cause a compilation error
544  rather than issue the nice warning, but the end result of informing
545  the developer about their portability problem is still achieved):
546  #if HAVE_RAW_DECL_ENVIRON
547  static char ***rpl_environ (void) { return &environ; }
548  _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
549  # undef environ
550  # define environ (*rpl_environ ())
551  #endif
552  */
553 #ifndef _GL_WARN_ON_USE
554 
555 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
556 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
557 # define _GL_WARN_ON_USE(function, message) \
558 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
559 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
560 /* Verify the existence of the function. */
561 # define _GL_WARN_ON_USE(function, message) \
562 extern __typeof__ (function) function
563 # else /* Unsupported. */
564 # define _GL_WARN_ON_USE(function, message) \
565 _GL_WARN_EXTERN_C int _gl_warn_on_use
566 # endif
567 #endif
568 
569 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
570  is like _GL_WARN_ON_USE (function, "string"), except that the function is
571  declared with the given prototype, consisting of return type, parameters,
572  and attributes.
573  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
574  not work in this case. */
575 #ifndef _GL_WARN_ON_USE_CXX
576 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
577 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
578 extern rettype function parameters_and_attributes \
579  __attribute__ ((__warning__ (msg)))
580 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
581 /* Verify the existence of the function. */
582 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
583 extern rettype function parameters_and_attributes
584 # else /* Unsupported. */
585 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
586 _GL_WARN_EXTERN_C int _gl_warn_on_use
587 # endif
588 #endif
589 
590 /* _GL_WARN_EXTERN_C declaration;
591  performs the declaration with C linkage. */
592 #ifndef _GL_WARN_EXTERN_C
593 # if defined __cplusplus
594 # define _GL_WARN_EXTERN_C extern "C"
595 # else
596 # define _GL_WARN_EXTERN_C extern
597 # endif
598 #endif
599 
600 /* Macros for stringification. */
601 #define _GL_STDIO_STRINGIZE(token) #token
602 #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
603 
604 /* When also using extern inline, suppress the use of static inline in
605  standard headers of problematic Apple configurations, as Libc at
606  least through Libc-825.26 (2013-04-09) mishandles it; see, e.g.,
607  <https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html>.
608  Perhaps Apple will fix this some day. */
609 #if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \
610  && defined __GNUC__ && defined __STDC__)
611 # undef putc_unlocked
612 #endif
613 
614 #if 0
615 # if 0
616 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
617 # define dprintf rpl_dprintf
618 # endif
619 _GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...)
621  _GL_ARG_NONNULL ((2)));
622 _GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...));
623 # else
624 # if !1
625 _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...)
627  _GL_ARG_NONNULL ((2)));
628 # endif
629 _GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...));
630 # endif
631 _GL_CXXALIASWARN (dprintf);
632 #elif defined GNULIB_POSIXCHECK
633 # undef dprintf
634 # if HAVE_RAW_DECL_DPRINTF
635 _GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
636  "use gnulib module dprintf for portability");
637 # endif
638 #endif
639 
640 #if 1
641 /* Close STREAM and its underlying file descriptor. */
642 # if 1
643 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
644 # define fclose rpl_fclose
645 # endif
646 _GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
647 _GL_CXXALIAS_RPL (fclose, int, (FILE *stream));
648 # else
649 _GL_CXXALIAS_SYS (fclose, int, (FILE *stream));
650 # endif
652 #elif defined GNULIB_POSIXCHECK
653 # undef fclose
654 /* Assume fclose is always declared. */
655 _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
656  "use gnulib module fclose for portable POSIX compliance");
657 #endif
658 
659 #if 1
660 # if 0
661 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
662 # undef fdopen
663 # define fdopen rpl_fdopen
664 # endif
665 _GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
666  _GL_ARG_NONNULL ((2)));
667 _GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
668 # else
669 _GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
670 # endif
671 _GL_CXXALIASWARN (fdopen);
672 #elif defined GNULIB_POSIXCHECK
673 # undef fdopen
674 /* Assume fdopen is always declared. */
675 _GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
676  "use gnulib module fdopen for portability");
677 #endif
678 
679 #if 1
680 /* Flush all pending data on STREAM according to POSIX rules. Both
681  output and seekable input streams are supported.
682  Note! LOSS OF DATA can occur if fflush is applied on an input stream
683  that is _not_seekable_ or on an update stream that is _not_seekable_
684  and in which the most recent operation was input. Seekability can
685  be tested with lseek(fileno(fp),0,SEEK_CUR). */
686 # if 1
687 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
688 # define fflush rpl_fflush
689 # endif
690 _GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream));
691 _GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream));
692 # else
693 _GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream));
694 # endif
696 #elif defined GNULIB_POSIXCHECK
697 # undef fflush
698 /* Assume fflush is always declared. */
699 _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
700  "use gnulib module fflush for portable POSIX compliance");
701 #endif
702 
703 #if 1
704 # if 0 && 0
705 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
706 # undef fgetc
707 # define fgetc rpl_fgetc
708 # endif
709 _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
710 _GL_CXXALIAS_RPL (fgetc, int, (FILE *stream));
711 # else
712 _GL_CXXALIAS_SYS (fgetc, int, (FILE *stream));
713 # endif
714 _GL_CXXALIASWARN (fgetc);
715 #endif
716 
717 #if 1
718 # if 0 && 0
719 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
720 # undef fgets
721 # define fgets rpl_fgets
722 # endif
723 _GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream)
724  _GL_ARG_NONNULL ((1, 3)));
725 _GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream));
726 # else
727 _GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream));
728 # endif
729 _GL_CXXALIASWARN (fgets);
730 #endif
731 
732 #if 1
733 # if 0
734 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
735 # undef fopen
736 # define fopen rpl_fopen
737 # endif
738 _GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode)
739  _GL_ARG_NONNULL ((1, 2)));
740 _GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode));
741 # else
742 _GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode));
743 # endif
744 _GL_CXXALIASWARN (fopen);
745 #elif defined GNULIB_POSIXCHECK
746 # undef fopen
747 /* Assume fopen is always declared. */
748 _GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - "
749  "use gnulib module fopen for portability");
750 #endif
751 
752 #if 0 || 1
753 # if (0 && 0) \
754  || (1 && 0 && (0 || 0))
755 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
756 # define fprintf rpl_fprintf
757 # endif
758 # define GNULIB_overrides_fprintf 1
759 # if 0 || 0
760 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
762  _GL_ARG_NONNULL ((1, 2)));
763 # else
764 _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...)
766  _GL_ARG_NONNULL ((1, 2)));
767 # endif
768 _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...));
769 # else
770 _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...));
771 # endif
772 _GL_CXXALIASWARN (fprintf);
773 #endif
774 #if !0 && defined GNULIB_POSIXCHECK
775 # if !GNULIB_overrides_fprintf
776 # undef fprintf
777 # endif
778 /* Assume fprintf is always declared. */
779 _GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
780  "use gnulib module fprintf-posix for portable "
781  "POSIX compliance");
782 #endif
783 
784 #if 1
785 /* Discard all pending buffered I/O data on STREAM.
786  STREAM must not be wide-character oriented.
787  When discarding pending output, the file position is set back to where it
788  was before the write calls. When discarding pending input, the file
789  position is advanced to match the end of the previously read input.
790  Return 0 if successful. Upon error, return -1 and set errno. */
791 # if 0
792 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
793 # define fpurge rpl_fpurge
794 # endif
795 _GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
796 _GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream));
797 # else
798 # if !0
799 _GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1)));
800 # endif
801 _GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream));
802 # endif
804 #elif defined GNULIB_POSIXCHECK
805 # undef fpurge
806 # if HAVE_RAW_DECL_FPURGE
807 _GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
808  "use gnulib module fpurge for portability");
809 # endif
810 #endif
811 
812 #if 1
813 # if 0 && (0 || 0)
814 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
815 # undef fputc
816 # define fputc rpl_fputc
817 # endif
818 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
819 _GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream));
820 # else
821 _GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream));
822 # endif
823 _GL_CXXALIASWARN (fputc);
824 #endif
825 
826 #if 1
827 # if 0 && (0 || 0)
828 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
829 # undef fputs
830 # define fputs rpl_fputs
831 # endif
832 _GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream)
833  _GL_ARG_NONNULL ((1, 2)));
834 _GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream));
835 # else
836 _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream));
837 # endif
838 _GL_CXXALIASWARN (fputs);
839 #endif
840 
841 #if 1
842 # if 0 && 0
843 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
844 # undef fread
845 # define fread rpl_fread
846 # endif
847 _GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)
848  _GL_ARG_NONNULL ((4)));
849 _GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
850 # else
851 _GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream));
852 # endif
853 _GL_CXXALIASWARN (fread);
854 #endif
855 
856 #if 0
857 # if 0
858 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
859 # undef freopen
860 # define freopen rpl_freopen
861 # endif
862 _GL_FUNCDECL_RPL (freopen, FILE *,
863  (const char *filename, const char *mode, FILE *stream)
864  _GL_ARG_NONNULL ((2, 3)));
865 _GL_CXXALIAS_RPL (freopen, FILE *,
866  (const char *filename, const char *mode, FILE *stream));
867 # else
868 _GL_CXXALIAS_SYS (freopen, FILE *,
869  (const char *filename, const char *mode, FILE *stream));
870 # endif
871 _GL_CXXALIASWARN (freopen);
872 #elif defined GNULIB_POSIXCHECK
873 # undef freopen
874 /* Assume freopen is always declared. */
875 _GL_WARN_ON_USE (freopen,
876  "freopen on native Windows platforms is not POSIX compliant - "
877  "use gnulib module freopen for portability");
878 #endif
879 
880 #if 1
881 # if 0 && 0
882 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
883 # undef fscanf
884 # define fscanf rpl_fscanf
885 # endif
886 _GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...)
888  _GL_ARG_NONNULL ((1, 2)));
889 _GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...));
890 # else
891 _GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...));
892 # endif
893 _GL_CXXALIASWARN (fscanf);
894 #endif
895 
896 
897 /* Set up the following warnings, based on which modules are in use.
898  GNU Coding Standards discourage the use of fseek, since it imposes
899  an arbitrary limitation on some 32-bit hosts. Remember that the
900  fseek module depends on the fseeko module, so we only have three
901  cases to consider:
902 
903  1. The developer is not using either module. Issue a warning under
904  GNULIB_POSIXCHECK for both functions, to remind them that both
905  functions have bugs on some systems. _GL_NO_LARGE_FILES has no
906  impact on this warning.
907 
908  2. The developer is using both modules. They may be unaware of the
909  arbitrary limitations of fseek, so issue a warning under
910  GNULIB_POSIXCHECK. On the other hand, they may be using both
911  modules intentionally, so the developer can define
912  _GL_NO_LARGE_FILES in the compilation units where the use of fseek
913  is safe, to silence the warning.
914 
915  3. The developer is using the fseeko module, but not fseek. Gnulib
916  guarantees that fseek will still work around platform bugs in that
917  case, but we presume that the developer is aware of the pitfalls of
918  fseek and was trying to avoid it, so issue a warning even when
919  GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be
920  defined to silence the warning in particular compilation units.
921  In C++ compilations with GNULIB_NAMESPACE, in order to avoid that
922  fseek gets defined as a macro, it is recommended that the developer
923  uses the fseek module, even if he is not calling the fseek function.
924 
925  Most gnulib clients that perform stream operations should fall into
926  category 3. */
927 
928 #if 1
929 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
930 # define _GL_FSEEK_WARN /* Category 2, above. */
931 # undef fseek
932 # endif
933 # if 1
934 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
935 # undef fseek
936 # define fseek rpl_fseek
937 # endif
938 _GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence)
939  _GL_ARG_NONNULL ((1)));
940 _GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence));
941 # else
942 _GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence));
943 # endif
945 #endif
946 
947 #if 1
948 # if !1 && !defined _GL_NO_LARGE_FILES
949 # define _GL_FSEEK_WARN /* Category 3, above. */
950 # undef fseek
951 # endif
952 # if 1
953 /* Provide an fseeko function that is aware of a preceding fflush(), and which
954  detects pipes. */
955 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
956 # undef fseeko
957 # define fseeko rpl_fseeko
958 # endif
959 _GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)
960  _GL_ARG_NONNULL ((1)));
961 _GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence));
962 # else
963 # if ! 1
964 _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
965  _GL_ARG_NONNULL ((1)));
966 # endif
967 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
968 # endif
970 #elif defined GNULIB_POSIXCHECK
971 # define _GL_FSEEK_WARN /* Category 1, above. */
972 # undef fseek
973 # undef fseeko
974 # if HAVE_RAW_DECL_FSEEKO
975 _GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
976  "use gnulib module fseeko for portability");
977 # endif
978 #endif
979 
980 #ifdef _GL_FSEEK_WARN
981 # undef _GL_FSEEK_WARN
982 /* Here, either fseek is undefined (but C89 guarantees that it is
983  declared), or it is defined as rpl_fseek (declared above). */
984 _GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
985  "on 32-bit platforms - "
986  "use fseeko function for handling of large files");
987 #endif
988 
989 
990 /* ftell, ftello. See the comments on fseek/fseeko. */
991 
992 #if 1
993 # if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
994 # define _GL_FTELL_WARN /* Category 2, above. */
995 # undef ftell
996 # endif
997 # if 0
998 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
999 # undef ftell
1000 # define ftell rpl_ftell
1001 # endif
1002 _GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1)));
1003 _GL_CXXALIAS_RPL (ftell, long, (FILE *fp));
1004 # else
1005 _GL_CXXALIAS_SYS (ftell, long, (FILE *fp));
1006 # endif
1008 #endif
1009 
1010 #if 1
1011 # if !1 && !defined _GL_NO_LARGE_FILES
1012 # define _GL_FTELL_WARN /* Category 3, above. */
1013 # undef ftell
1014 # endif
1015 # if 0
1016 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1017 # undef ftello
1018 # define ftello rpl_ftello
1019 # endif
1020 _GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
1021 _GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp));
1022 # else
1023 # if ! 1
1024 _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
1025 # endif
1026 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
1027 # endif
1029 #elif defined GNULIB_POSIXCHECK
1030 # define _GL_FTELL_WARN /* Category 1, above. */
1031 # undef ftell
1032 # undef ftello
1033 # if HAVE_RAW_DECL_FTELLO
1034 _GL_WARN_ON_USE (ftello, "ftello is unportable - "
1035  "use gnulib module ftello for portability");
1036 # endif
1037 #endif
1038 
1039 #ifdef _GL_FTELL_WARN
1040 # undef _GL_FTELL_WARN
1041 /* Here, either ftell is undefined (but C89 guarantees that it is
1042  declared), or it is defined as rpl_ftell (declared above). */
1043 _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
1044  "on 32-bit platforms - "
1045  "use ftello function for handling of large files");
1046 #endif
1047 
1048 
1049 #if 1
1050 # if 0 && (0 || 0)
1051 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1052 # undef fwrite
1053 # define fwrite rpl_fwrite
1054 # endif
1055 _GL_FUNCDECL_RPL (fwrite, size_t,
1056  (const void *ptr, size_t s, size_t n, FILE *stream)
1057  _GL_ARG_NONNULL ((1, 4)));
1058 _GL_CXXALIAS_RPL (fwrite, size_t,
1059  (const void *ptr, size_t s, size_t n, FILE *stream));
1060 # else
1061 _GL_CXXALIAS_SYS (fwrite, size_t,
1062  (const void *ptr, size_t s, size_t n, FILE *stream));
1063 
1064 /* Work around bug 11959 when fortifying glibc 2.4 through 2.15
1065  <https://sourceware.org/bugzilla/show_bug.cgi?id=11959>,
1066  which sometimes causes an unwanted diagnostic for fwrite calls.
1067  This affects only function declaration attributes under certain
1068  versions of gcc and clang, and is not needed for C++. */
1069 # if (0 < __USE_FORTIFY_LEVEL \
1070  && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
1071  && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
1072  && !defined __cplusplus)
1073 # undef fwrite
1074 # undef fwrite_unlocked
1075 extern size_t __REDIRECT (rpl_fwrite,
1076  (const void *__restrict, size_t, size_t,
1077  FILE *__restrict),
1078  fwrite);
1079 extern size_t __REDIRECT (rpl_fwrite_unlocked,
1080  (const void *__restrict, size_t, size_t,
1081  FILE *__restrict),
1082  fwrite_unlocked);
1083 # define fwrite rpl_fwrite
1084 # define fwrite_unlocked rpl_fwrite_unlocked
1085 # endif
1086 # endif
1087 _GL_CXXALIASWARN (fwrite);
1088 #endif
1089 
1090 #if 1
1091 # if 0 && 0
1092 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1093 # undef getc
1094 # define getc rpl_fgetc
1095 # endif
1096 _GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
1097 _GL_CXXALIAS_RPL_1 (getc, rpl_fgetc, int, (FILE *stream));
1098 # else
1099 _GL_CXXALIAS_SYS (getc, int, (FILE *stream));
1100 # endif
1101 _GL_CXXALIASWARN (getc);
1102 #endif
1103 
1104 #if 1
1105 # if 0 && 0
1106 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1107 # undef getchar
1108 # define getchar rpl_getchar
1109 # endif
1110 _GL_FUNCDECL_RPL (getchar, int, (void));
1111 _GL_CXXALIAS_RPL (getchar, int, (void));
1112 # else
1113 _GL_CXXALIAS_SYS (getchar, int, (void));
1114 # endif
1115 _GL_CXXALIASWARN (getchar);
1116 #endif
1117 
1118 #if 0
1119 /* Read input, up to (and including) the next occurrence of DELIMITER, from
1120  STREAM, store it in *LINEPTR (and NUL-terminate it).
1121  *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
1122  bytes of space. It is realloc'd as necessary.
1123  Return the number of bytes read and stored at *LINEPTR (not including the
1124  NUL terminator), or -1 on error or EOF. */
1125 # if 0
1126 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1127 # undef getdelim
1128 # define getdelim rpl_getdelim
1129 # endif
1130 _GL_FUNCDECL_RPL (getdelim, ssize_t,
1131  (char **lineptr, size_t *linesize, int delimiter,
1132  FILE *stream)
1133  _GL_ARG_NONNULL ((1, 2, 4)));
1134 _GL_CXXALIAS_RPL (getdelim, ssize_t,
1135  (char **lineptr, size_t *linesize, int delimiter,
1136  FILE *stream));
1137 # else
1138 # if !1
1139 _GL_FUNCDECL_SYS (getdelim, ssize_t,
1140  (char **lineptr, size_t *linesize, int delimiter,
1141  FILE *stream)
1142  _GL_ARG_NONNULL ((1, 2, 4)));
1143 # endif
1144 _GL_CXXALIAS_SYS (getdelim, ssize_t,
1145  (char **lineptr, size_t *linesize, int delimiter,
1146  FILE *stream));
1147 # endif
1148 _GL_CXXALIASWARN (getdelim);
1149 #elif defined GNULIB_POSIXCHECK
1150 # undef getdelim
1151 # if HAVE_RAW_DECL_GETDELIM
1152 _GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
1153  "use gnulib module getdelim for portability");
1154 # endif
1155 #endif
1156 
1157 #if 0
1158 /* Read a line, up to (and including) the next newline, from STREAM, store it
1159  in *LINEPTR (and NUL-terminate it).
1160  *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
1161  bytes of space. It is realloc'd as necessary.
1162  Return the number of bytes read and stored at *LINEPTR (not including the
1163  NUL terminator), or -1 on error or EOF. */
1164 # if 0
1165 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1166 # undef getline
1167 # define getline rpl_getline
1168 # endif
1169 _GL_FUNCDECL_RPL (getline, ssize_t,
1170  (char **lineptr, size_t *linesize, FILE *stream)
1171  _GL_ARG_NONNULL ((1, 2, 3)));
1172 _GL_CXXALIAS_RPL (getline, ssize_t,
1173  (char **lineptr, size_t *linesize, FILE *stream));
1174 # else
1175 # if !1
1176 _GL_FUNCDECL_SYS (getline, ssize_t,
1177  (char **lineptr, size_t *linesize, FILE *stream)
1178  _GL_ARG_NONNULL ((1, 2, 3)));
1179 # endif
1180 _GL_CXXALIAS_SYS (getline, ssize_t,
1181  (char **lineptr, size_t *linesize, FILE *stream));
1182 # endif
1183 # if 1
1184 _GL_CXXALIASWARN (getline);
1185 # endif
1186 #elif defined GNULIB_POSIXCHECK
1187 # undef getline
1188 # if HAVE_RAW_DECL_GETLINE
1189 _GL_WARN_ON_USE (getline, "getline is unportable - "
1190  "use gnulib module getline for portability");
1191 # endif
1192 #endif
1193 
1194 /* It is very rare that the developer ever has full control of stdin,
1195  so any use of gets warrants an unconditional warning; besides, C11
1196  removed it. */
1197 #undef gets
1198 #if HAVE_RAW_DECL_GETS && !defined __cplusplus
1199 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
1200 #endif
1201 
1202 #if 0 || 0
1203 struct obstack;
1204 /* Grow an obstack with formatted output. Return the number of
1205  bytes added to OBS. No trailing nul byte is added, and the
1206  object should be closed with obstack_finish before use. Upon
1207  memory allocation error, call obstack_alloc_failed_handler. Upon
1208  other error, return -1. */
1209 # if 0
1210 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1211 # define obstack_printf rpl_obstack_printf
1212 # endif
1213 _GL_FUNCDECL_RPL (obstack_printf, int,
1214  (struct obstack *obs, const char *format, ...)
1216  _GL_ARG_NONNULL ((1, 2)));
1217 _GL_CXXALIAS_RPL (obstack_printf, int,
1218  (struct obstack *obs, const char *format, ...));
1219 # else
1220 # if !1
1221 _GL_FUNCDECL_SYS (obstack_printf, int,
1222  (struct obstack *obs, const char *format, ...)
1224  _GL_ARG_NONNULL ((1, 2)));
1225 # endif
1226 _GL_CXXALIAS_SYS (obstack_printf, int,
1227  (struct obstack *obs, const char *format, ...));
1228 # endif
1229 _GL_CXXALIASWARN (obstack_printf);
1230 # if 0
1231 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1232 # define obstack_vprintf rpl_obstack_vprintf
1233 # endif
1234 _GL_FUNCDECL_RPL (obstack_vprintf, int,
1235  (struct obstack *obs, const char *format, va_list args)
1237  _GL_ARG_NONNULL ((1, 2)));
1238 _GL_CXXALIAS_RPL (obstack_vprintf, int,
1239  (struct obstack *obs, const char *format, va_list args));
1240 # else
1241 # if !1
1242 _GL_FUNCDECL_SYS (obstack_vprintf, int,
1243  (struct obstack *obs, const char *format, va_list args)
1245  _GL_ARG_NONNULL ((1, 2)));
1246 # endif
1247 _GL_CXXALIAS_SYS (obstack_vprintf, int,
1248  (struct obstack *obs, const char *format, va_list args));
1249 # endif
1250 _GL_CXXALIASWARN (obstack_vprintf);
1251 #endif
1252 
1253 #if 0
1254 # if !1
1255 _GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1)));
1256 # endif
1257 _GL_CXXALIAS_SYS (pclose, int, (FILE *stream));
1258 _GL_CXXALIASWARN (pclose);
1259 #elif defined GNULIB_POSIXCHECK
1260 # undef pclose
1261 # if HAVE_RAW_DECL_PCLOSE
1262 _GL_WARN_ON_USE (pclose, "pclose is unportable - "
1263  "use gnulib module pclose for more portability");
1264 # endif
1265 #endif
1266 
1267 #if 0
1268 /* Print a message to standard error, describing the value of ERRNO,
1269  (if STRING is not NULL and not empty) prefixed with STRING and ": ",
1270  and terminated with a newline. */
1271 # if 0
1272 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1273 # define perror rpl_perror
1274 # endif
1275 _GL_FUNCDECL_RPL (perror, void, (const char *string));
1276 _GL_CXXALIAS_RPL (perror, void, (const char *string));
1277 # else
1278 _GL_CXXALIAS_SYS (perror, void, (const char *string));
1279 # endif
1280 _GL_CXXALIASWARN (perror);
1281 #elif defined GNULIB_POSIXCHECK
1282 # undef perror
1283 /* Assume perror is always declared. */
1284 _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
1285  "use gnulib module perror for portability");
1286 #endif
1287 
1288 #if 0
1289 # if 0
1290 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1291 # undef popen
1292 # define popen rpl_popen
1293 # endif
1294 _GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode)
1295  _GL_ARG_NONNULL ((1, 2)));
1296 _GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
1297 # else
1298 # if !1
1299 _GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode)
1300  _GL_ARG_NONNULL ((1, 2)));
1301 # endif
1302 _GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
1303 # endif
1304 _GL_CXXALIASWARN (popen);
1305 #elif defined GNULIB_POSIXCHECK
1306 # undef popen
1307 # if HAVE_RAW_DECL_POPEN
1308 _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
1309  "use gnulib module popen or pipe for more portability");
1310 # endif
1311 #endif
1312 
1313 #if 0 || 1
1314 # if (0 && 0) \
1315  || (1 && 0 && (0 || 0))
1316 # if defined __GNUC__
1317 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1318 /* Don't break __attribute__((format(printf,M,N))). */
1319 # define printf __printf__
1320 # endif
1321 # if 0 || 0
1322 _GL_FUNCDECL_RPL_1 (__printf__, int,
1323  (const char *format, ...)
1324  __asm__ (
1327  _GL_ARG_NONNULL ((1)));
1328 # else
1329 _GL_FUNCDECL_RPL_1 (__printf__, int,
1330  (const char *format, ...)
1331  __asm__ (
1334  _GL_ARG_NONNULL ((1)));
1335 # endif
1336 _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
1337 # else
1338 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1339 # define printf rpl_printf
1340 # endif
1341 _GL_FUNCDECL_RPL (printf, int,
1342  (const char *format, ...)
1344  _GL_ARG_NONNULL ((1)));
1345 _GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
1346 # endif
1347 # define GNULIB_overrides_printf 1
1348 # else
1349 _GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
1350 # endif
1351 _GL_CXXALIASWARN (printf);
1352 #endif
1353 #if !0 && defined GNULIB_POSIXCHECK
1354 # if !GNULIB_overrides_printf
1355 # undef printf
1356 # endif
1357 /* Assume printf is always declared. */
1358 _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
1359  "use gnulib module printf-posix for portable "
1360  "POSIX compliance");
1361 #endif
1362 
1363 #if 1
1364 # if 0 && (0 || 0)
1365 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1366 # undef putc
1367 # define putc rpl_fputc
1368 # endif
1369 _GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2)));
1370 _GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream));
1371 # else
1372 _GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream));
1373 # endif
1374 _GL_CXXALIASWARN (putc);
1375 #endif
1376 
1377 #if 1
1378 # if 0 && (0 || 0)
1379 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1380 # undef putchar
1381 # define putchar rpl_putchar
1382 # endif
1383 _GL_FUNCDECL_RPL (putchar, int, (int c));
1384 _GL_CXXALIAS_RPL (putchar, int, (int c));
1385 # else
1386 _GL_CXXALIAS_SYS (putchar, int, (int c));
1387 # endif
1388 _GL_CXXALIASWARN (putchar);
1389 #endif
1390 
1391 #if 1
1392 # if 0 && (0 || 0)
1393 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1394 # undef puts
1395 # define puts rpl_puts
1396 # endif
1397 _GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1)));
1398 _GL_CXXALIAS_RPL (puts, int, (const char *string));
1399 # else
1400 _GL_CXXALIAS_SYS (puts, int, (const char *string));
1401 # endif
1402 _GL_CXXALIASWARN (puts);
1403 #endif
1404 
1405 #if 0
1406 # if 0
1407 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1408 # undef remove
1409 # define remove rpl_remove
1410 # endif
1411 _GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1)));
1412 _GL_CXXALIAS_RPL (remove, int, (const char *name));
1413 # else
1414 _GL_CXXALIAS_SYS (remove, int, (const char *name));
1415 # endif
1416 _GL_CXXALIASWARN (remove);
1417 #elif defined GNULIB_POSIXCHECK
1418 # undef remove
1419 /* Assume remove is always declared. */
1420 _GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
1421  "use gnulib module remove for more portability");
1422 #endif
1423 
1424 #if 0
1425 # if 0
1426 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1427 # undef rename
1428 # define rename rpl_rename
1429 # endif
1430 _GL_FUNCDECL_RPL (rename, int,
1431  (const char *old_filename, const char *new_filename)
1432  _GL_ARG_NONNULL ((1, 2)));
1433 _GL_CXXALIAS_RPL (rename, int,
1434  (const char *old_filename, const char *new_filename));
1435 # else
1436 _GL_CXXALIAS_SYS (rename, int,
1437  (const char *old_filename, const char *new_filename));
1438 # endif
1439 _GL_CXXALIASWARN (rename);
1440 #elif defined GNULIB_POSIXCHECK
1441 # undef rename
1442 /* Assume rename is always declared. */
1443 _GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
1444  "use gnulib module rename for more portability");
1445 #endif
1446 
1447 #if 0
1448 # if 0
1449 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1450 # undef renameat
1451 # define renameat rpl_renameat
1452 # endif
1453 _GL_FUNCDECL_RPL (renameat, int,
1454  (int fd1, char const *file1, int fd2, char const *file2)
1455  _GL_ARG_NONNULL ((2, 4)));
1456 _GL_CXXALIAS_RPL (renameat, int,
1457  (int fd1, char const *file1, int fd2, char const *file2));
1458 # else
1459 # if !1
1460 _GL_FUNCDECL_SYS (renameat, int,
1461  (int fd1, char const *file1, int fd2, char const *file2)
1462  _GL_ARG_NONNULL ((2, 4)));
1463 # endif
1464 _GL_CXXALIAS_SYS (renameat, int,
1465  (int fd1, char const *file1, int fd2, char const *file2));
1466 # endif
1467 _GL_CXXALIASWARN (renameat);
1468 #elif defined GNULIB_POSIXCHECK
1469 # undef renameat
1470 # if HAVE_RAW_DECL_RENAMEAT
1471 _GL_WARN_ON_USE (renameat, "renameat is not portable - "
1472  "use gnulib module renameat for portability");
1473 # endif
1474 #endif
1475 
1476 #if 1
1477 # if 0 && 0
1478 # if defined __GNUC__
1479 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1480 # undef scanf
1481 /* Don't break __attribute__((format(scanf,M,N))). */
1482 # define scanf __scanf__
1483 # endif
1484 _GL_FUNCDECL_RPL_1 (__scanf__, int,
1485  (const char *format, ...)
1486  __asm__ (
1489  _GL_ARG_NONNULL ((1)));
1490 _GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...));
1491 # else
1492 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1493 # undef scanf
1494 # define scanf rpl_scanf
1495 # endif
1496 _GL_FUNCDECL_RPL (scanf, int, (const char *format, ...)
1498  _GL_ARG_NONNULL ((1)));
1499 _GL_CXXALIAS_RPL (scanf, int, (const char *format, ...));
1500 # endif
1501 # else
1502 _GL_CXXALIAS_SYS (scanf, int, (const char *format, ...));
1503 # endif
1504 _GL_CXXALIASWARN (scanf);
1505 #endif
1506 
1507 #if 0
1508 # if 0
1509 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1510 # define snprintf rpl_snprintf
1511 # endif
1512 _GL_FUNCDECL_RPL (snprintf, int,
1513  (char *str, size_t size, const char *format, ...)
1515  _GL_ARG_NONNULL ((3)));
1516 _GL_CXXALIAS_RPL (snprintf, int,
1517  (char *str, size_t size, const char *format, ...));
1518 # else
1519 # if !1
1520 _GL_FUNCDECL_SYS (snprintf, int,
1521  (char *str, size_t size, const char *format, ...)
1523  _GL_ARG_NONNULL ((3)));
1524 # endif
1525 _GL_CXXALIAS_SYS (snprintf, int,
1526  (char *str, size_t size, const char *format, ...));
1527 # endif
1528 _GL_CXXALIASWARN (snprintf);
1529 #elif defined GNULIB_POSIXCHECK
1530 # undef snprintf
1531 # if HAVE_RAW_DECL_SNPRINTF
1532 _GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
1533  "use gnulib module snprintf for portability");
1534 # endif
1535 #endif
1536 
1537 /* Some people would argue that all sprintf uses should be warned about
1538  (for example, OpenBSD issues a link warning for it),
1539  since it can cause security holes due to buffer overruns.
1540  However, we believe that sprintf can be used safely, and is more
1541  efficient than snprintf in those safe cases; and as proof of our
1542  belief, we use sprintf in several gnulib modules. So this header
1543  intentionally avoids adding a warning to sprintf except when
1544  GNULIB_POSIXCHECK is defined. */
1545 
1546 #if 0
1547 # if 0
1548 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1549 # define sprintf rpl_sprintf
1550 # endif
1551 _GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...)
1553  _GL_ARG_NONNULL ((1, 2)));
1554 _GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...));
1555 # else
1556 _GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...));
1557 # endif
1558 _GL_CXXALIASWARN (sprintf);
1559 #elif defined GNULIB_POSIXCHECK
1560 # undef sprintf
1561 /* Assume sprintf is always declared. */
1562 _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
1563  "use gnulib module sprintf-posix for portable "
1564  "POSIX compliance");
1565 #endif
1566 
1567 #if 0
1568 # if 0
1569 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1570 # define tmpfile rpl_tmpfile
1571 # endif
1572 _GL_FUNCDECL_RPL (tmpfile, FILE *, (void));
1573 _GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
1574 # else
1575 _GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
1576 # endif
1577 _GL_CXXALIASWARN (tmpfile);
1578 #elif defined GNULIB_POSIXCHECK
1579 # undef tmpfile
1580 # if HAVE_RAW_DECL_TMPFILE
1581 _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - "
1582  "use gnulib module tmpfile for portability");
1583 # endif
1584 #endif
1585 
1586 #if 0
1587 /* Write formatted output to a string dynamically allocated with malloc().
1588  If the memory allocation succeeds, store the address of the string in
1589  *RESULT and return the number of resulting bytes, excluding the trailing
1590  NUL. Upon memory allocation error, or some other error, return -1. */
1591 # if 0
1592 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1593 # define asprintf rpl_asprintf
1594 # endif
1595 _GL_FUNCDECL_RPL (asprintf, int,
1596  (char **result, const char *format, ...)
1598  _GL_ARG_NONNULL ((1, 2)));
1599 _GL_CXXALIAS_RPL (asprintf, int,
1600  (char **result, const char *format, ...));
1601 # else
1602 # if !1
1603 _GL_FUNCDECL_SYS (asprintf, int,
1604  (char **result, const char *format, ...)
1606  _GL_ARG_NONNULL ((1, 2)));
1607 # endif
1608 _GL_CXXALIAS_SYS (asprintf, int,
1609  (char **result, const char *format, ...));
1610 # endif
1611 _GL_CXXALIASWARN (asprintf);
1612 # if 0
1613 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1614 # define vasprintf rpl_vasprintf
1615 # endif
1616 _GL_FUNCDECL_RPL (vasprintf, int,
1617  (char **result, const char *format, va_list args)
1619  _GL_ARG_NONNULL ((1, 2)));
1620 _GL_CXXALIAS_RPL (vasprintf, int,
1621  (char **result, const char *format, va_list args));
1622 # else
1623 # if !1
1624 _GL_FUNCDECL_SYS (vasprintf, int,
1625  (char **result, const char *format, va_list args)
1627  _GL_ARG_NONNULL ((1, 2)));
1628 # endif
1629 _GL_CXXALIAS_SYS (vasprintf, int,
1630  (char **result, const char *format, va_list args));
1631 # endif
1632 _GL_CXXALIASWARN (vasprintf);
1633 #endif
1634 
1635 #if 0
1636 # if 0
1637 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1638 # define vdprintf rpl_vdprintf
1639 # endif
1640 _GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args)
1642  _GL_ARG_NONNULL ((2)));
1643 _GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args));
1644 # else
1645 # if !1
1646 _GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args)
1648  _GL_ARG_NONNULL ((2)));
1649 # endif
1650 /* Need to cast, because on Solaris, the third parameter will likely be
1651  __va_list args. */
1652 _GL_CXXALIAS_SYS_CAST (vdprintf, int,
1653  (int fd, const char *format, va_list args));
1654 # endif
1655 _GL_CXXALIASWARN (vdprintf);
1656 #elif defined GNULIB_POSIXCHECK
1657 # undef vdprintf
1658 # if HAVE_RAW_DECL_VDPRINTF
1659 _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
1660  "use gnulib module vdprintf for portability");
1661 # endif
1662 #endif
1663 
1664 #if 0 || 1
1665 # if (0 && 0) \
1666  || (1 && 0 && (0 || 0))
1667 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1668 # define vfprintf rpl_vfprintf
1669 # endif
1670 # define GNULIB_overrides_vfprintf 1
1671 # if 0
1672 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
1674  _GL_ARG_NONNULL ((1, 2)));
1675 # else
1676 _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)
1678  _GL_ARG_NONNULL ((1, 2)));
1679 # endif
1680 _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args));
1681 # else
1682 /* Need to cast, because on Solaris, the third parameter is
1683  __va_list args
1684  and GCC's fixincludes did not change this to __gnuc_va_list. */
1685 _GL_CXXALIAS_SYS_CAST (vfprintf, int,
1686  (FILE *fp, const char *format, va_list args));
1687 # endif
1688 _GL_CXXALIASWARN (vfprintf);
1689 #endif
1690 #if !0 && defined GNULIB_POSIXCHECK
1691 # if !GNULIB_overrides_vfprintf
1692 # undef vfprintf
1693 # endif
1694 /* Assume vfprintf is always declared. */
1695 _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
1696  "use gnulib module vfprintf-posix for portable "
1697  "POSIX compliance");
1698 #endif
1699 
1700 #if 0
1701 # if 0 && 0
1702 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1703 # undef vfscanf
1704 # define vfscanf rpl_vfscanf
1705 # endif
1706 _GL_FUNCDECL_RPL (vfscanf, int,
1707  (FILE *stream, const char *format, va_list args)
1709  _GL_ARG_NONNULL ((1, 2)));
1710 _GL_CXXALIAS_RPL (vfscanf, int,
1711  (FILE *stream, const char *format, va_list args));
1712 # else
1713 _GL_CXXALIAS_SYS (vfscanf, int,
1714  (FILE *stream, const char *format, va_list args));
1715 # endif
1716 _GL_CXXALIASWARN (vfscanf);
1717 #endif
1718 
1719 #if 0 || 1
1720 # if (0 && 0) \
1721  || (1 && 0 && (0 || 0))
1722 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1723 # define vprintf rpl_vprintf
1724 # endif
1725 # define GNULIB_overrides_vprintf 1
1726 # if 0 || 0
1727 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
1729  _GL_ARG_NONNULL ((1)));
1730 # else
1731 _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args)
1733  _GL_ARG_NONNULL ((1)));
1734 # endif
1735 _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args));
1736 # else
1737 /* Need to cast, because on Solaris, the second parameter is
1738  __va_list args
1739  and GCC's fixincludes did not change this to __gnuc_va_list. */
1740 _GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args));
1741 # endif
1742 _GL_CXXALIASWARN (vprintf);
1743 #endif
1744 #if !0 && defined GNULIB_POSIXCHECK
1745 # if !GNULIB_overrides_vprintf
1746 # undef vprintf
1747 # endif
1748 /* Assume vprintf is always declared. */
1749 _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
1750  "use gnulib module vprintf-posix for portable "
1751  "POSIX compliance");
1752 #endif
1753 
1754 #if 0
1755 # if 0 && 0
1756 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1757 # undef vscanf
1758 # define vscanf rpl_vscanf
1759 # endif
1760 _GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args)
1762  _GL_ARG_NONNULL ((1)));
1763 _GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args));
1764 # else
1765 _GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args));
1766 # endif
1767 _GL_CXXALIASWARN (vscanf);
1768 #endif
1769 
1770 #if 0
1771 # if 0
1772 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1773 # define vsnprintf rpl_vsnprintf
1774 # endif
1775 _GL_FUNCDECL_RPL (vsnprintf, int,
1776  (char *str, size_t size, const char *format, va_list args)
1778  _GL_ARG_NONNULL ((3)));
1779 _GL_CXXALIAS_RPL (vsnprintf, int,
1780  (char *str, size_t size, const char *format, va_list args));
1781 # else
1782 # if !1
1783 _GL_FUNCDECL_SYS (vsnprintf, int,
1784  (char *str, size_t size, const char *format, va_list args)
1786  _GL_ARG_NONNULL ((3)));
1787 # endif
1788 _GL_CXXALIAS_SYS (vsnprintf, int,
1789  (char *str, size_t size, const char *format, va_list args));
1790 # endif
1791 _GL_CXXALIASWARN (vsnprintf);
1792 #elif defined GNULIB_POSIXCHECK
1793 # undef vsnprintf
1794 # if HAVE_RAW_DECL_VSNPRINTF
1795 _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
1796  "use gnulib module vsnprintf for portability");
1797 # endif
1798 #endif
1799 
1800 #if 0
1801 # if 0
1802 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1803 # define vsprintf rpl_vsprintf
1804 # endif
1805 _GL_FUNCDECL_RPL (vsprintf, int,
1806  (char *str, const char *format, va_list args)
1808  _GL_ARG_NONNULL ((1, 2)));
1809 _GL_CXXALIAS_RPL (vsprintf, int,
1810  (char *str, const char *format, va_list args));
1811 # else
1812 /* Need to cast, because on Solaris, the third parameter is
1813  __va_list args
1814  and GCC's fixincludes did not change this to __gnuc_va_list. */
1815 _GL_CXXALIAS_SYS_CAST (vsprintf, int,
1816  (char *str, const char *format, va_list args));
1817 # endif
1818 _GL_CXXALIASWARN (vsprintf);
1819 #elif defined GNULIB_POSIXCHECK
1820 # undef vsprintf
1821 /* Assume vsprintf is always declared. */
1822 _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
1823  "use gnulib module vsprintf-posix for portable "
1824  "POSIX compliance");
1825 #endif
1826 
1827 #endif /* _GL_STDIO_H */
1828 #endif /* _GL_STDIO_H */
1829 #endif
#define _GL_ARG_NONNULL(params)
Definition: stdio.h:485
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: stdio.h:270
#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument)
Definition: stdio.h:92
#define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument)
Definition: stdio.h:80
#define fseeko
Definition: stdio.h:957
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: stdio.h:368
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: stdio.h:343
#define _GL_CXXALIASWARN(func)
Definition: stdio.h:427
#define _GL_WARN_ON_USE(function, message)
Definition: stdio.h:564
#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument)
Definition: stdio.h:112
#define fclose
Definition: stdio.h:644
#define fflush
Definition: stdio.h:688
#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token)
Definition: stdio.h:602
long ftell(FILE *fp)
Definition: ftell.c:26
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: stdio.h:246
off_t ftello(FILE *fp)
Definition: ftello.c:28
int fpurge(FILE *fp)
Definition: fpurge.c:30
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: stdio.h:258
#define _GL_CXXALIAS_RPL_1(func, rpl_func, rettype, parameters)
Definition: stdio.h:288
#define fseek
Definition: stdio.h:936
#define _GL_FUNCDECL_RPL_1(rpl_func, rettype, parameters_and_attributes)
Definition: stdio.h:248