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