1 /* Test of <inttypes.h> substitute.
2 Copyright (C) 2006-2007 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
22 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
23 #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
24 #define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
29 /* Tests for macros supposed to be defined in inttypes.h. */
31 const char *k = /* implicit string concatenation */
36 PRIo8 PRIu8 PRIx8 PRIX8
42 PRIo16 PRIu16 PRIx16 PRIX16
48 PRIo32 PRIu32 PRIx32 PRIX32
54 PRIo64 PRIu64 PRIx64 PRIX64
56 PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
57 PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
58 PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
59 PRIdLEAST64 PRIiLEAST64
60 PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
61 PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
62 PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
63 PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
65 PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
66 PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
71 PRIoPTR PRIuPTR PRIxPTR PRIXPTR
74 const char *l = /* implicit string concatenation */
99 SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
100 SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
101 SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
102 SCNdLEAST64 SCNiLEAST64
103 SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
104 SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
105 SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
106 SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
107 SCNdFAST64 SCNiFAST64
108 SCNoFAST64 SCNuFAST64 SCNxFAST64
109 SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
114 SCNoPTR SCNuPTR SCNxPTR