1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Copyright (C) 2006-2020 Free Software Foundation, Inc.
3    Written by Paul Eggert, Bruno Haible, Derek Price.
4    This file is part of gnulib.
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 of the License, or
9    (at your option) 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 /*
20  * ISO C 99 <inttypes.h> for platforms that lack it.
21  * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
22  */
23 
24 #if __GNUC__ >= 3
25 #pragma GCC system_header
26 #endif
27 
28 
29 /* Include the original <inttypes.h> if it exists, and if this file
30    has not been included yet or if this file includes gnulib stdint.h
31    which in turn includes this file.
32    The include_next requires a split double-inclusion guard.  */
33 #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
34 # if 1
35 
36    /* Some pre-C++11 <stdint.h> implementations need this.  */
37 #  if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
38 #   define __STDC_FORMAT_MACROS 1
39 #  endif
40 
41 #  include_next <inttypes.h>
42 
43 #  define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
44 # endif
45 #endif
46 
47 #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
48 #define INTTYPES_H
49 
50 /* Include <stdint.h> or the gnulib replacement.
51    But avoid namespace pollution on glibc systems.  */
52 #ifndef __GLIBC__
53 # include <stdint.h>
54 #endif
55 /* Get CHAR_BIT, INT_MAX, LONG_MAX, etc.  */
56 #include <limits.h>
57 /* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
58 #if defined _WIN32 && ! defined __CYGWIN__
59 # include <stdio.h>
60 #endif
61 
62 #if !(INT_MAX == 0x7fffffff && INT_MIN + INT_MAX == -1)
63 # error "This file assumes that 'int' is 32-bit two's complement. Please report your platform and compiler to <bug-gnulib@gnu.org>."
64 #endif
65 
66 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
67 /* C++ compatible function declaration macros.
68    Copyright (C) 2010-2020 Free Software Foundation, Inc.
69 
70    This program is free software: you can redistribute it and/or modify it
71    under the terms of the GNU General Public License as published
72    by the Free Software Foundation; either version 3 of the License, or
73    (at your option) any later version.
74 
75    This program is distributed in the hope that it will be useful,
76    but WITHOUT ANY WARRANTY; without even the implied warranty of
77    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
78    General Public License for more details.
79 
80    You should have received a copy of the GNU General Public License
81    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
82 
83 #ifndef _GL_CXXDEFS_H
84 #define _GL_CXXDEFS_H
85 
86 /* Begin/end the GNULIB_NAMESPACE namespace.  */
87 #if defined __cplusplus && defined GNULIB_NAMESPACE
88 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
89 # define _GL_END_NAMESPACE }
90 #else
91 # define _GL_BEGIN_NAMESPACE
92 # define _GL_END_NAMESPACE
93 #endif
94 
95 /* The three most frequent use cases of these macros are:
96 
97    * For providing a substitute for a function that is missing on some
98      platforms, but is declared and works fine on the platforms on which
99      it exists:
100 
101        #if @GNULIB_FOO@
102        # if !@HAVE_FOO@
103        _GL_FUNCDECL_SYS (foo, ...);
104        # endif
105        _GL_CXXALIAS_SYS (foo, ...);
106        _GL_CXXALIASWARN (foo);
107        #elif defined GNULIB_POSIXCHECK
108        ...
109        #endif
110 
111    * For providing a replacement for a function that exists on all platforms,
112      but is broken/insufficient and needs to be replaced on some platforms:
113 
114        #if @GNULIB_FOO@
115        # if @REPLACE_FOO@
116        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
117        #   undef foo
118        #   define foo rpl_foo
119        #  endif
120        _GL_FUNCDECL_RPL (foo, ...);
121        _GL_CXXALIAS_RPL (foo, ...);
122        # else
123        _GL_CXXALIAS_SYS (foo, ...);
124        # endif
125        _GL_CXXALIASWARN (foo);
126        #elif defined GNULIB_POSIXCHECK
127        ...
128        #endif
129 
130    * For providing a replacement for a function that exists on some platforms
131      but is broken/insufficient and needs to be replaced on some of them and
132      is additionally either missing or undeclared on some other platforms:
133 
134        #if @GNULIB_FOO@
135        # if @REPLACE_FOO@
136        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
137        #   undef foo
138        #   define foo rpl_foo
139        #  endif
140        _GL_FUNCDECL_RPL (foo, ...);
141        _GL_CXXALIAS_RPL (foo, ...);
142        # else
143        #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
144        _GL_FUNCDECL_SYS (foo, ...);
145        #  endif
146        _GL_CXXALIAS_SYS (foo, ...);
147        # endif
148        _GL_CXXALIASWARN (foo);
149        #elif defined GNULIB_POSIXCHECK
150        ...
151        #endif
152 */
153 
154 /* _GL_EXTERN_C declaration;
155    performs the declaration with C linkage.  */
156 #if defined __cplusplus
157 # define _GL_EXTERN_C extern "C"
158 #else
159 # define _GL_EXTERN_C extern
160 #endif
161 
162 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
163    declares a replacement function, named rpl_func, with the given prototype,
164    consisting of return type, parameters, and attributes.
165    Example:
166      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
167                                   _GL_ARG_NONNULL ((1)));
168  */
169 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
170   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
171 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
172   _GL_EXTERN_C rettype rpl_func parameters_and_attributes
173 
174 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
175    declares the system function, named func, with the given prototype,
176    consisting of return type, parameters, and attributes.
177    Example:
178      _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
179                                   _GL_ARG_NONNULL ((1)));
180  */
181 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
182   _GL_EXTERN_C rettype func parameters_and_attributes
183 
184 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
185    declares a C++ alias called GNULIB_NAMESPACE::func
186    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
187    Example:
188      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
189 
190    Wrapping rpl_func in an object with an inline conversion operator
191    avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
192    actually used in the program.  */
193 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
194   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
195 #if defined __cplusplus && defined GNULIB_NAMESPACE
196 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
197     namespace GNULIB_NAMESPACE                                \
198     {                                                         \
199       static const struct _gl_ ## func ## _wrapper            \
200       {                                                       \
201         typedef rettype (*type) parameters;                   \
202                                                               \
203         inline operator type () const                         \
204         {                                                     \
205           return ::rpl_func;                                  \
206         }                                                     \
207       } func = {};                                            \
208     }                                                         \
209     _GL_EXTERN_C int _gl_cxxalias_dummy
210 #else
211 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
212     _GL_EXTERN_C int _gl_cxxalias_dummy
213 #endif
214 
215 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
216    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
217    except that the C function rpl_func may have a slightly different
218    declaration.  A cast is used to silence the "invalid conversion" error
219    that would otherwise occur.  */
220 #if defined __cplusplus && defined GNULIB_NAMESPACE
221 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
222     namespace GNULIB_NAMESPACE                                     \
223     {                                                              \
224       static const struct _gl_ ## func ## _wrapper                 \
225       {                                                            \
226         typedef rettype (*type) parameters;                        \
227                                                                    \
228         inline operator type () const                              \
229         {                                                          \
230           return reinterpret_cast<type>(::rpl_func);               \
231         }                                                          \
232       } func = {};                                                 \
233     }                                                              \
234     _GL_EXTERN_C int _gl_cxxalias_dummy
235 #else
236 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
237     _GL_EXTERN_C int _gl_cxxalias_dummy
238 #endif
239 
240 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
241    declares a C++ alias called GNULIB_NAMESPACE::func
242    that redirects to the system provided function func, if GNULIB_NAMESPACE
243    is defined.
244    Example:
245      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
246 
247    Wrapping func in an object with an inline conversion operator
248    avoids a reference to func unless GNULIB_NAMESPACE::func is
249    actually used in the program.  */
250 #if defined __cplusplus && defined GNULIB_NAMESPACE
251 # define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
252     namespace GNULIB_NAMESPACE                                \
253     {                                                         \
254       static const struct _gl_ ## func ## _wrapper            \
255       {                                                       \
256         typedef rettype (*type) parameters;                   \
257                                                               \
258         inline operator type () const                         \
259         {                                                     \
260           return ::func;                                      \
261         }                                                     \
262       } func = {};                                            \
263     }                                                         \
264     _GL_EXTERN_C int _gl_cxxalias_dummy
265 #else
266 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
267     _GL_EXTERN_C int _gl_cxxalias_dummy
268 #endif
269 
270 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
271    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
272    except that the C function func may have a slightly different declaration.
273    A cast is used to silence the "invalid conversion" error that would
274    otherwise occur.  */
275 #if defined __cplusplus && defined GNULIB_NAMESPACE
276 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
277     namespace GNULIB_NAMESPACE                          \
278     {                                                   \
279       static const struct _gl_ ## func ## _wrapper      \
280       {                                                 \
281         typedef rettype (*type) parameters;             \
282                                                         \
283         inline operator type () const                   \
284         {                                               \
285           return reinterpret_cast<type>(::func);        \
286         }                                               \
287       } func = {};                                      \
288     }                                                   \
289     _GL_EXTERN_C int _gl_cxxalias_dummy
290 #else
291 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
292     _GL_EXTERN_C int _gl_cxxalias_dummy
293 #endif
294 
295 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
296    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
297    except that the C function is picked among a set of overloaded functions,
298    namely the one with rettype2 and parameters2.  Two consecutive casts
299    are used to silence the "cannot find a match" and "invalid conversion"
300    errors that would otherwise occur.  */
301 #if defined __cplusplus && defined GNULIB_NAMESPACE
302   /* The outer cast must be a reinterpret_cast.
303      The inner cast: When the function is defined as a set of overloaded
304      functions, it works as a static_cast<>, choosing the designated variant.
305      When the function is defined as a single variant, it works as a
306      reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
307 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
308     namespace GNULIB_NAMESPACE                                                \
309     {                                                                         \
310       static const struct _gl_ ## func ## _wrapper                            \
311       {                                                                       \
312         typedef rettype (*type) parameters;                                   \
313                                                                               \
314         inline operator type () const                                         \
315         {                                                                     \
316           return reinterpret_cast<type>((rettype2 (*) parameters2)(::func));  \
317         }                                                                     \
318       } func = {};                                                            \
319     }                                                                         \
320     _GL_EXTERN_C int _gl_cxxalias_dummy
321 #else
322 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
323     _GL_EXTERN_C int _gl_cxxalias_dummy
324 #endif
325 
326 /* _GL_CXXALIASWARN (func);
327    causes a warning to be emitted when ::func is used but not when
328    GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
329    variants.  */
330 #if defined __cplusplus && defined GNULIB_NAMESPACE
331 # define _GL_CXXALIASWARN(func) \
332    _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
333 # define _GL_CXXALIASWARN_1(func,namespace) \
334    _GL_CXXALIASWARN_2 (func, namespace)
335 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
336    we enable the warning only when not optimizing.  */
337 # if !__OPTIMIZE__
338 #  define _GL_CXXALIASWARN_2(func,namespace) \
339     _GL_WARN_ON_USE (func, \
340                      "The symbol ::" #func " refers to the system function. " \
341                      "Use " #namespace "::" #func " instead.")
342 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
343 #  define _GL_CXXALIASWARN_2(func,namespace) \
344      extern __typeof__ (func) func
345 # else
346 #  define _GL_CXXALIASWARN_2(func,namespace) \
347      _GL_EXTERN_C int _gl_cxxalias_dummy
348 # endif
349 #else
350 # define _GL_CXXALIASWARN(func) \
351     _GL_EXTERN_C int _gl_cxxalias_dummy
352 #endif
353 
354 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
355    causes a warning to be emitted when the given overloaded variant of ::func
356    is used but not when GNULIB_NAMESPACE::func is used.  */
357 #if defined __cplusplus && defined GNULIB_NAMESPACE
358 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
359    _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
360                         GNULIB_NAMESPACE)
361 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
362    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
363 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
364    we enable the warning only when not optimizing.  */
365 # if !__OPTIMIZE__
366 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
367     _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
368                          "The symbol ::" #func " refers to the system function. " \
369                          "Use " #namespace "::" #func " instead.")
370 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
371 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
372      extern __typeof__ (func) func
373 # else
374 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
375      _GL_EXTERN_C int _gl_cxxalias_dummy
376 # endif
377 #else
378 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
379     _GL_EXTERN_C int _gl_cxxalias_dummy
380 #endif
381 
382 #endif /* _GL_CXXDEFS_H */
383 
384 /* The definition of _GL_ARG_NONNULL is copied here.  */
385 /* A C macro for declaring that specific arguments must not be NULL.
386    Copyright (C) 2009-2020 Free Software Foundation, Inc.
387 
388    This program is free software: you can redistribute it and/or modify it
389    under the terms of the GNU General Public License as published
390    by the Free Software Foundation; either version 3 of the License, or
391    (at your option) any later version.
392 
393    This program is distributed in the hope that it will be useful,
394    but WITHOUT ANY WARRANTY; without even the implied warranty of
395    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
396    General Public License for more details.
397 
398    You should have received a copy of the GNU General Public License
399    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
400 
401 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
402    that the values passed as arguments n, ..., m must be non-NULL pointers.
403    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
404 #ifndef _GL_ARG_NONNULL
405 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
406 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
407 # else
408 #  define _GL_ARG_NONNULL(params)
409 # endif
410 #endif
411 
412 /* The definition of _GL_WARN_ON_USE is copied here.  */
413 /* A C macro for emitting warnings if a function is used.
414    Copyright (C) 2010-2020 Free Software Foundation, Inc.
415 
416    This program is free software: you can redistribute it and/or modify it
417    under the terms of the GNU General Public License as published
418    by the Free Software Foundation; either version 3 of the License, or
419    (at your option) any later version.
420 
421    This program is distributed in the hope that it will be useful,
422    but WITHOUT ANY WARRANTY; without even the implied warranty of
423    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
424    General Public License for more details.
425 
426    You should have received a copy of the GNU General Public License
427    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
428 
429 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
430    for FUNCTION which will then trigger a compiler warning containing
431    the text of "literal string" anywhere that function is called, if
432    supported by the compiler.  If the compiler does not support this
433    feature, the macro expands to an unused extern declaration.
434 
435    _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
436    attribute used in _GL_WARN_ON_USE.  If the compiler does not support
437    this feature, it expands to empty.
438 
439    These macros are useful for marking a function as a potential
440    portability trap, with the intent that "literal string" include
441    instructions on the replacement function that should be used
442    instead.
443    _GL_WARN_ON_USE is for functions with 'extern' linkage.
444    _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
445    linkage.
446 
447    However, one of the reasons that a function is a portability trap is
448    if it has the wrong signature.  Declaring FUNCTION with a different
449    signature in C is a compilation error, so this macro must use the
450    same type as any existing declaration so that programs that avoid
451    the problematic FUNCTION do not fail to compile merely because they
452    included a header that poisoned the function.  But this implies that
453    _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
454    have a declaration.  Use of this macro implies that there must not
455    be any other macro hiding the declaration of FUNCTION; but
456    undefining FUNCTION first is part of the poisoning process anyway
457    (although for symbols that are provided only via a macro, the result
458    is a compilation error rather than a warning containing
459    "literal string").  Also note that in C++, it is only safe to use if
460    FUNCTION has no overloads.
461 
462    For an example, it is possible to poison 'getline' by:
463    - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
464      [getline]) in configure.ac, which potentially defines
465      HAVE_RAW_DECL_GETLINE
466    - adding this code to a header that wraps the system <stdio.h>:
467      #undef getline
468      #if HAVE_RAW_DECL_GETLINE
469      _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
470        "not universally present; use the gnulib module getline");
471      #endif
472 
473    It is not possible to directly poison global variables.  But it is
474    possible to write a wrapper accessor function, and poison that
475    (less common usage, like &environ, will cause a compilation error
476    rather than issue the nice warning, but the end result of informing
477    the developer about their portability problem is still achieved):
478      #if HAVE_RAW_DECL_ENVIRON
479      static char ***
480      rpl_environ (void) { return &environ; }
481      _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
482      # undef environ
483      # define environ (*rpl_environ ())
484      #endif
485    or better (avoiding contradictory use of 'static' and 'extern'):
486      #if HAVE_RAW_DECL_ENVIRON
487      static char ***
488      _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
489      rpl_environ (void) { return &environ; }
490      # undef environ
491      # define environ (*rpl_environ ())
492      #endif
493    */
494 #ifndef _GL_WARN_ON_USE
495 
496 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
497 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
498 #  define _GL_WARN_ON_USE(function, message) \
499 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
500 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
501   __attribute__ ((__warning__ (message)))
502 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
503 /* Verify the existence of the function.  */
504 #  define _GL_WARN_ON_USE(function, message) \
505 extern __typeof__ (function) function
506 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
507 # else /* Unsupported.  */
508 #  define _GL_WARN_ON_USE(function, message) \
509 _GL_WARN_EXTERN_C int _gl_warn_on_use
510 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
511 # endif
512 #endif
513 
514 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
515    is like _GL_WARN_ON_USE (function, "string"), except that the function is
516    declared with the given prototype, consisting of return type, parameters,
517    and attributes.
518    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
519    not work in this case.  */
520 #ifndef _GL_WARN_ON_USE_CXX
521 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
522 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
523 extern rettype function parameters_and_attributes \
524      __attribute__ ((__warning__ (msg)))
525 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
526 /* Verify the existence of the function.  */
527 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
528 extern rettype function parameters_and_attributes
529 # else /* Unsupported.  */
530 #  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
531 _GL_WARN_EXTERN_C int _gl_warn_on_use
532 # endif
533 #endif
534 
535 /* _GL_WARN_EXTERN_C declaration;
536    performs the declaration with C linkage.  */
537 #ifndef _GL_WARN_EXTERN_C
538 # if defined __cplusplus
539 #  define _GL_WARN_EXTERN_C extern "C"
540 # else
541 #  define _GL_WARN_EXTERN_C extern
542 # endif
543 #endif
544 
545 /* 7.8.1 Macros for format specifiers */
546 
547 #if defined _TNS_R_TARGET
548    /* Tandem NonStop R series and compatible platforms released before
549       July 2005 support %Ld but not %lld.  */
550 # define _LONG_LONG_FORMAT_PREFIX "L"
551 #else
552 # define _LONG_LONG_FORMAT_PREFIX "ll"
553 #endif
554 
555 #if !defined PRId8 || 0
556 # undef PRId8
557 # ifdef INT8_MAX
558 #  define PRId8 "d"
559 # endif
560 #endif
561 #if !defined PRIi8 || 0
562 # undef PRIi8
563 # ifdef INT8_MAX
564 #  define PRIi8 "i"
565 # endif
566 #endif
567 #if !defined PRIo8 || 0
568 # undef PRIo8
569 # ifdef UINT8_MAX
570 #  define PRIo8 "o"
571 # endif
572 #endif
573 #if !defined PRIu8 || 0
574 # undef PRIu8
575 # ifdef UINT8_MAX
576 #  define PRIu8 "u"
577 # endif
578 #endif
579 #if !defined PRIx8 || 0
580 # undef PRIx8
581 # ifdef UINT8_MAX
582 #  define PRIx8 "x"
583 # endif
584 #endif
585 #if !defined PRIX8 || 0
586 # undef PRIX8
587 # ifdef UINT8_MAX
588 #  define PRIX8 "X"
589 # endif
590 #endif
591 #if !defined PRId16 || 0
592 # undef PRId16
593 # ifdef INT16_MAX
594 #  define PRId16 "d"
595 # endif
596 #endif
597 #if !defined PRIi16 || 0
598 # undef PRIi16
599 # ifdef INT16_MAX
600 #  define PRIi16 "i"
601 # endif
602 #endif
603 #if !defined PRIo16 || 0
604 # undef PRIo16
605 # ifdef UINT16_MAX
606 #  define PRIo16 "o"
607 # endif
608 #endif
609 #if !defined PRIu16 || 0
610 # undef PRIu16
611 # ifdef UINT16_MAX
612 #  define PRIu16 "u"
613 # endif
614 #endif
615 #if !defined PRIx16 || 0
616 # undef PRIx16
617 # ifdef UINT16_MAX
618 #  define PRIx16 "x"
619 # endif
620 #endif
621 #if !defined PRIX16 || 0
622 # undef PRIX16
623 # ifdef UINT16_MAX
624 #  define PRIX16 "X"
625 # endif
626 #endif
627 #if !defined PRId32 || 0
628 # undef PRId32
629 # ifdef INT32_MAX
630 #  define PRId32 "d"
631 # endif
632 #endif
633 #if !defined PRIi32 || 0
634 # undef PRIi32
635 # ifdef INT32_MAX
636 #  define PRIi32 "i"
637 # endif
638 #endif
639 #if !defined PRIo32 || 0
640 # undef PRIo32
641 # ifdef UINT32_MAX
642 #  define PRIo32 "o"
643 # endif
644 #endif
645 #if !defined PRIu32 || 0
646 # undef PRIu32
647 # ifdef UINT32_MAX
648 #  define PRIu32 "u"
649 # endif
650 #endif
651 #if !defined PRIx32 || 0
652 # undef PRIx32
653 # ifdef UINT32_MAX
654 #  define PRIx32 "x"
655 # endif
656 #endif
657 #if !defined PRIX32 || 0
658 # undef PRIX32
659 # ifdef UINT32_MAX
660 #  define PRIX32 "X"
661 # endif
662 #endif
663 #ifdef INT64_MAX
664 # if (0 ? defined _LP64 : 1)
665 #  define _PRI64_PREFIX "l"
666 # elif defined _MSC_VER || defined __MINGW32__
667 #  define _PRI64_PREFIX "I64"
668 # elif LONG_MAX >> 30 == 1
669 #  define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
670 # endif
671 # if !defined PRId64 || 0
672 #  undef PRId64
673 #  define PRId64 _PRI64_PREFIX "d"
674 # endif
675 # if !defined PRIi64 || 0
676 #  undef PRIi64
677 #  define PRIi64 _PRI64_PREFIX "i"
678 # endif
679 #endif
680 #ifdef UINT64_MAX
681 # if (0 ? defined _LP64 : 1)
682 #  define _PRIu64_PREFIX "l"
683 # elif defined _MSC_VER || defined __MINGW32__
684 #  define _PRIu64_PREFIX "I64"
685 # elif ULONG_MAX >> 31 == 1
686 #  define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
687 # endif
688 # if !defined PRIo64 || 0
689 #  undef PRIo64
690 #  define PRIo64 _PRIu64_PREFIX "o"
691 # endif
692 # if !defined PRIu64 || 0
693 #  undef PRIu64
694 #  define PRIu64 _PRIu64_PREFIX "u"
695 # endif
696 # if !defined PRIx64 || 0
697 #  undef PRIx64
698 #  define PRIx64 _PRIu64_PREFIX "x"
699 # endif
700 # if !defined PRIX64 || 0
701 #  undef PRIX64
702 #  define PRIX64 _PRIu64_PREFIX "X"
703 # endif
704 #endif
705 
706 #if !defined PRIdLEAST8 || 0
707 # undef PRIdLEAST8
708 # define PRIdLEAST8 "d"
709 #endif
710 #if !defined PRIiLEAST8 || 0
711 # undef PRIiLEAST8
712 # define PRIiLEAST8 "i"
713 #endif
714 #if !defined PRIoLEAST8 || 0
715 # undef PRIoLEAST8
716 # define PRIoLEAST8 "o"
717 #endif
718 #if !defined PRIuLEAST8 || 0
719 # undef PRIuLEAST8
720 # define PRIuLEAST8 "u"
721 #endif
722 #if !defined PRIxLEAST8 || 0
723 # undef PRIxLEAST8
724 # define PRIxLEAST8 "x"
725 #endif
726 #if !defined PRIXLEAST8 || 0
727 # undef PRIXLEAST8
728 # define PRIXLEAST8 "X"
729 #endif
730 #if !defined PRIdLEAST16 || 0
731 # undef PRIdLEAST16
732 # define PRIdLEAST16 "d"
733 #endif
734 #if !defined PRIiLEAST16 || 0
735 # undef PRIiLEAST16
736 # define PRIiLEAST16 "i"
737 #endif
738 #if !defined PRIoLEAST16 || 0
739 # undef PRIoLEAST16
740 # define PRIoLEAST16 "o"
741 #endif
742 #if !defined PRIuLEAST16 || 0
743 # undef PRIuLEAST16
744 # define PRIuLEAST16 "u"
745 #endif
746 #if !defined PRIxLEAST16 || 0
747 # undef PRIxLEAST16
748 # define PRIxLEAST16 "x"
749 #endif
750 #if !defined PRIXLEAST16 || 0
751 # undef PRIXLEAST16
752 # define PRIXLEAST16 "X"
753 #endif
754 #if !defined PRIdLEAST32 || 0
755 # undef PRIdLEAST32
756 # define PRIdLEAST32 "d"
757 #endif
758 #if !defined PRIiLEAST32 || 0
759 # undef PRIiLEAST32
760 # define PRIiLEAST32 "i"
761 #endif
762 #if !defined PRIoLEAST32 || 0
763 # undef PRIoLEAST32
764 # define PRIoLEAST32 "o"
765 #endif
766 #if !defined PRIuLEAST32 || 0
767 # undef PRIuLEAST32
768 # define PRIuLEAST32 "u"
769 #endif
770 #if !defined PRIxLEAST32 || 0
771 # undef PRIxLEAST32
772 # define PRIxLEAST32 "x"
773 #endif
774 #if !defined PRIXLEAST32 || 0
775 # undef PRIXLEAST32
776 # define PRIXLEAST32 "X"
777 #endif
778 #ifdef INT64_MAX
779 # if !defined PRIdLEAST64 || 0
780 #  undef PRIdLEAST64
781 #  define PRIdLEAST64 PRId64
782 # endif
783 # if !defined PRIiLEAST64 || 0
784 #  undef PRIiLEAST64
785 #  define PRIiLEAST64 PRIi64
786 # endif
787 #endif
788 #ifdef UINT64_MAX
789 # if !defined PRIoLEAST64 || 0
790 #  undef PRIoLEAST64
791 #  define PRIoLEAST64 PRIo64
792 # endif
793 # if !defined PRIuLEAST64 || 0
794 #  undef PRIuLEAST64
795 #  define PRIuLEAST64 PRIu64
796 # endif
797 # if !defined PRIxLEAST64 || 0
798 #  undef PRIxLEAST64
799 #  define PRIxLEAST64 PRIx64
800 # endif
801 # if !defined PRIXLEAST64 || 0
802 #  undef PRIXLEAST64
803 #  define PRIXLEAST64 PRIX64
804 # endif
805 #endif
806 
807 #if !defined PRIdFAST8 || 0
808 # undef PRIdFAST8
809 # if INT_FAST8_MAX > INT32_MAX
810 #  define PRIdFAST8 PRId64
811 # else
812 #  define PRIdFAST8 "d"
813 # endif
814 #endif
815 #if !defined PRIiFAST8 || 0
816 # undef PRIiFAST8
817 # if INT_FAST8_MAX > INT32_MAX
818 #  define PRIiFAST8 PRIi64
819 # else
820 #  define PRIiFAST8 "i"
821 # endif
822 #endif
823 #if !defined PRIoFAST8 || 0
824 # undef PRIoFAST8
825 # if UINT_FAST8_MAX > UINT32_MAX
826 #  define PRIoFAST8 PRIo64
827 # else
828 #  define PRIoFAST8 "o"
829 # endif
830 #endif
831 #if !defined PRIuFAST8 || 0
832 # undef PRIuFAST8
833 # if UINT_FAST8_MAX > UINT32_MAX
834 #  define PRIuFAST8 PRIu64
835 # else
836 #  define PRIuFAST8 "u"
837 # endif
838 #endif
839 #if !defined PRIxFAST8 || 0
840 # undef PRIxFAST8
841 # if UINT_FAST8_MAX > UINT32_MAX
842 #  define PRIxFAST8 PRIx64
843 # else
844 #  define PRIxFAST8 "x"
845 # endif
846 #endif
847 #if !defined PRIXFAST8 || 0
848 # undef PRIXFAST8
849 # if UINT_FAST8_MAX > UINT32_MAX
850 #  define PRIXFAST8 PRIX64
851 # else
852 #  define PRIXFAST8 "X"
853 # endif
854 #endif
855 #if !defined PRIdFAST16 || 0
856 # undef PRIdFAST16
857 # if INT_FAST16_MAX > INT32_MAX
858 #  define PRIdFAST16 PRId64
859 # else
860 #  define PRIdFAST16 "d"
861 # endif
862 #endif
863 #if !defined PRIiFAST16 || 0
864 # undef PRIiFAST16
865 # if INT_FAST16_MAX > INT32_MAX
866 #  define PRIiFAST16 PRIi64
867 # else
868 #  define PRIiFAST16 "i"
869 # endif
870 #endif
871 #if !defined PRIoFAST16 || 0
872 # undef PRIoFAST16
873 # if UINT_FAST16_MAX > UINT32_MAX
874 #  define PRIoFAST16 PRIo64
875 # else
876 #  define PRIoFAST16 "o"
877 # endif
878 #endif
879 #if !defined PRIuFAST16 || 0
880 # undef PRIuFAST16
881 # if UINT_FAST16_MAX > UINT32_MAX
882 #  define PRIuFAST16 PRIu64
883 # else
884 #  define PRIuFAST16 "u"
885 # endif
886 #endif
887 #if !defined PRIxFAST16 || 0
888 # undef PRIxFAST16
889 # if UINT_FAST16_MAX > UINT32_MAX
890 #  define PRIxFAST16 PRIx64
891 # else
892 #  define PRIxFAST16 "x"
893 # endif
894 #endif
895 #if !defined PRIXFAST16 || 0
896 # undef PRIXFAST16
897 # if UINT_FAST16_MAX > UINT32_MAX
898 #  define PRIXFAST16 PRIX64
899 # else
900 #  define PRIXFAST16 "X"
901 # endif
902 #endif
903 #if !defined PRIdFAST32 || 0
904 # undef PRIdFAST32
905 # if INT_FAST32_MAX > INT32_MAX
906 #  define PRIdFAST32 PRId64
907 # else
908 #  define PRIdFAST32 "d"
909 # endif
910 #endif
911 #if !defined PRIiFAST32 || 0
912 # undef PRIiFAST32
913 # if INT_FAST32_MAX > INT32_MAX
914 #  define PRIiFAST32 PRIi64
915 # else
916 #  define PRIiFAST32 "i"
917 # endif
918 #endif
919 #if !defined PRIoFAST32 || 0
920 # undef PRIoFAST32
921 # if UINT_FAST32_MAX > UINT32_MAX
922 #  define PRIoFAST32 PRIo64
923 # else
924 #  define PRIoFAST32 "o"
925 # endif
926 #endif
927 #if !defined PRIuFAST32 || 0
928 # undef PRIuFAST32
929 # if UINT_FAST32_MAX > UINT32_MAX
930 #  define PRIuFAST32 PRIu64
931 # else
932 #  define PRIuFAST32 "u"
933 # endif
934 #endif
935 #if !defined PRIxFAST32 || 0
936 # undef PRIxFAST32
937 # if UINT_FAST32_MAX > UINT32_MAX
938 #  define PRIxFAST32 PRIx64
939 # else
940 #  define PRIxFAST32 "x"
941 # endif
942 #endif
943 #if !defined PRIXFAST32 || 0
944 # undef PRIXFAST32
945 # if UINT_FAST32_MAX > UINT32_MAX
946 #  define PRIXFAST32 PRIX64
947 # else
948 #  define PRIXFAST32 "X"
949 # endif
950 #endif
951 #ifdef INT64_MAX
952 # if !defined PRIdFAST64 || 0
953 #  undef PRIdFAST64
954 #  define PRIdFAST64 PRId64
955 # endif
956 # if !defined PRIiFAST64 || 0
957 #  undef PRIiFAST64
958 #  define PRIiFAST64 PRIi64
959 # endif
960 #endif
961 #ifdef UINT64_MAX
962 # if !defined PRIoFAST64 || 0
963 #  undef PRIoFAST64
964 #  define PRIoFAST64 PRIo64
965 # endif
966 # if !defined PRIuFAST64 || 0
967 #  undef PRIuFAST64
968 #  define PRIuFAST64 PRIu64
969 # endif
970 # if !defined PRIxFAST64 || 0
971 #  undef PRIxFAST64
972 #  define PRIxFAST64 PRIx64
973 # endif
974 # if !defined PRIXFAST64 || 0
975 #  undef PRIXFAST64
976 #  define PRIXFAST64 PRIX64
977 # endif
978 #endif
979 
980 #if !defined PRIdMAX || 0
981 # undef PRIdMAX
982 # if 1
983 #  define PRIdMAX PRId64
984 # else
985 #  define PRIdMAX "ld"
986 # endif
987 #endif
988 #if !defined PRIiMAX || 0
989 # undef PRIiMAX
990 # if 1
991 #  define PRIiMAX PRIi64
992 # else
993 #  define PRIiMAX "li"
994 # endif
995 #endif
996 #if !defined PRIoMAX || 0
997 # undef PRIoMAX
998 # if 1
999 #  define PRIoMAX PRIo64
1000 # else
1001 #  define PRIoMAX "lo"
1002 # endif
1003 #endif
1004 #if !defined PRIuMAX || 0
1005 # undef PRIuMAX
1006 # if 1
1007 #  define PRIuMAX PRIu64
1008 # else
1009 #  define PRIuMAX "lu"
1010 # endif
1011 #endif
1012 #if !defined PRIxMAX || 0
1013 # undef PRIxMAX
1014 # if 1
1015 #  define PRIxMAX PRIx64
1016 # else
1017 #  define PRIxMAX "lx"
1018 # endif
1019 #endif
1020 #if !defined PRIXMAX || 0
1021 # undef PRIXMAX
1022 # if 1
1023 #  define PRIXMAX PRIX64
1024 # else
1025 #  define PRIXMAX "lX"
1026 # endif
1027 #endif
1028 
1029 #if !defined PRIdPTR || 0
1030 # undef PRIdPTR
1031 # ifdef INTPTR_MAX
1032 #  define PRIdPTR "l" "d"
1033 # endif
1034 #endif
1035 #if !defined PRIiPTR || 0
1036 # undef PRIiPTR
1037 # ifdef INTPTR_MAX
1038 #  define PRIiPTR "l" "i"
1039 # endif
1040 #endif
1041 #if !defined PRIoPTR || 0
1042 # undef PRIoPTR
1043 # ifdef UINTPTR_MAX
1044 #  define PRIoPTR "l" "o"
1045 # endif
1046 #endif
1047 #if !defined PRIuPTR || 0
1048 # undef PRIuPTR
1049 # ifdef UINTPTR_MAX
1050 #  define PRIuPTR "l" "u"
1051 # endif
1052 #endif
1053 #if !defined PRIxPTR || 0
1054 # undef PRIxPTR
1055 # ifdef UINTPTR_MAX
1056 #  define PRIxPTR "l" "x"
1057 # endif
1058 #endif
1059 #if !defined PRIXPTR || 0
1060 # undef PRIXPTR
1061 # ifdef UINTPTR_MAX
1062 #  define PRIXPTR "l" "X"
1063 # endif
1064 #endif
1065 
1066 #if !defined SCNd8 || 0
1067 # undef SCNd8
1068 # ifdef INT8_MAX
1069 #  define SCNd8 "hhd"
1070 # endif
1071 #endif
1072 #if !defined SCNi8 || 0
1073 # undef SCNi8
1074 # ifdef INT8_MAX
1075 #  define SCNi8 "hhi"
1076 # endif
1077 #endif
1078 #if !defined SCNo8 || 0
1079 # undef SCNo8
1080 # ifdef UINT8_MAX
1081 #  define SCNo8 "hho"
1082 # endif
1083 #endif
1084 #if !defined SCNu8 || 0
1085 # undef SCNu8
1086 # ifdef UINT8_MAX
1087 #  define SCNu8 "hhu"
1088 # endif
1089 #endif
1090 #if !defined SCNx8 || 0
1091 # undef SCNx8
1092 # ifdef UINT8_MAX
1093 #  define SCNx8 "hhx"
1094 # endif
1095 #endif
1096 #if !defined SCNd16 || 0
1097 # undef SCNd16
1098 # ifdef INT16_MAX
1099 #  define SCNd16 "hd"
1100 # endif
1101 #endif
1102 #if !defined SCNi16 || 0
1103 # undef SCNi16
1104 # ifdef INT16_MAX
1105 #  define SCNi16 "hi"
1106 # endif
1107 #endif
1108 #if !defined SCNo16 || 0
1109 # undef SCNo16
1110 # ifdef UINT16_MAX
1111 #  define SCNo16 "ho"
1112 # endif
1113 #endif
1114 #if !defined SCNu16 || 0
1115 # undef SCNu16
1116 # ifdef UINT16_MAX
1117 #  define SCNu16 "hu"
1118 # endif
1119 #endif
1120 #if !defined SCNx16 || 0
1121 # undef SCNx16
1122 # ifdef UINT16_MAX
1123 #  define SCNx16 "hx"
1124 # endif
1125 #endif
1126 #if !defined SCNd32 || 0
1127 # undef SCNd32
1128 # ifdef INT32_MAX
1129 #  define SCNd32 "d"
1130 # endif
1131 #endif
1132 #if !defined SCNi32 || 0
1133 # undef SCNi32
1134 # ifdef INT32_MAX
1135 #  define SCNi32 "i"
1136 # endif
1137 #endif
1138 #if !defined SCNo32 || 0
1139 # undef SCNo32
1140 # ifdef UINT32_MAX
1141 #  define SCNo32 "o"
1142 # endif
1143 #endif
1144 #if !defined SCNu32 || 0
1145 # undef SCNu32
1146 # ifdef UINT32_MAX
1147 #  define SCNu32 "u"
1148 # endif
1149 #endif
1150 #if !defined SCNx32 || 0
1151 # undef SCNx32
1152 # ifdef UINT32_MAX
1153 #  define SCNx32 "x"
1154 # endif
1155 #endif
1156 #ifdef INT64_MAX
1157 # if (0 ? defined _LP64 : 1)
1158 #  define _SCN64_PREFIX "l"
1159 # elif defined _MSC_VER || defined __MINGW32__
1160 #  define _SCN64_PREFIX "I64"
1161 # elif LONG_MAX >> 30 == 1
1162 #  define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
1163 # endif
1164 # if !defined SCNd64 || 0
1165 #  undef SCNd64
1166 #  define SCNd64 _SCN64_PREFIX "d"
1167 # endif
1168 # if !defined SCNi64 || 0
1169 #  undef SCNi64
1170 #  define SCNi64 _SCN64_PREFIX "i"
1171 # endif
1172 #endif
1173 #ifdef UINT64_MAX
1174 # if (0 ? defined _LP64 : 1)
1175 #  define _SCNu64_PREFIX "l"
1176 # elif defined _MSC_VER || defined __MINGW32__
1177 #  define _SCNu64_PREFIX "I64"
1178 # elif ULONG_MAX >> 31 == 1
1179 #  define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
1180 # endif
1181 # if !defined SCNo64 || 0
1182 #  undef SCNo64
1183 #  define SCNo64 _SCNu64_PREFIX "o"
1184 # endif
1185 # if !defined SCNu64 || 0
1186 #  undef SCNu64
1187 #  define SCNu64 _SCNu64_PREFIX "u"
1188 # endif
1189 # if !defined SCNx64 || 0
1190 #  undef SCNx64
1191 #  define SCNx64 _SCNu64_PREFIX "x"
1192 # endif
1193 #endif
1194 
1195 #if !defined SCNdLEAST8 || 0
1196 # undef SCNdLEAST8
1197 # define SCNdLEAST8 "hhd"
1198 #endif
1199 #if !defined SCNiLEAST8 || 0
1200 # undef SCNiLEAST8
1201 # define SCNiLEAST8 "hhi"
1202 #endif
1203 #if !defined SCNoLEAST8 || 0
1204 # undef SCNoLEAST8
1205 # define SCNoLEAST8 "hho"
1206 #endif
1207 #if !defined SCNuLEAST8 || 0
1208 # undef SCNuLEAST8
1209 # define SCNuLEAST8 "hhu"
1210 #endif
1211 #if !defined SCNxLEAST8 || 0
1212 # undef SCNxLEAST8
1213 # define SCNxLEAST8 "hhx"
1214 #endif
1215 #if !defined SCNdLEAST16 || 0
1216 # undef SCNdLEAST16
1217 # define SCNdLEAST16 "hd"
1218 #endif
1219 #if !defined SCNiLEAST16 || 0
1220 # undef SCNiLEAST16
1221 # define SCNiLEAST16 "hi"
1222 #endif
1223 #if !defined SCNoLEAST16 || 0
1224 # undef SCNoLEAST16
1225 # define SCNoLEAST16 "ho"
1226 #endif
1227 #if !defined SCNuLEAST16 || 0
1228 # undef SCNuLEAST16
1229 # define SCNuLEAST16 "hu"
1230 #endif
1231 #if !defined SCNxLEAST16 || 0
1232 # undef SCNxLEAST16
1233 # define SCNxLEAST16 "hx"
1234 #endif
1235 #if !defined SCNdLEAST32 || 0
1236 # undef SCNdLEAST32
1237 # define SCNdLEAST32 "d"
1238 #endif
1239 #if !defined SCNiLEAST32 || 0
1240 # undef SCNiLEAST32
1241 # define SCNiLEAST32 "i"
1242 #endif
1243 #if !defined SCNoLEAST32 || 0
1244 # undef SCNoLEAST32
1245 # define SCNoLEAST32 "o"
1246 #endif
1247 #if !defined SCNuLEAST32 || 0
1248 # undef SCNuLEAST32
1249 # define SCNuLEAST32 "u"
1250 #endif
1251 #if !defined SCNxLEAST32 || 0
1252 # undef SCNxLEAST32
1253 # define SCNxLEAST32 "x"
1254 #endif
1255 #ifdef INT64_MAX
1256 # if !defined SCNdLEAST64 || 0
1257 #  undef SCNdLEAST64
1258 #  define SCNdLEAST64 SCNd64
1259 # endif
1260 # if !defined SCNiLEAST64 || 0
1261 #  undef SCNiLEAST64
1262 #  define SCNiLEAST64 SCNi64
1263 # endif
1264 #endif
1265 #ifdef UINT64_MAX
1266 # if !defined SCNoLEAST64 || 0
1267 #  undef SCNoLEAST64
1268 #  define SCNoLEAST64 SCNo64
1269 # endif
1270 # if !defined SCNuLEAST64 || 0
1271 #  undef SCNuLEAST64
1272 #  define SCNuLEAST64 SCNu64
1273 # endif
1274 # if !defined SCNxLEAST64 || 0
1275 #  undef SCNxLEAST64
1276 #  define SCNxLEAST64 SCNx64
1277 # endif
1278 #endif
1279 
1280 #if !defined SCNdFAST8 || 0
1281 # undef SCNdFAST8
1282 # if INT_FAST8_MAX > INT32_MAX
1283 #  define SCNdFAST8 SCNd64
1284 # elif INT_FAST8_MAX == 0x7fff
1285 #  define SCNdFAST8 "hd"
1286 # elif INT_FAST8_MAX == 0x7f
1287 #  define SCNdFAST8 "hhd"
1288 # else
1289 #  define SCNdFAST8 "d"
1290 # endif
1291 #endif
1292 #if !defined SCNiFAST8 || 0
1293 # undef SCNiFAST8
1294 # if INT_FAST8_MAX > INT32_MAX
1295 #  define SCNiFAST8 SCNi64
1296 # elif INT_FAST8_MAX == 0x7fff
1297 #  define SCNiFAST8 "hi"
1298 # elif INT_FAST8_MAX == 0x7f
1299 #  define SCNiFAST8 "hhi"
1300 # else
1301 #  define SCNiFAST8 "i"
1302 # endif
1303 #endif
1304 #if !defined SCNoFAST8 || 0
1305 # undef SCNoFAST8
1306 # if UINT_FAST8_MAX > UINT32_MAX
1307 #  define SCNoFAST8 SCNo64
1308 # elif UINT_FAST8_MAX == 0xffff
1309 #  define SCNoFAST8 "ho"
1310 # elif UINT_FAST8_MAX == 0xff
1311 #  define SCNoFAST8 "hho"
1312 # else
1313 #  define SCNoFAST8 "o"
1314 # endif
1315 #endif
1316 #if !defined SCNuFAST8 || 0
1317 # undef SCNuFAST8
1318 # if UINT_FAST8_MAX > UINT32_MAX
1319 #  define SCNuFAST8 SCNu64
1320 # elif UINT_FAST8_MAX == 0xffff
1321 #  define SCNuFAST8 "hu"
1322 # elif UINT_FAST8_MAX == 0xff
1323 #  define SCNuFAST8 "hhu"
1324 # else
1325 #  define SCNuFAST8 "u"
1326 # endif
1327 #endif
1328 #if !defined SCNxFAST8 || 0
1329 # undef SCNxFAST8
1330 # if UINT_FAST8_MAX > UINT32_MAX
1331 #  define SCNxFAST8 SCNx64
1332 # elif UINT_FAST8_MAX == 0xffff
1333 #  define SCNxFAST8 "hx"
1334 # elif UINT_FAST8_MAX == 0xff
1335 #  define SCNxFAST8 "hhx"
1336 # else
1337 #  define SCNxFAST8 "x"
1338 # endif
1339 #endif
1340 #if !defined SCNdFAST16 || 0
1341 # undef SCNdFAST16
1342 # if INT_FAST16_MAX > INT32_MAX
1343 #  define SCNdFAST16 SCNd64
1344 # elif INT_FAST16_MAX == 0x7fff
1345 #  define SCNdFAST16 "hd"
1346 # else
1347 #  define SCNdFAST16 "d"
1348 # endif
1349 #endif
1350 #if !defined SCNiFAST16 || 0
1351 # undef SCNiFAST16
1352 # if INT_FAST16_MAX > INT32_MAX
1353 #  define SCNiFAST16 SCNi64
1354 # elif INT_FAST16_MAX == 0x7fff
1355 #  define SCNiFAST16 "hi"
1356 # else
1357 #  define SCNiFAST16 "i"
1358 # endif
1359 #endif
1360 #if !defined SCNoFAST16 || 0
1361 # undef SCNoFAST16
1362 # if UINT_FAST16_MAX > UINT32_MAX
1363 #  define SCNoFAST16 SCNo64
1364 # elif UINT_FAST16_MAX == 0xffff
1365 #  define SCNoFAST16 "ho"
1366 # else
1367 #  define SCNoFAST16 "o"
1368 # endif
1369 #endif
1370 #if !defined SCNuFAST16 || 0
1371 # undef SCNuFAST16
1372 # if UINT_FAST16_MAX > UINT32_MAX
1373 #  define SCNuFAST16 SCNu64
1374 # elif UINT_FAST16_MAX == 0xffff
1375 #  define SCNuFAST16 "hu"
1376 # else
1377 #  define SCNuFAST16 "u"
1378 # endif
1379 #endif
1380 #if !defined SCNxFAST16 || 0
1381 # undef SCNxFAST16
1382 # if UINT_FAST16_MAX > UINT32_MAX
1383 #  define SCNxFAST16 SCNx64
1384 # elif UINT_FAST16_MAX == 0xffff
1385 #  define SCNxFAST16 "hx"
1386 # else
1387 #  define SCNxFAST16 "x"
1388 # endif
1389 #endif
1390 #if !defined SCNdFAST32 || 0
1391 # undef SCNdFAST32
1392 # if INT_FAST32_MAX > INT32_MAX
1393 #  define SCNdFAST32 SCNd64
1394 # else
1395 #  define SCNdFAST32 "d"
1396 # endif
1397 #endif
1398 #if !defined SCNiFAST32 || 0
1399 # undef SCNiFAST32
1400 # if INT_FAST32_MAX > INT32_MAX
1401 #  define SCNiFAST32 SCNi64
1402 # else
1403 #  define SCNiFAST32 "i"
1404 # endif
1405 #endif
1406 #if !defined SCNoFAST32 || 0
1407 # undef SCNoFAST32
1408 # if UINT_FAST32_MAX > UINT32_MAX
1409 #  define SCNoFAST32 SCNo64
1410 # else
1411 #  define SCNoFAST32 "o"
1412 # endif
1413 #endif
1414 #if !defined SCNuFAST32 || 0
1415 # undef SCNuFAST32
1416 # if UINT_FAST32_MAX > UINT32_MAX
1417 #  define SCNuFAST32 SCNu64
1418 # else
1419 #  define SCNuFAST32 "u"
1420 # endif
1421 #endif
1422 #if !defined SCNxFAST32 || 0
1423 # undef SCNxFAST32
1424 # if UINT_FAST32_MAX > UINT32_MAX
1425 #  define SCNxFAST32 SCNx64
1426 # else
1427 #  define SCNxFAST32 "x"
1428 # endif
1429 #endif
1430 #ifdef INT64_MAX
1431 # if !defined SCNdFAST64 || 0
1432 #  undef SCNdFAST64
1433 #  define SCNdFAST64 SCNd64
1434 # endif
1435 # if !defined SCNiFAST64 || 0
1436 #  undef SCNiFAST64
1437 #  define SCNiFAST64 SCNi64
1438 # endif
1439 #endif
1440 #ifdef UINT64_MAX
1441 # if !defined SCNoFAST64 || 0
1442 #  undef SCNoFAST64
1443 #  define SCNoFAST64 SCNo64
1444 # endif
1445 # if !defined SCNuFAST64 || 0
1446 #  undef SCNuFAST64
1447 #  define SCNuFAST64 SCNu64
1448 # endif
1449 # if !defined SCNxFAST64 || 0
1450 #  undef SCNxFAST64
1451 #  define SCNxFAST64 SCNx64
1452 # endif
1453 #endif
1454 
1455 #if !defined SCNdMAX || 0
1456 # undef SCNdMAX
1457 # if 1
1458 #  define SCNdMAX SCNd64
1459 # else
1460 #  define SCNdMAX "ld"
1461 # endif
1462 #endif
1463 #if !defined SCNiMAX || 0
1464 # undef SCNiMAX
1465 # if 1
1466 #  define SCNiMAX SCNi64
1467 # else
1468 #  define SCNiMAX "li"
1469 # endif
1470 #endif
1471 #if !defined SCNoMAX || 0
1472 # undef SCNoMAX
1473 # if 1
1474 #  define SCNoMAX SCNo64
1475 # else
1476 #  define SCNoMAX "lo"
1477 # endif
1478 #endif
1479 #if !defined SCNuMAX || 0
1480 # undef SCNuMAX
1481 # if 1
1482 #  define SCNuMAX SCNu64
1483 # else
1484 #  define SCNuMAX "lu"
1485 # endif
1486 #endif
1487 #if !defined SCNxMAX || 0
1488 # undef SCNxMAX
1489 # if 1
1490 #  define SCNxMAX SCNx64
1491 # else
1492 #  define SCNxMAX "lx"
1493 # endif
1494 #endif
1495 
1496 #if !defined SCNdPTR || 0
1497 # undef SCNdPTR
1498 # ifdef INTPTR_MAX
1499 #  define SCNdPTR "l" "d"
1500 # endif
1501 #endif
1502 #if !defined SCNiPTR || 0
1503 # undef SCNiPTR
1504 # ifdef INTPTR_MAX
1505 #  define SCNiPTR "l" "i"
1506 # endif
1507 #endif
1508 #if !defined SCNoPTR || 0
1509 # undef SCNoPTR
1510 # ifdef UINTPTR_MAX
1511 #  define SCNoPTR "l" "o"
1512 # endif
1513 #endif
1514 #if !defined SCNuPTR || 0
1515 # undef SCNuPTR
1516 # ifdef UINTPTR_MAX
1517 #  define SCNuPTR "l" "u"
1518 # endif
1519 #endif
1520 #if !defined SCNxPTR || 0
1521 # undef SCNxPTR
1522 # ifdef UINTPTR_MAX
1523 #  define SCNxPTR "l" "x"
1524 # endif
1525 #endif
1526 
1527 /* 7.8.2 Functions for greatest-width integer types */
1528 
1529 #ifdef __cplusplus
1530 extern "C" {
1531 #endif
1532 
1533 #if 0
1534 # if !1
1535 extern intmax_t imaxabs (intmax_t);
1536 # endif
1537 #elif defined GNULIB_POSIXCHECK
1538 # undef imaxabs
1539 # if HAVE_RAW_DECL_IMAXABS
1540 _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
1541                  "use gnulib module imaxabs for portability");
1542 # endif
1543 #endif
1544 
1545 #if 0
1546 # if !1
1547 #  if !GNULIB_defined_imaxdiv_t
1548 typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
1549 #   define GNULIB_defined_imaxdiv_t 1
1550 #  endif
1551 # endif
1552 # if !1
1553 extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
1554 # endif
1555 #elif defined GNULIB_POSIXCHECK
1556 # undef imaxdiv
1557 # if HAVE_RAW_DECL_IMAXDIV
1558 _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
1559                  "use gnulib module imaxdiv for portability");
1560 # endif
1561 #endif
1562 
1563 #if 1
1564 # if 0
1565 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1566 #   undef strtoimax
1567 #   define strtoimax rpl_strtoimax
1568 #  endif
1569 _GL_FUNCDECL_RPL (strtoimax, intmax_t,
1570                   (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1571 _GL_CXXALIAS_RPL (strtoimax, intmax_t, (const char *, char **, int));
1572 # else
1573 #  if !1
1574 #   undef strtoimax
1575 _GL_FUNCDECL_SYS (strtoimax, intmax_t,
1576                   (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1577 #  endif
1578 _GL_CXXALIAS_SYS (strtoimax, intmax_t, (const char *, char **, int));
1579 # endif
1580 _GL_CXXALIASWARN (strtoimax);
1581 #elif defined GNULIB_POSIXCHECK
1582 # undef strtoimax
1583 # if HAVE_RAW_DECL_STRTOIMAX
1584 _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
1585                  "use gnulib module strtoimax for portability");
1586 # endif
1587 #endif
1588 
1589 #if 1
1590 # if 0
1591 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1592 #   undef strtoumax
1593 #   define strtoumax rpl_strtoumax
1594 #  endif
1595 _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
1596                   (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1597 _GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int));
1598 # else
1599 #  if !1
1600 #   undef strtoumax
1601 _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
1602                   (const char *, char **, int) _GL_ARG_NONNULL ((1)));
1603 #  endif
1604 _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int));
1605 # endif
1606 _GL_CXXALIASWARN (strtoumax);
1607 #elif defined GNULIB_POSIXCHECK
1608 # undef strtoumax
1609 # if HAVE_RAW_DECL_STRTOUMAX
1610 _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
1611                  "use gnulib module strtoumax for portability");
1612 # endif
1613 #endif
1614 
1615 /* Don't bother defining or declaring wcstoimax and wcstoumax, since
1616    wide-character functions like this are hardly ever useful.  */
1617 
1618 #ifdef __cplusplus
1619 }
1620 #endif
1621 
1622 #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
1623