int_fmtio.h revision 1.2.10.2 1 1.2.10.2 nathanw /* $NetBSD: int_fmtio.h,v 1.2.10.2 2002/11/11 22:00:27 nathanw Exp $ */
2 1.2.10.2 nathanw
3 1.2.10.2 nathanw /*-
4 1.2.10.2 nathanw * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 1.2.10.2 nathanw * All rights reserved.
6 1.2.10.2 nathanw *
7 1.2.10.2 nathanw * This code is derived from software contributed to The NetBSD Foundation
8 1.2.10.2 nathanw * by Klaus Klein.
9 1.2.10.2 nathanw *
10 1.2.10.2 nathanw * Redistribution and use in source and binary forms, with or without
11 1.2.10.2 nathanw * modification, are permitted provided that the following conditions
12 1.2.10.2 nathanw * are met:
13 1.2.10.2 nathanw * 1. Redistributions of source code must retain the above copyright
14 1.2.10.2 nathanw * notice, this list of conditions and the following disclaimer.
15 1.2.10.2 nathanw * 2. Redistributions in binary form must reproduce the above copyright
16 1.2.10.2 nathanw * notice, this list of conditions and the following disclaimer in the
17 1.2.10.2 nathanw * documentation and/or other materials provided with the distribution.
18 1.2.10.2 nathanw * 3. All advertising materials mentioning features or use of this software
19 1.2.10.2 nathanw * must display the following acknowledgement:
20 1.2.10.2 nathanw * This product includes software developed by the NetBSD
21 1.2.10.2 nathanw * Foundation, Inc. and its contributors.
22 1.2.10.2 nathanw * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.2.10.2 nathanw * contributors may be used to endorse or promote products derived
24 1.2.10.2 nathanw * from this software without specific prior written permission.
25 1.2.10.2 nathanw *
26 1.2.10.2 nathanw * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.2.10.2 nathanw * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.2.10.2 nathanw * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.2.10.2 nathanw * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.2.10.2 nathanw * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.2.10.2 nathanw * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.2.10.2 nathanw * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.2.10.2 nathanw * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.2.10.2 nathanw * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.2.10.2 nathanw * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.2.10.2 nathanw * POSSIBILITY OF SUCH DAMAGE.
37 1.2.10.2 nathanw */
38 1.2.10.2 nathanw
39 1.2.10.2 nathanw #ifndef _MIPS_INT_FMTIO_H_
40 1.2.10.2 nathanw #define _MIPS_INT_FMTIO_H_
41 1.2.10.2 nathanw
42 1.2.10.2 nathanw /*
43 1.2.10.2 nathanw * 7.8.1 Macros for format specifiers
44 1.2.10.2 nathanw */
45 1.2.10.2 nathanw
46 1.2.10.2 nathanw /* fprintf macros for signed integers */
47 1.2.10.2 nathanw
48 1.2.10.2 nathanw #define PRId8 "d" /* int8_t */
49 1.2.10.2 nathanw #define PRId16 "d" /* int16_t */
50 1.2.10.2 nathanw #define PRId32 "d" /* int32_t */
51 1.2.10.2 nathanw #ifdef _LP64
52 1.2.10.2 nathanw #define PRId64 "ld" /* int64_t */
53 1.2.10.2 nathanw #else
54 1.2.10.2 nathanw #define PRId64 "lld" /* int64_t */
55 1.2.10.2 nathanw #endif
56 1.2.10.2 nathanw #define PRIdLEAST8 "d" /* int_least8_t */
57 1.2.10.2 nathanw #define PRIdLEAST16 "d" /* int_least16_t */
58 1.2.10.2 nathanw #define PRIdLEAST32 "d" /* int_least32_t */
59 1.2.10.2 nathanw #ifdef _LP64
60 1.2.10.2 nathanw #define PRIdLEAST64 "ld" /* int_least64_t */
61 1.2.10.2 nathanw #else
62 1.2.10.2 nathanw #define PRIdLEAST64 "lld" /* int_least64_t */
63 1.2.10.2 nathanw #endif
64 1.2.10.2 nathanw #define PRIdFAST8 "d" /* int_fast8_t */
65 1.2.10.2 nathanw #define PRIdFAST16 "d" /* int_fast16_t */
66 1.2.10.2 nathanw #define PRIdFAST32 "d" /* int_fast32_t */
67 1.2.10.2 nathanw #ifdef _LP64
68 1.2.10.2 nathanw #define PRIdFAST64 "ld" /* int_fast64_t */
69 1.2.10.2 nathanw #else
70 1.2.10.2 nathanw #define PRIdFAST64 "lld" /* int_fast64_t */
71 1.2.10.2 nathanw #endif
72 1.2.10.2 nathanw #ifdef _LP64
73 1.2.10.2 nathanw #define PRIdMAX "ld" /* intmax_t */
74 1.2.10.2 nathanw #define PRIdPTR "ld" /* intptr_t */
75 1.2.10.2 nathanw #else
76 1.2.10.2 nathanw #define PRIdMAX "lld" /* intmax_t */
77 1.2.10.2 nathanw #define PRIdPTR "d" /* intptr_t */
78 1.2.10.2 nathanw #endif
79 1.2.10.2 nathanw
80 1.2.10.2 nathanw #define PRIi8 "i" /* int8_t */
81 1.2.10.2 nathanw #define PRIi16 "i" /* int16_t */
82 1.2.10.2 nathanw #define PRIi32 "i" /* int32_t */
83 1.2.10.2 nathanw #ifdef _LP64
84 1.2.10.2 nathanw #define PRIi64 "li" /* int64_t */
85 1.2.10.2 nathanw #else
86 1.2.10.2 nathanw #define PRIi64 "lli" /* int64_t */
87 1.2.10.2 nathanw #endif
88 1.2.10.2 nathanw #define PRIiLEAST8 "i" /* int_least8_t */
89 1.2.10.2 nathanw #define PRIiLEAST16 "i" /* int_least16_t */
90 1.2.10.2 nathanw #define PRIiLEAST32 "i" /* int_least32_t */
91 1.2.10.2 nathanw #ifdef _LP64
92 1.2.10.2 nathanw #define PRIiLEAST64 "li" /* int_least64_t */
93 1.2.10.2 nathanw #else
94 1.2.10.2 nathanw #define PRIiLEAST64 "lli" /* int_least64_t */
95 1.2.10.2 nathanw #endif
96 1.2.10.2 nathanw #define PRIiFAST8 "i" /* int_fast8_t */
97 1.2.10.2 nathanw #define PRIiFAST16 "i" /* int_fast16_t */
98 1.2.10.2 nathanw #define PRIiFAST32 "i" /* int_fast32_t */
99 1.2.10.2 nathanw #ifdef _LP64
100 1.2.10.2 nathanw #define PRIiFAST64 "li" /* int_fast64_t */
101 1.2.10.2 nathanw #define PRIiMAX "li" /* intmax_t */
102 1.2.10.2 nathanw #define PRIiPTR "li" /* intptr_t */
103 1.2.10.2 nathanw #else
104 1.2.10.2 nathanw #define PRIiFAST64 "lli" /* int_fast64_t */
105 1.2.10.2 nathanw #define PRIiMAX "lli" /* intmax_t */
106 1.2.10.2 nathanw #define PRIiPTR "i" /* intptr_t */
107 1.2.10.2 nathanw #endif
108 1.2.10.2 nathanw
109 1.2.10.2 nathanw /* fprintf macros for unsigned integers */
110 1.2.10.2 nathanw
111 1.2.10.2 nathanw #define PRIo8 "o" /* uint8_t */
112 1.2.10.2 nathanw #define PRIo16 "o" /* uint16_t */
113 1.2.10.2 nathanw #define PRIo32 "o" /* uint32_t */
114 1.2.10.2 nathanw #ifdef _LP64
115 1.2.10.2 nathanw #define PRIo64 "lo" /* uint64_t */
116 1.2.10.2 nathanw #else
117 1.2.10.2 nathanw #define PRIo64 "llo" /* uint64_t */
118 1.2.10.2 nathanw #endif
119 1.2.10.2 nathanw #define PRIoLEAST8 "o" /* uint_least8_t */
120 1.2.10.2 nathanw #define PRIoLEAST16 "o" /* uint_least16_t */
121 1.2.10.2 nathanw #define PRIoLEAST32 "o" /* uint_least32_t */
122 1.2.10.2 nathanw #ifdef _LP64
123 1.2.10.2 nathanw #define PRIoLEAST64 "lo" /* uint_least64_t */
124 1.2.10.2 nathanw #else
125 1.2.10.2 nathanw #define PRIoLEAST64 "llo" /* uint_least64_t */
126 1.2.10.2 nathanw #endif
127 1.2.10.2 nathanw #define PRIoFAST8 "o" /* uint_fast8_t */
128 1.2.10.2 nathanw #define PRIoFAST16 "o" /* uint_fast16_t */
129 1.2.10.2 nathanw #define PRIoFAST32 "o" /* uint_fast32_t */
130 1.2.10.2 nathanw #ifdef _LP64
131 1.2.10.2 nathanw #define PRIoFAST64 "lo" /* uint_fast64_t */
132 1.2.10.2 nathanw #define PRIoMAX "lo" /* uintmax_t */
133 1.2.10.2 nathanw #define PRIoPTR "lo" /* uintptr_t */
134 1.2.10.2 nathanw #else
135 1.2.10.2 nathanw #define PRIoFAST64 "llo" /* uint_fast64_t */
136 1.2.10.2 nathanw #define PRIoMAX "llo" /* uintmax_t */
137 1.2.10.2 nathanw #define PRIoPTR "o" /* uintptr_t */
138 1.2.10.2 nathanw #endif
139 1.2.10.2 nathanw
140 1.2.10.2 nathanw #define PRIu8 "u" /* uint8_t */
141 1.2.10.2 nathanw #define PRIu16 "u" /* uint16_t */
142 1.2.10.2 nathanw #define PRIu32 "u" /* uint32_t */
143 1.2.10.2 nathanw #ifdef _LP64
144 1.2.10.2 nathanw #define PRIu64 "lu" /* uint64_t */
145 1.2.10.2 nathanw #else
146 1.2.10.2 nathanw #define PRIu64 "llu" /* uint64_t */
147 1.2.10.2 nathanw #endif
148 1.2.10.2 nathanw #define PRIuLEAST8 "u" /* uint_least8_t */
149 1.2.10.2 nathanw #define PRIuLEAST16 "u" /* uint_least16_t */
150 1.2.10.2 nathanw #define PRIuLEAST32 "u" /* uint_least32_t */
151 1.2.10.2 nathanw #ifdef _LP64
152 1.2.10.2 nathanw #define PRIuLEAST64 "lu" /* uint_least64_t */
153 1.2.10.2 nathanw #else
154 1.2.10.2 nathanw #define PRIuLEAST64 "llu" /* uint_least64_t */
155 1.2.10.2 nathanw #endif
156 1.2.10.2 nathanw #define PRIuFAST8 "u" /* uint_fast8_t */
157 1.2.10.2 nathanw #define PRIuFAST16 "u" /* uint_fast16_t */
158 1.2.10.2 nathanw #define PRIuFAST32 "u" /* uint_fast32_t */
159 1.2.10.2 nathanw #ifdef _LP64
160 1.2.10.2 nathanw #define PRIuFAST64 "lu" /* uint_fast64_t */
161 1.2.10.2 nathanw #define PRIuMAX "lu" /* uintmax_t */
162 1.2.10.2 nathanw #define PRIuPTR "lu" /* uintptr_t */
163 1.2.10.2 nathanw #else
164 1.2.10.2 nathanw #define PRIuFAST64 "llu" /* uint_fast64_t */
165 1.2.10.2 nathanw #define PRIuMAX "llu" /* uintmax_t */
166 1.2.10.2 nathanw #define PRIuPTR "u" /* uintptr_t */
167 1.2.10.2 nathanw #endif
168 1.2.10.2 nathanw
169 1.2.10.2 nathanw #define PRIx8 "x" /* uint8_t */
170 1.2.10.2 nathanw #define PRIx16 "x" /* uint16_t */
171 1.2.10.2 nathanw #define PRIx32 "x" /* uint32_t */
172 1.2.10.2 nathanw #ifdef _LP64
173 1.2.10.2 nathanw #define PRIx64 "lx" /* uint64_t */
174 1.2.10.2 nathanw #else
175 1.2.10.2 nathanw #define PRIx64 "llx" /* uint64_t */
176 1.2.10.2 nathanw #endif
177 1.2.10.2 nathanw #define PRIxLEAST8 "x" /* uint_least8_t */
178 1.2.10.2 nathanw #define PRIxLEAST16 "x" /* uint_least16_t */
179 1.2.10.2 nathanw #define PRIxLEAST32 "x" /* uint_least32_t */
180 1.2.10.2 nathanw #ifdef _LP64
181 1.2.10.2 nathanw #define PRIxLEAST64 "lx" /* uint_least64_t */
182 1.2.10.2 nathanw #else
183 1.2.10.2 nathanw #define PRIxLEAST64 "llx" /* uint_least64_t */
184 1.2.10.2 nathanw #endif
185 1.2.10.2 nathanw #define PRIxFAST8 "x" /* uint_fast8_t */
186 1.2.10.2 nathanw #define PRIxFAST16 "x" /* uint_fast16_t */
187 1.2.10.2 nathanw #define PRIxFAST32 "x" /* uint_fast32_t */
188 1.2.10.2 nathanw #ifdef _LP64
189 1.2.10.2 nathanw #define PRIxFAST64 "lx" /* uint_fast64_t */
190 1.2.10.2 nathanw #define PRIxMAX "lx" /* uintmax_t */
191 1.2.10.2 nathanw #define PRIxPTR "lx" /* uintptr_t */
192 1.2.10.2 nathanw #else
193 1.2.10.2 nathanw #define PRIxFAST64 "llx" /* uint_fast64_t */
194 1.2.10.2 nathanw #define PRIxMAX "llx" /* uintmax_t */
195 1.2.10.2 nathanw #define PRIxPTR "x" /* uintptr_t */
196 1.2.10.2 nathanw #endif
197 1.2.10.2 nathanw
198 1.2.10.2 nathanw #define PRIX8 "X" /* uint8_t */
199 1.2.10.2 nathanw #define PRIX16 "X" /* uint16_t */
200 1.2.10.2 nathanw #define PRIX32 "X" /* uint32_t */
201 1.2.10.2 nathanw #ifdef _LP64
202 1.2.10.2 nathanw #define PRIX64 "lX" /* uint64_t */
203 1.2.10.2 nathanw #else
204 1.2.10.2 nathanw #define PRIX64 "llX" /* uint64_t */
205 1.2.10.2 nathanw #endif
206 1.2.10.2 nathanw #define PRIXLEAST8 "X" /* uint_least8_t */
207 1.2.10.2 nathanw #define PRIXLEAST16 "X" /* uint_least16_t */
208 1.2.10.2 nathanw #define PRIXLEAST32 "X" /* uint_least32_t */
209 1.2.10.2 nathanw #ifdef _LP64
210 1.2.10.2 nathanw #define PRIXLEAST64 "lX" /* uint_least64_t */
211 1.2.10.2 nathanw #else
212 1.2.10.2 nathanw #define PRIXLEAST64 "llX" /* uint_least64_t */
213 1.2.10.2 nathanw #endif
214 1.2.10.2 nathanw #define PRIXFAST8 "X" /* uint_fast8_t */
215 1.2.10.2 nathanw #define PRIXFAST16 "X" /* uint_fast16_t */
216 1.2.10.2 nathanw #define PRIXFAST32 "X" /* uint_fast32_t */
217 1.2.10.2 nathanw #ifdef _LP64
218 1.2.10.2 nathanw #define PRIXFAST64 "lX" /* uint_fast64_t */
219 1.2.10.2 nathanw #define PRIXMAX "lX" /* uintmax_t */
220 1.2.10.2 nathanw #define PRIXPTR "lX" /* uintptr_t */
221 1.2.10.2 nathanw #else
222 1.2.10.2 nathanw #define PRIXFAST64 "llX" /* uint_fast64_t */
223 1.2.10.2 nathanw #define PRIXMAX "llX" /* uintmax_t */
224 1.2.10.2 nathanw #define PRIXPTR "X" /* uintptr_t */
225 1.2.10.2 nathanw #endif
226 1.2.10.2 nathanw
227 1.2.10.2 nathanw /* fscanf macros for signed integers */
228 1.2.10.2 nathanw
229 1.2.10.2 nathanw #define SCNd8 "hhd" /* int8_t */
230 1.2.10.2 nathanw #define SCNd16 "hd" /* int16_t */
231 1.2.10.2 nathanw #define SCNd32 "d" /* int32_t */
232 1.2.10.2 nathanw #ifdef _LP64
233 1.2.10.2 nathanw #define SCNd64 "ld" /* int64_t */
234 1.2.10.2 nathanw #else
235 1.2.10.2 nathanw #define SCNd64 "lld" /* int64_t */
236 1.2.10.2 nathanw #endif
237 1.2.10.2 nathanw #define SCNdLEAST8 "hhd" /* int_least8_t */
238 1.2.10.2 nathanw #define SCNdLEAST16 "hd" /* int_least16_t */
239 1.2.10.2 nathanw #define SCNdLEAST32 "d" /* int_least32_t */
240 1.2.10.2 nathanw #ifdef _LP64
241 1.2.10.2 nathanw #define SCNdLEAST64 "ld" /* int_least64_t */
242 1.2.10.2 nathanw #else
243 1.2.10.2 nathanw #define SCNdLEAST64 "lld" /* int_least64_t */
244 1.2.10.2 nathanw #endif
245 1.2.10.2 nathanw #define SCNdFAST8 "d" /* int_fast8_t */
246 1.2.10.2 nathanw #define SCNdFAST16 "d" /* int_fast16_t */
247 1.2.10.2 nathanw #define SCNdFAST32 "d" /* int_fast32_t */
248 1.2.10.2 nathanw #ifdef _LP64
249 1.2.10.2 nathanw #define SCNdFAST64 "ld" /* int_fast64_t */
250 1.2.10.2 nathanw #define SCNdMAX "ld" /* intmax_t */
251 1.2.10.2 nathanw #define SCNdPTR "ld" /* intptr_t */
252 1.2.10.2 nathanw #else
253 1.2.10.2 nathanw #define SCNdFAST64 "lld" /* int_fast64_t */
254 1.2.10.2 nathanw #define SCNdMAX "lld" /* intmax_t */
255 1.2.10.2 nathanw #define SCNdPTR "d" /* intptr_t */
256 1.2.10.2 nathanw #endif
257 1.2.10.2 nathanw
258 1.2.10.2 nathanw #define SCNi8 "hhi" /* int8_t */
259 1.2.10.2 nathanw #define SCNi16 "hi" /* int16_t */
260 1.2.10.2 nathanw #define SCNi32 "i" /* int32_t */
261 1.2.10.2 nathanw #ifdef _LP64
262 1.2.10.2 nathanw #define SCNi64 "li" /* int64_t */
263 1.2.10.2 nathanw #else
264 1.2.10.2 nathanw #define SCNi64 "lli" /* int64_t */
265 1.2.10.2 nathanw #endif
266 1.2.10.2 nathanw #define SCNiLEAST8 "hhi" /* int_least8_t */
267 1.2.10.2 nathanw #define SCNiLEAST16 "hi" /* int_least16_t */
268 1.2.10.2 nathanw #define SCNiLEAST32 "i" /* int_least32_t */
269 1.2.10.2 nathanw #ifdef _LP64
270 1.2.10.2 nathanw #define SCNiLEAST64 "li" /* int_least64_t */
271 1.2.10.2 nathanw #else
272 1.2.10.2 nathanw #define SCNiLEAST64 "lli" /* int_least64_t */
273 1.2.10.2 nathanw #endif
274 1.2.10.2 nathanw #define SCNiFAST8 "i" /* int_fast8_t */
275 1.2.10.2 nathanw #define SCNiFAST16 "i" /* int_fast16_t */
276 1.2.10.2 nathanw #define SCNiFAST32 "i" /* int_fast32_t */
277 1.2.10.2 nathanw #ifdef _LP64
278 1.2.10.2 nathanw #define SCNiFAST64 "li" /* int_fast64_t */
279 1.2.10.2 nathanw #define SCNiMAX "li" /* intmax_t */
280 1.2.10.2 nathanw #define SCNiPTR "li" /* intptr_t */
281 1.2.10.2 nathanw #else
282 1.2.10.2 nathanw #define SCNiFAST64 "lli" /* int_fast64_t */
283 1.2.10.2 nathanw #define SCNiMAX "lli" /* intmax_t */
284 1.2.10.2 nathanw #define SCNiPTR "i" /* intptr_t */
285 1.2.10.2 nathanw #endif
286 1.2.10.2 nathanw
287 1.2.10.2 nathanw /* fscanf macros for unsigned integers */
288 1.2.10.2 nathanw
289 1.2.10.2 nathanw #define SCNo8 "hho" /* uint8_t */
290 1.2.10.2 nathanw #define SCNo16 "ho" /* uint16_t */
291 1.2.10.2 nathanw #define SCNo32 "o" /* uint32_t */
292 1.2.10.2 nathanw #ifdef _LP64
293 1.2.10.2 nathanw #define SCNo64 "lo" /* uint64_t */
294 1.2.10.2 nathanw #else
295 1.2.10.2 nathanw #define SCNo64 "llo" /* uint64_t */
296 1.2.10.2 nathanw #endif
297 1.2.10.2 nathanw #define SCNoLEAST8 "hho" /* uint_least8_t */
298 1.2.10.2 nathanw #define SCNoLEAST16 "ho" /* uint_least16_t */
299 1.2.10.2 nathanw #define SCNoLEAST32 "o" /* uint_least32_t */
300 1.2.10.2 nathanw #ifdef _LP64
301 1.2.10.2 nathanw #define SCNoLEAST64 "lo" /* uint_least64_t */
302 1.2.10.2 nathanw #else
303 1.2.10.2 nathanw #define SCNoLEAST64 "llo" /* uint_least64_t */
304 1.2.10.2 nathanw #endif
305 1.2.10.2 nathanw #define SCNoFAST8 "o" /* uint_fast8_t */
306 1.2.10.2 nathanw #define SCNoFAST16 "o" /* uint_fast16_t */
307 1.2.10.2 nathanw #define SCNoFAST32 "o" /* uint_fast32_t */
308 1.2.10.2 nathanw #ifdef _LP64
309 1.2.10.2 nathanw #define SCNoFAST64 "lo" /* uint_fast64_t */
310 1.2.10.2 nathanw #define SCNoMAX "lo" /* uintmax_t */
311 1.2.10.2 nathanw #define SCNoPTR "lo" /* uintptr_t */
312 1.2.10.2 nathanw #else
313 1.2.10.2 nathanw #define SCNoFAST64 "llo" /* uint_fast64_t */
314 1.2.10.2 nathanw #define SCNoMAX "llo" /* uintmax_t */
315 1.2.10.2 nathanw #define SCNoPTR "o" /* uintptr_t */
316 1.2.10.2 nathanw #endif
317 1.2.10.2 nathanw
318 1.2.10.2 nathanw #define SCNu8 "hhu" /* uint8_t */
319 1.2.10.2 nathanw #define SCNu16 "hu" /* uint16_t */
320 1.2.10.2 nathanw #define SCNu32 "u" /* uint32_t */
321 1.2.10.2 nathanw #ifdef _LP64
322 1.2.10.2 nathanw #define SCNu64 "lu" /* uint64_t */
323 1.2.10.2 nathanw #else
324 1.2.10.2 nathanw #define SCNu64 "llu" /* uint64_t */
325 1.2.10.2 nathanw #endif
326 1.2.10.2 nathanw #define SCNuLEAST8 "hhu" /* uint_least8_t */
327 1.2.10.2 nathanw #define SCNuLEAST16 "hu" /* uint_least16_t */
328 1.2.10.2 nathanw #define SCNuLEAST32 "u" /* uint_least32_t */
329 1.2.10.2 nathanw #ifdef _LP64
330 1.2.10.2 nathanw #define SCNuLEAST64 "lu" /* uint_least64_t */
331 1.2.10.2 nathanw #else
332 1.2.10.2 nathanw #define SCNuLEAST64 "llu" /* uint_least64_t */
333 1.2.10.2 nathanw #endif
334 1.2.10.2 nathanw #define SCNuFAST8 "u" /* uint_fast8_t */
335 1.2.10.2 nathanw #define SCNuFAST16 "u" /* uint_fast16_t */
336 1.2.10.2 nathanw #define SCNuFAST32 "u" /* uint_fast32_t */
337 1.2.10.2 nathanw #ifdef _LP64
338 1.2.10.2 nathanw #define SCNuFAST64 "lu" /* uint_fast64_t */
339 1.2.10.2 nathanw #define SCNuMAX "lu" /* uintmax_t */
340 1.2.10.2 nathanw #define SCNuPTR "lu" /* uintptr_t */
341 1.2.10.2 nathanw #else
342 1.2.10.2 nathanw #define SCNuFAST64 "llu" /* uint_fast64_t */
343 1.2.10.2 nathanw #define SCNuMAX "llu" /* uintmax_t */
344 1.2.10.2 nathanw #define SCNuPTR "u" /* uintptr_t */
345 1.2.10.2 nathanw #endif
346 1.2.10.2 nathanw
347 1.2.10.2 nathanw #define SCNx8 "hhx" /* uint8_t */
348 1.2.10.2 nathanw #define SCNx16 "hx" /* uint16_t */
349 1.2.10.2 nathanw #define SCNx32 "x" /* uint32_t */
350 1.2.10.2 nathanw #ifdef _LP64
351 1.2.10.2 nathanw #define SCNx64 "lx" /* uint64_t */
352 1.2.10.2 nathanw #else
353 1.2.10.2 nathanw #define SCNx64 "llx" /* uint64_t */
354 1.2.10.2 nathanw #endif
355 1.2.10.2 nathanw #define SCNxLEAST8 "hhx" /* uint_least8_t */
356 1.2.10.2 nathanw #define SCNxLEAST16 "hx" /* uint_least16_t */
357 1.2.10.2 nathanw #define SCNxLEAST32 "x" /* uint_least32_t */
358 1.2.10.2 nathanw #ifdef _LP64
359 1.2.10.2 nathanw #define SCNxLEAST64 "lx" /* uint_least64_t */
360 1.2.10.2 nathanw #else
361 1.2.10.2 nathanw #define SCNxLEAST64 "llx" /* uint_least64_t */
362 1.2.10.2 nathanw #endif
363 1.2.10.2 nathanw #define SCNxFAST8 "x" /* uint_fast8_t */
364 1.2.10.2 nathanw #define SCNxFAST16 "x" /* uint_fast16_t */
365 1.2.10.2 nathanw #define SCNxFAST32 "x" /* uint_fast32_t */
366 1.2.10.2 nathanw #ifdef _LP64
367 1.2.10.2 nathanw #define SCNxFAST64 "lx" /* uint_fast64_t */
368 1.2.10.2 nathanw #define SCNxMAX "lx" /* uintmax_t */
369 1.2.10.2 nathanw #define SCNxPTR "lx" /* uintptr_t */
370 1.2.10.2 nathanw #else
371 1.2.10.2 nathanw #define SCNxFAST64 "llx" /* uint_fast64_t */
372 1.2.10.2 nathanw #define SCNxMAX "llx" /* uintmax_t */
373 1.2.10.2 nathanw #define SCNxPTR "x" /* uintptr_t */
374 1.2.10.2 nathanw #endif
375 1.2.10.2 nathanw
376 1.2.10.2 nathanw #endif /* !_MIPS_INT_FMTIO_H_ */
377