(root)/
tar-1.35/
gnu/
inttypes.in.h
       1  /* Copyright (C) 2006-2023 Free Software Foundation, Inc.
       2     Written by Paul Eggert, Bruno Haible, Derek Price.
       3     This file is part of gnulib.
       4  
       5     This file is free software: you can redistribute it and/or modify
       6     it under the terms of the GNU Lesser General Public License as
       7     published by the Free Software Foundation; either version 2.1 of the
       8     License, or (at your option) any later version.
       9  
      10     This file is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU Lesser General Public License for more details.
      14  
      15     You should have received a copy of the GNU Lesser General Public License
      16     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      17  
      18  /*
      19   * ISO C 99 <inttypes.h> for platforms that lack it.
      20   * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/inttypes.h.html>
      21   */
      22  
      23  #if __GNUC__ >= 3
      24  @PRAGMA_SYSTEM_HEADER@
      25  #endif
      26  @PRAGMA_COLUMNS@
      27  
      28  /* Include the original <inttypes.h> if it exists, and if this file
      29     has not been included yet or if this file includes gnulib stdint.h
      30     which in turn includes this file.
      31     The include_next requires a split double-inclusion guard.  */
      32  #if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
      33  # if @HAVE_INTTYPES_H@
      34  
      35     /* Some pre-C++11 <stdint.h> implementations need this.  */
      36  #  if defined __cplusplus && ! defined __STDC_FORMAT_MACROS
      37  #   define __STDC_FORMAT_MACROS 1
      38  #  endif
      39  
      40  #  @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
      41  
      42  #  define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
      43  # endif
      44  #endif
      45  
      46  #if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
      47  #define INTTYPES_H
      48  
      49  /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
      50  #if !_GL_CONFIG_H_INCLUDED
      51   #error "Please include config.h first."
      52  #endif
      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  
      72  /* The definition of _GL_ARG_NONNULL is copied here.  */
      73  
      74  /* The definition of _GL_WARN_ON_USE is copied here.  */
      75  
      76  /* 7.8.1 Macros for format specifiers */
      77  
      78  #if defined _TNS_R_TARGET
      79     /* Tandem NonStop R series and compatible platforms released before
      80        July 2005 support %Ld but not %lld.  */
      81  # define _LONG_LONG_FORMAT_PREFIX "L"
      82  #else
      83  # define _LONG_LONG_FORMAT_PREFIX "ll"
      84  #endif
      85  
      86  #if !defined PRId8
      87  # ifdef INT8_MAX
      88  #  define PRId8 "d"
      89  # endif
      90  #endif
      91  #if !defined PRIi8
      92  # ifdef INT8_MAX
      93  #  define PRIi8 "i"
      94  # endif
      95  #endif
      96  #if !defined PRIo8
      97  # ifdef UINT8_MAX
      98  #  define PRIo8 "o"
      99  # endif
     100  #endif
     101  #if !defined PRIu8
     102  # ifdef UINT8_MAX
     103  #  define PRIu8 "u"
     104  # endif
     105  #endif
     106  #if !defined PRIx8
     107  # ifdef UINT8_MAX
     108  #  define PRIx8 "x"
     109  # endif
     110  #endif
     111  #if !defined PRIX8
     112  # ifdef UINT8_MAX
     113  #  define PRIX8 "X"
     114  # endif
     115  #endif
     116  #if !defined PRId16
     117  # ifdef INT16_MAX
     118  #  define PRId16 "d"
     119  # endif
     120  #endif
     121  #if !defined PRIi16
     122  # ifdef INT16_MAX
     123  #  define PRIi16 "i"
     124  # endif
     125  #endif
     126  #if !defined PRIo16
     127  # ifdef UINT16_MAX
     128  #  define PRIo16 "o"
     129  # endif
     130  #endif
     131  #if !defined PRIu16
     132  # ifdef UINT16_MAX
     133  #  define PRIu16 "u"
     134  # endif
     135  #endif
     136  #if !defined PRIx16
     137  # ifdef UINT16_MAX
     138  #  define PRIx16 "x"
     139  # endif
     140  #endif
     141  #if !defined PRIX16
     142  # ifdef UINT16_MAX
     143  #  define PRIX16 "X"
     144  # endif
     145  #endif
     146  #if !defined PRId32
     147  # ifdef INT32_MAX
     148  #  define PRId32 "d"
     149  # endif
     150  #endif
     151  #if !defined PRIi32
     152  # ifdef INT32_MAX
     153  #  define PRIi32 "i"
     154  # endif
     155  #endif
     156  #if !defined PRIo32
     157  # ifdef UINT32_MAX
     158  #  define PRIo32 "o"
     159  # endif
     160  #endif
     161  #if !defined PRIu32
     162  # ifdef UINT32_MAX
     163  #  define PRIu32 "u"
     164  # endif
     165  #endif
     166  #if !defined PRIx32
     167  # ifdef UINT32_MAX
     168  #  define PRIx32 "x"
     169  # endif
     170  #endif
     171  #if !defined PRIX32
     172  # ifdef UINT32_MAX
     173  #  define PRIX32 "X"
     174  # endif
     175  #endif
     176  #ifdef INT64_MAX
     177  # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
     178  #  define _PRI64_PREFIX "l"
     179  # elif defined _MSC_VER || defined __MINGW32__
     180  #  define _PRI64_PREFIX "I64"
     181  # elif LONG_MAX >> 30 == 1
     182  #  define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
     183  # endif
     184  # if !defined PRId64
     185  #  define PRId64 _PRI64_PREFIX "d"
     186  # endif
     187  # if !defined PRIi64
     188  #  define PRIi64 _PRI64_PREFIX "i"
     189  # endif
     190  #endif
     191  #ifdef UINT64_MAX
     192  # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
     193  #  define _PRIu64_PREFIX "l"
     194  # elif defined _MSC_VER || defined __MINGW32__
     195  #  define _PRIu64_PREFIX "I64"
     196  # elif ULONG_MAX >> 31 == 1
     197  #  define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
     198  # endif
     199  # if !defined PRIo64
     200  #  define PRIo64 _PRIu64_PREFIX "o"
     201  # endif
     202  # if !defined PRIu64
     203  #  define PRIu64 _PRIu64_PREFIX "u"
     204  # endif
     205  # if !defined PRIx64
     206  #  define PRIx64 _PRIu64_PREFIX "x"
     207  # endif
     208  # if !defined PRIX64
     209  #  define PRIX64 _PRIu64_PREFIX "X"
     210  # endif
     211  #endif
     212  
     213  #if !defined PRIdLEAST8
     214  # define PRIdLEAST8 "d"
     215  #endif
     216  #if !defined PRIiLEAST8
     217  # define PRIiLEAST8 "i"
     218  #endif
     219  #if !defined PRIoLEAST8
     220  # define PRIoLEAST8 "o"
     221  #endif
     222  #if !defined PRIuLEAST8
     223  # define PRIuLEAST8 "u"
     224  #endif
     225  #if !defined PRIxLEAST8
     226  # define PRIxLEAST8 "x"
     227  #endif
     228  #if !defined PRIXLEAST8
     229  # define PRIXLEAST8 "X"
     230  #endif
     231  #if !defined PRIdLEAST16
     232  # define PRIdLEAST16 "d"
     233  #endif
     234  #if !defined PRIiLEAST16
     235  # define PRIiLEAST16 "i"
     236  #endif
     237  #if !defined PRIoLEAST16
     238  # define PRIoLEAST16 "o"
     239  #endif
     240  #if !defined PRIuLEAST16
     241  # define PRIuLEAST16 "u"
     242  #endif
     243  #if !defined PRIxLEAST16
     244  # define PRIxLEAST16 "x"
     245  #endif
     246  #if !defined PRIXLEAST16
     247  # define PRIXLEAST16 "X"
     248  #endif
     249  #if !defined PRIdLEAST32
     250  # define PRIdLEAST32 "d"
     251  #endif
     252  #if !defined PRIiLEAST32
     253  # define PRIiLEAST32 "i"
     254  #endif
     255  #if !defined PRIoLEAST32
     256  # define PRIoLEAST32 "o"
     257  #endif
     258  #if !defined PRIuLEAST32
     259  # define PRIuLEAST32 "u"
     260  #endif
     261  #if !defined PRIxLEAST32
     262  # define PRIxLEAST32 "x"
     263  #endif
     264  #if !defined PRIXLEAST32
     265  # define PRIXLEAST32 "X"
     266  #endif
     267  #ifdef INT64_MAX
     268  # if !defined PRIdLEAST64
     269  #  define PRIdLEAST64 PRId64
     270  # endif
     271  # if !defined PRIiLEAST64
     272  #  define PRIiLEAST64 PRIi64
     273  # endif
     274  #endif
     275  #ifdef UINT64_MAX
     276  # if !defined PRIoLEAST64
     277  #  define PRIoLEAST64 PRIo64
     278  # endif
     279  # if !defined PRIuLEAST64
     280  #  define PRIuLEAST64 PRIu64
     281  # endif
     282  # if !defined PRIxLEAST64
     283  #  define PRIxLEAST64 PRIx64
     284  # endif
     285  # if !defined PRIXLEAST64
     286  #  define PRIXLEAST64 PRIX64
     287  # endif
     288  #endif
     289  
     290  #if !defined PRIdFAST8
     291  # if INT_FAST8_MAX > INT32_MAX
     292  #  define PRIdFAST8 PRId64
     293  # else
     294  #  define PRIdFAST8 "d"
     295  # endif
     296  #endif
     297  #if !defined PRIiFAST8
     298  # if INT_FAST8_MAX > INT32_MAX
     299  #  define PRIiFAST8 PRIi64
     300  # else
     301  #  define PRIiFAST8 "i"
     302  # endif
     303  #endif
     304  #if !defined PRIoFAST8
     305  # if UINT_FAST8_MAX > UINT32_MAX
     306  #  define PRIoFAST8 PRIo64
     307  # else
     308  #  define PRIoFAST8 "o"
     309  # endif
     310  #endif
     311  #if !defined PRIuFAST8
     312  # if UINT_FAST8_MAX > UINT32_MAX
     313  #  define PRIuFAST8 PRIu64
     314  # else
     315  #  define PRIuFAST8 "u"
     316  # endif
     317  #endif
     318  #if !defined PRIxFAST8
     319  # if UINT_FAST8_MAX > UINT32_MAX
     320  #  define PRIxFAST8 PRIx64
     321  # else
     322  #  define PRIxFAST8 "x"
     323  # endif
     324  #endif
     325  #if !defined PRIXFAST8
     326  # if UINT_FAST8_MAX > UINT32_MAX
     327  #  define PRIXFAST8 PRIX64
     328  # else
     329  #  define PRIXFAST8 "X"
     330  # endif
     331  #endif
     332  #if !defined PRIdFAST16
     333  # if INT_FAST16_MAX > INT32_MAX
     334  #  define PRIdFAST16 PRId64
     335  # else
     336  #  define PRIdFAST16 "d"
     337  # endif
     338  #endif
     339  #if !defined PRIiFAST16
     340  # if INT_FAST16_MAX > INT32_MAX
     341  #  define PRIiFAST16 PRIi64
     342  # else
     343  #  define PRIiFAST16 "i"
     344  # endif
     345  #endif
     346  #if !defined PRIoFAST16
     347  # if UINT_FAST16_MAX > UINT32_MAX
     348  #  define PRIoFAST16 PRIo64
     349  # else
     350  #  define PRIoFAST16 "o"
     351  # endif
     352  #endif
     353  #if !defined PRIuFAST16
     354  # if UINT_FAST16_MAX > UINT32_MAX
     355  #  define PRIuFAST16 PRIu64
     356  # else
     357  #  define PRIuFAST16 "u"
     358  # endif
     359  #endif
     360  #if !defined PRIxFAST16
     361  # if UINT_FAST16_MAX > UINT32_MAX
     362  #  define PRIxFAST16 PRIx64
     363  # else
     364  #  define PRIxFAST16 "x"
     365  # endif
     366  #endif
     367  #if !defined PRIXFAST16
     368  # if UINT_FAST16_MAX > UINT32_MAX
     369  #  define PRIXFAST16 PRIX64
     370  # else
     371  #  define PRIXFAST16 "X"
     372  # endif
     373  #endif
     374  #if !defined PRIdFAST32
     375  # if INT_FAST32_MAX > INT32_MAX
     376  #  define PRIdFAST32 PRId64
     377  # else
     378  #  define PRIdFAST32 "d"
     379  # endif
     380  #endif
     381  #if !defined PRIiFAST32
     382  # if INT_FAST32_MAX > INT32_MAX
     383  #  define PRIiFAST32 PRIi64
     384  # else
     385  #  define PRIiFAST32 "i"
     386  # endif
     387  #endif
     388  #if !defined PRIoFAST32
     389  # if UINT_FAST32_MAX > UINT32_MAX
     390  #  define PRIoFAST32 PRIo64
     391  # else
     392  #  define PRIoFAST32 "o"
     393  # endif
     394  #endif
     395  #if !defined PRIuFAST32
     396  # if UINT_FAST32_MAX > UINT32_MAX
     397  #  define PRIuFAST32 PRIu64
     398  # else
     399  #  define PRIuFAST32 "u"
     400  # endif
     401  #endif
     402  #if !defined PRIxFAST32
     403  # if UINT_FAST32_MAX > UINT32_MAX
     404  #  define PRIxFAST32 PRIx64
     405  # else
     406  #  define PRIxFAST32 "x"
     407  # endif
     408  #endif
     409  #if !defined PRIXFAST32
     410  # if UINT_FAST32_MAX > UINT32_MAX
     411  #  define PRIXFAST32 PRIX64
     412  # else
     413  #  define PRIXFAST32 "X"
     414  # endif
     415  #endif
     416  #ifdef INT64_MAX
     417  # if !defined PRIdFAST64
     418  #  define PRIdFAST64 PRId64
     419  # endif
     420  # if !defined PRIiFAST64
     421  #  define PRIiFAST64 PRIi64
     422  # endif
     423  #endif
     424  #ifdef UINT64_MAX
     425  # if !defined PRIoFAST64
     426  #  define PRIoFAST64 PRIo64
     427  # endif
     428  # if !defined PRIuFAST64
     429  #  define PRIuFAST64 PRIu64
     430  # endif
     431  # if !defined PRIxFAST64
     432  #  define PRIxFAST64 PRIx64
     433  # endif
     434  # if !defined PRIXFAST64
     435  #  define PRIXFAST64 PRIX64
     436  # endif
     437  #endif
     438  
     439  #if !defined PRIdMAX
     440  # if @INT32_MAX_LT_INTMAX_MAX@
     441  #  define PRIdMAX PRId64
     442  # else
     443  #  define PRIdMAX "ld"
     444  # endif
     445  #endif
     446  #if !defined PRIiMAX
     447  # if @INT32_MAX_LT_INTMAX_MAX@
     448  #  define PRIiMAX PRIi64
     449  # else
     450  #  define PRIiMAX "li"
     451  # endif
     452  #endif
     453  #if !defined PRIoMAX
     454  # if @UINT32_MAX_LT_UINTMAX_MAX@
     455  #  define PRIoMAX PRIo64
     456  # else
     457  #  define PRIoMAX "lo"
     458  # endif
     459  #endif
     460  #if !defined PRIuMAX
     461  # if @UINT32_MAX_LT_UINTMAX_MAX@
     462  #  define PRIuMAX PRIu64
     463  # else
     464  #  define PRIuMAX "lu"
     465  # endif
     466  #endif
     467  #if !defined PRIxMAX
     468  # if @UINT32_MAX_LT_UINTMAX_MAX@
     469  #  define PRIxMAX PRIx64
     470  # else
     471  #  define PRIxMAX "lx"
     472  # endif
     473  #endif
     474  #if !defined PRIXMAX
     475  # if @UINT32_MAX_LT_UINTMAX_MAX@
     476  #  define PRIXMAX PRIX64
     477  # else
     478  #  define PRIXMAX "lX"
     479  # endif
     480  #endif
     481  
     482  #if !defined PRIdPTR
     483  # ifdef INTPTR_MAX
     484  #  define PRIdPTR @PRIPTR_PREFIX@ "d"
     485  # endif
     486  #endif
     487  #if !defined PRIiPTR
     488  # ifdef INTPTR_MAX
     489  #  define PRIiPTR @PRIPTR_PREFIX@ "i"
     490  # endif
     491  #endif
     492  #if !defined PRIoPTR
     493  # ifdef UINTPTR_MAX
     494  #  define PRIoPTR @PRIPTR_PREFIX@ "o"
     495  # endif
     496  #endif
     497  #if !defined PRIuPTR
     498  # ifdef UINTPTR_MAX
     499  #  define PRIuPTR @PRIPTR_PREFIX@ "u"
     500  # endif
     501  #endif
     502  #if !defined PRIxPTR
     503  # ifdef UINTPTR_MAX
     504  #  define PRIxPTR @PRIPTR_PREFIX@ "x"
     505  # endif
     506  #endif
     507  #if !defined PRIXPTR
     508  # ifdef UINTPTR_MAX
     509  #  define PRIXPTR @PRIPTR_PREFIX@ "X"
     510  # endif
     511  #endif
     512  
     513  #if !defined SCNd8
     514  # ifdef INT8_MAX
     515  #  define SCNd8 "hhd"
     516  # endif
     517  #endif
     518  #if !defined SCNi8
     519  # ifdef INT8_MAX
     520  #  define SCNi8 "hhi"
     521  # endif
     522  #endif
     523  #if !defined SCNo8
     524  # ifdef UINT8_MAX
     525  #  define SCNo8 "hho"
     526  # endif
     527  #endif
     528  #if !defined SCNu8
     529  # ifdef UINT8_MAX
     530  #  define SCNu8 "hhu"
     531  # endif
     532  #endif
     533  #if !defined SCNx8
     534  # ifdef UINT8_MAX
     535  #  define SCNx8 "hhx"
     536  # endif
     537  #endif
     538  #if !defined SCNd16
     539  # ifdef INT16_MAX
     540  #  define SCNd16 "hd"
     541  # endif
     542  #endif
     543  #if !defined SCNi16
     544  # ifdef INT16_MAX
     545  #  define SCNi16 "hi"
     546  # endif
     547  #endif
     548  #if !defined SCNo16
     549  # ifdef UINT16_MAX
     550  #  define SCNo16 "ho"
     551  # endif
     552  #endif
     553  #if !defined SCNu16
     554  # ifdef UINT16_MAX
     555  #  define SCNu16 "hu"
     556  # endif
     557  #endif
     558  #if !defined SCNx16
     559  # ifdef UINT16_MAX
     560  #  define SCNx16 "hx"
     561  # endif
     562  #endif
     563  #if !defined SCNd32
     564  # ifdef INT32_MAX
     565  #  define SCNd32 "d"
     566  # endif
     567  #endif
     568  #if !defined SCNi32
     569  # ifdef INT32_MAX
     570  #  define SCNi32 "i"
     571  # endif
     572  #endif
     573  #if !defined SCNo32
     574  # ifdef UINT32_MAX
     575  #  define SCNo32 "o"
     576  # endif
     577  #endif
     578  #if !defined SCNu32
     579  # ifdef UINT32_MAX
     580  #  define SCNu32 "u"
     581  # endif
     582  #endif
     583  #if !defined SCNx32
     584  # ifdef UINT32_MAX
     585  #  define SCNx32 "x"
     586  # endif
     587  #endif
     588  #ifdef INT64_MAX
     589  # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
     590  #  define _SCN64_PREFIX "l"
     591  # elif defined _MSC_VER || defined __MINGW32__
     592  #  define _SCN64_PREFIX "I64"
     593  # elif LONG_MAX >> 30 == 1
     594  #  define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
     595  # endif
     596  # if !defined SCNd64
     597  #  define SCNd64 _SCN64_PREFIX "d"
     598  # endif
     599  # if !defined SCNi64
     600  #  define SCNi64 _SCN64_PREFIX "i"
     601  # endif
     602  #endif
     603  #ifdef UINT64_MAX
     604  # if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
     605  #  define _SCNu64_PREFIX "l"
     606  # elif defined _MSC_VER || defined __MINGW32__
     607  #  define _SCNu64_PREFIX "I64"
     608  # elif ULONG_MAX >> 31 == 1
     609  #  define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
     610  # endif
     611  # if !defined SCNo64
     612  #  define SCNo64 _SCNu64_PREFIX "o"
     613  # endif
     614  # if !defined SCNu64
     615  #  define SCNu64 _SCNu64_PREFIX "u"
     616  # endif
     617  # if !defined SCNx64
     618  #  define SCNx64 _SCNu64_PREFIX "x"
     619  # endif
     620  #endif
     621  
     622  #if !defined SCNdLEAST8
     623  # define SCNdLEAST8 "hhd"
     624  #endif
     625  #if !defined SCNiLEAST8
     626  # define SCNiLEAST8 "hhi"
     627  #endif
     628  #if !defined SCNoLEAST8
     629  # define SCNoLEAST8 "hho"
     630  #endif
     631  #if !defined SCNuLEAST8
     632  # define SCNuLEAST8 "hhu"
     633  #endif
     634  #if !defined SCNxLEAST8
     635  # define SCNxLEAST8 "hhx"
     636  #endif
     637  #if !defined SCNdLEAST16
     638  # define SCNdLEAST16 "hd"
     639  #endif
     640  #if !defined SCNiLEAST16
     641  # define SCNiLEAST16 "hi"
     642  #endif
     643  #if !defined SCNoLEAST16
     644  # define SCNoLEAST16 "ho"
     645  #endif
     646  #if !defined SCNuLEAST16
     647  # define SCNuLEAST16 "hu"
     648  #endif
     649  #if !defined SCNxLEAST16
     650  # define SCNxLEAST16 "hx"
     651  #endif
     652  #if !defined SCNdLEAST32
     653  # define SCNdLEAST32 "d"
     654  #endif
     655  #if !defined SCNiLEAST32
     656  # define SCNiLEAST32 "i"
     657  #endif
     658  #if !defined SCNoLEAST32
     659  # define SCNoLEAST32 "o"
     660  #endif
     661  #if !defined SCNuLEAST32
     662  # define SCNuLEAST32 "u"
     663  #endif
     664  #if !defined SCNxLEAST32
     665  # define SCNxLEAST32 "x"
     666  #endif
     667  #ifdef INT64_MAX
     668  # if !defined SCNdLEAST64
     669  #  define SCNdLEAST64 SCNd64
     670  # endif
     671  # if !defined SCNiLEAST64
     672  #  define SCNiLEAST64 SCNi64
     673  # endif
     674  #endif
     675  #ifdef UINT64_MAX
     676  # if !defined SCNoLEAST64
     677  #  define SCNoLEAST64 SCNo64
     678  # endif
     679  # if !defined SCNuLEAST64
     680  #  define SCNuLEAST64 SCNu64
     681  # endif
     682  # if !defined SCNxLEAST64
     683  #  define SCNxLEAST64 SCNx64
     684  # endif
     685  #endif
     686  
     687  #if !defined SCNdFAST8
     688  # if INT_FAST8_MAX > INT32_MAX
     689  #  define SCNdFAST8 SCNd64
     690  # elif INT_FAST8_MAX == 0x7fff
     691  #  define SCNdFAST8 "hd"
     692  # elif INT_FAST8_MAX == 0x7f
     693  #  define SCNdFAST8 "hhd"
     694  # else
     695  #  define SCNdFAST8 "d"
     696  # endif
     697  #endif
     698  #if !defined SCNiFAST8
     699  # if INT_FAST8_MAX > INT32_MAX
     700  #  define SCNiFAST8 SCNi64
     701  # elif INT_FAST8_MAX == 0x7fff
     702  #  define SCNiFAST8 "hi"
     703  # elif INT_FAST8_MAX == 0x7f
     704  #  define SCNiFAST8 "hhi"
     705  # else
     706  #  define SCNiFAST8 "i"
     707  # endif
     708  #endif
     709  #if !defined SCNoFAST8
     710  # if UINT_FAST8_MAX > UINT32_MAX
     711  #  define SCNoFAST8 SCNo64
     712  # elif UINT_FAST8_MAX == 0xffff
     713  #  define SCNoFAST8 "ho"
     714  # elif UINT_FAST8_MAX == 0xff
     715  #  define SCNoFAST8 "hho"
     716  # else
     717  #  define SCNoFAST8 "o"
     718  # endif
     719  #endif
     720  #if !defined SCNuFAST8
     721  # if UINT_FAST8_MAX > UINT32_MAX
     722  #  define SCNuFAST8 SCNu64
     723  # elif UINT_FAST8_MAX == 0xffff
     724  #  define SCNuFAST8 "hu"
     725  # elif UINT_FAST8_MAX == 0xff
     726  #  define SCNuFAST8 "hhu"
     727  # else
     728  #  define SCNuFAST8 "u"
     729  # endif
     730  #endif
     731  #if !defined SCNxFAST8
     732  # if UINT_FAST8_MAX > UINT32_MAX
     733  #  define SCNxFAST8 SCNx64
     734  # elif UINT_FAST8_MAX == 0xffff
     735  #  define SCNxFAST8 "hx"
     736  # elif UINT_FAST8_MAX == 0xff
     737  #  define SCNxFAST8 "hhx"
     738  # else
     739  #  define SCNxFAST8 "x"
     740  # endif
     741  #endif
     742  #if !defined SCNdFAST16
     743  # if INT_FAST16_MAX > INT32_MAX
     744  #  define SCNdFAST16 SCNd64
     745  # elif INT_FAST16_MAX == 0x7fff
     746  #  define SCNdFAST16 "hd"
     747  # else
     748  #  define SCNdFAST16 "d"
     749  # endif
     750  #endif
     751  #if !defined SCNiFAST16
     752  # if INT_FAST16_MAX > INT32_MAX
     753  #  define SCNiFAST16 SCNi64
     754  # elif INT_FAST16_MAX == 0x7fff
     755  #  define SCNiFAST16 "hi"
     756  # else
     757  #  define SCNiFAST16 "i"
     758  # endif
     759  #endif
     760  #if !defined SCNoFAST16
     761  # if UINT_FAST16_MAX > UINT32_MAX
     762  #  define SCNoFAST16 SCNo64
     763  # elif UINT_FAST16_MAX == 0xffff
     764  #  define SCNoFAST16 "ho"
     765  # else
     766  #  define SCNoFAST16 "o"
     767  # endif
     768  #endif
     769  #if !defined SCNuFAST16
     770  # if UINT_FAST16_MAX > UINT32_MAX
     771  #  define SCNuFAST16 SCNu64
     772  # elif UINT_FAST16_MAX == 0xffff
     773  #  define SCNuFAST16 "hu"
     774  # else
     775  #  define SCNuFAST16 "u"
     776  # endif
     777  #endif
     778  #if !defined SCNxFAST16
     779  # if UINT_FAST16_MAX > UINT32_MAX
     780  #  define SCNxFAST16 SCNx64
     781  # elif UINT_FAST16_MAX == 0xffff
     782  #  define SCNxFAST16 "hx"
     783  # else
     784  #  define SCNxFAST16 "x"
     785  # endif
     786  #endif
     787  #if !defined SCNdFAST32
     788  # if INT_FAST32_MAX > INT32_MAX
     789  #  define SCNdFAST32 SCNd64
     790  # else
     791  #  define SCNdFAST32 "d"
     792  # endif
     793  #endif
     794  #if !defined SCNiFAST32
     795  # if INT_FAST32_MAX > INT32_MAX
     796  #  define SCNiFAST32 SCNi64
     797  # else
     798  #  define SCNiFAST32 "i"
     799  # endif
     800  #endif
     801  #if !defined SCNoFAST32
     802  # if UINT_FAST32_MAX > UINT32_MAX
     803  #  define SCNoFAST32 SCNo64
     804  # else
     805  #  define SCNoFAST32 "o"
     806  # endif
     807  #endif
     808  #if !defined SCNuFAST32
     809  # if UINT_FAST32_MAX > UINT32_MAX
     810  #  define SCNuFAST32 SCNu64
     811  # else
     812  #  define SCNuFAST32 "u"
     813  # endif
     814  #endif
     815  #if !defined SCNxFAST32
     816  # if UINT_FAST32_MAX > UINT32_MAX
     817  #  define SCNxFAST32 SCNx64
     818  # else
     819  #  define SCNxFAST32 "x"
     820  # endif
     821  #endif
     822  #ifdef INT64_MAX
     823  # if !defined SCNdFAST64
     824  #  define SCNdFAST64 SCNd64
     825  # endif
     826  # if !defined SCNiFAST64
     827  #  define SCNiFAST64 SCNi64
     828  # endif
     829  #endif
     830  #ifdef UINT64_MAX
     831  # if !defined SCNoFAST64
     832  #  define SCNoFAST64 SCNo64
     833  # endif
     834  # if !defined SCNuFAST64
     835  #  define SCNuFAST64 SCNu64
     836  # endif
     837  # if !defined SCNxFAST64
     838  #  define SCNxFAST64 SCNx64
     839  # endif
     840  #endif
     841  
     842  #if !defined SCNdMAX
     843  # if @INT32_MAX_LT_INTMAX_MAX@
     844  #  define SCNdMAX SCNd64
     845  # else
     846  #  define SCNdMAX "ld"
     847  # endif
     848  #endif
     849  #if !defined SCNiMAX
     850  # if @INT32_MAX_LT_INTMAX_MAX@
     851  #  define SCNiMAX SCNi64
     852  # else
     853  #  define SCNiMAX "li"
     854  # endif
     855  #endif
     856  #if !defined SCNoMAX
     857  # if @UINT32_MAX_LT_UINTMAX_MAX@
     858  #  define SCNoMAX SCNo64
     859  # else
     860  #  define SCNoMAX "lo"
     861  # endif
     862  #endif
     863  #if !defined SCNuMAX
     864  # if @UINT32_MAX_LT_UINTMAX_MAX@
     865  #  define SCNuMAX SCNu64
     866  # else
     867  #  define SCNuMAX "lu"
     868  # endif
     869  #endif
     870  #if !defined SCNxMAX
     871  # if @UINT32_MAX_LT_UINTMAX_MAX@
     872  #  define SCNxMAX SCNx64
     873  # else
     874  #  define SCNxMAX "lx"
     875  # endif
     876  #endif
     877  
     878  #if !defined SCNdPTR
     879  # ifdef INTPTR_MAX
     880  #  define SCNdPTR @PRIPTR_PREFIX@ "d"
     881  # endif
     882  #endif
     883  #if !defined SCNiPTR
     884  # ifdef INTPTR_MAX
     885  #  define SCNiPTR @PRIPTR_PREFIX@ "i"
     886  # endif
     887  #endif
     888  #if !defined SCNoPTR
     889  # ifdef UINTPTR_MAX
     890  #  define SCNoPTR @PRIPTR_PREFIX@ "o"
     891  # endif
     892  #endif
     893  #if !defined SCNuPTR
     894  # ifdef UINTPTR_MAX
     895  #  define SCNuPTR @PRIPTR_PREFIX@ "u"
     896  # endif
     897  #endif
     898  #if !defined SCNxPTR
     899  # ifdef UINTPTR_MAX
     900  #  define SCNxPTR @PRIPTR_PREFIX@ "x"
     901  # endif
     902  #endif
     903  
     904  /* 7.8.2 Functions for greatest-width integer types */
     905  
     906  #ifdef __cplusplus
     907  extern "C" {
     908  #endif
     909  
     910  #if @GNULIB_IMAXABS@
     911  # if @REPLACE_IMAXABS@
     912  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     913  #   undef imaxabs
     914  #   define imaxabs rpl_imaxabs
     915  #  endif
     916  _GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x));
     917  _GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x));
     918  # else
     919  #  if !@HAVE_DECL_IMAXABS@
     920  _GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x));
     921  #  endif
     922  _GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x));
     923  # endif
     924  # if __GLIBC__ >= 2
     925  _GL_CXXALIASWARN (imaxabs);
     926  # endif
     927  #elif defined GNULIB_POSIXCHECK
     928  # undef imaxabs
     929  # if HAVE_RAW_DECL_IMAXABS
     930  _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
     931                   "use gnulib module imaxabs for portability");
     932  # endif
     933  #endif
     934  
     935  #if @GNULIB_IMAXDIV@
     936  # if !@HAVE_IMAXDIV_T@
     937  #  if !GNULIB_defined_imaxdiv_t
     938  typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
     939  #   define GNULIB_defined_imaxdiv_t 1
     940  #  endif
     941  # endif
     942  # if @REPLACE_IMAXDIV@
     943  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     944  #   undef imaxdiv
     945  #   define imaxdiv rpl_imaxdiv
     946  #  endif
     947  _GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
     948  _GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
     949  # else
     950  #  if !@HAVE_DECL_IMAXDIV@
     951  _GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
     952  #  endif
     953  _GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
     954  # endif
     955  # if __GLIBC__ >= 2
     956  _GL_CXXALIASWARN (imaxdiv);
     957  # endif
     958  #elif defined GNULIB_POSIXCHECK
     959  # undef imaxdiv
     960  # if HAVE_RAW_DECL_IMAXDIV
     961  _GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
     962                   "use gnulib module imaxdiv for portability");
     963  # endif
     964  #endif
     965  
     966  #if @GNULIB_STRTOIMAX@
     967  # if @REPLACE_STRTOIMAX@
     968  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     969  #   undef strtoimax
     970  #   define strtoimax rpl_strtoimax
     971  #  endif
     972  _GL_FUNCDECL_RPL (strtoimax, intmax_t,
     973                    (const char *restrict, char **restrict, int)
     974                    _GL_ARG_NONNULL ((1)));
     975  _GL_CXXALIAS_RPL (strtoimax, intmax_t,
     976                    (const char *restrict, char **restrict, int));
     977  # else
     978  #  if !@HAVE_DECL_STRTOIMAX@
     979  #   undef strtoimax
     980  _GL_FUNCDECL_SYS (strtoimax, intmax_t,
     981                    (const char *restrict, char **restrict, int)
     982                    _GL_ARG_NONNULL ((1)));
     983  #  endif
     984  _GL_CXXALIAS_SYS (strtoimax, intmax_t,
     985                    (const char *restrict, char **restrict, int));
     986  # endif
     987  _GL_CXXALIASWARN (strtoimax);
     988  #elif defined GNULIB_POSIXCHECK
     989  # undef strtoimax
     990  # if HAVE_RAW_DECL_STRTOIMAX
     991  _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
     992                   "use gnulib module strtoimax for portability");
     993  # endif
     994  #endif
     995  
     996  #if @GNULIB_STRTOUMAX@
     997  # if @REPLACE_STRTOUMAX@
     998  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     999  #   undef strtoumax
    1000  #   define strtoumax rpl_strtoumax
    1001  #  endif
    1002  _GL_FUNCDECL_RPL (strtoumax, uintmax_t,
    1003                    (const char *restrict, char **restrict, int)
    1004                    _GL_ARG_NONNULL ((1)));
    1005  _GL_CXXALIAS_RPL (strtoumax, uintmax_t,
    1006                    (const char *restrict, char **restrict, int));
    1007  # else
    1008  #  if !@HAVE_DECL_STRTOUMAX@
    1009  #   undef strtoumax
    1010  _GL_FUNCDECL_SYS (strtoumax, uintmax_t,
    1011                    (const char *restrict, char **restrict, int)
    1012                    _GL_ARG_NONNULL ((1)));
    1013  #  endif
    1014  _GL_CXXALIAS_SYS (strtoumax, uintmax_t,
    1015                    (const char *restrict, char **restrict, int));
    1016  # endif
    1017  _GL_CXXALIASWARN (strtoumax);
    1018  #elif defined GNULIB_POSIXCHECK
    1019  # undef strtoumax
    1020  # if HAVE_RAW_DECL_STRTOUMAX
    1021  _GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
    1022                   "use gnulib module strtoumax for portability");
    1023  # endif
    1024  #endif
    1025  
    1026  /* Don't bother defining or declaring wcstoimax and wcstoumax, since
    1027     wide-character functions like this are hardly ever useful.  */
    1028  
    1029  #ifdef __cplusplus
    1030  }
    1031  #endif
    1032  
    1033  #endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */