Mercurial > hg > octave-nkf > gnulib-hg
comparison lib/stdint_.h @ 5713:b91d73b06792
Rename HAVE_LONGLONG_64BIT to HAVE_LONG_LONG_64BIT.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 17 Mar 2005 18:31:09 +0000 |
parents | fcff9e1a6e22 |
children | a48fb0e98c8c |
comparison
equal
deleted
inserted
replaced
5712:949b55c4668c | 5713:b91d73b06792 |
---|---|
1 /* Copyright (C) 2001-2002, 2004 Free Software Foundation, Inc. | 1 /* Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc. |
2 Written by Bruno Haible, Sam Steingold, Peter Burwood. | 2 Written by Bruno Haible, Sam Steingold, Peter Burwood. |
3 This file is part of gnulib. | 3 This file is part of gnulib. |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 5 This program is free software; you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
76 #if @HAVE_LONG_64BIT@ | 76 #if @HAVE_LONG_64BIT@ |
77 #ifdef NEED_SIGNED_INT_TYPES | 77 #ifdef NEED_SIGNED_INT_TYPES |
78 typedef long int64_t; | 78 typedef long int64_t; |
79 #endif | 79 #endif |
80 typedef unsigned long uint64_t; | 80 typedef unsigned long uint64_t; |
81 #elif @HAVE_LONGLONG_64BIT@ | 81 #elif @HAVE_LONG_LONG_64BIT@ |
82 #ifdef NEED_SIGNED_INT_TYPES | 82 #ifdef NEED_SIGNED_INT_TYPES |
83 typedef long long int64_t; | 83 typedef long long int64_t; |
84 #endif | 84 #endif |
85 typedef unsigned long long uint64_t; | 85 typedef unsigned long long uint64_t; |
86 #endif | 86 #endif |
93 typedef uint8_t uint_least8_t; | 93 typedef uint8_t uint_least8_t; |
94 typedef int16_t int_least16_t; | 94 typedef int16_t int_least16_t; |
95 typedef uint16_t uint_least16_t; | 95 typedef uint16_t uint_least16_t; |
96 typedef int32_t int_least32_t; | 96 typedef int32_t int_least32_t; |
97 typedef uint32_t uint_least32_t; | 97 typedef uint32_t uint_least32_t; |
98 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 98 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
99 typedef int64_t int_least64_t; | 99 typedef int64_t int_least64_t; |
100 typedef uint64_t uint_least64_t; | 100 typedef uint64_t uint_least64_t; |
101 #endif | 101 #endif |
102 | 102 |
103 /* 7.18.1.3. Fastest minimum-width integer types */ | 103 /* 7.18.1.3. Fastest minimum-width integer types */ |
106 typedef uint32_t uint_fast8_t; | 106 typedef uint32_t uint_fast8_t; |
107 typedef int32_t int_fast16_t; | 107 typedef int32_t int_fast16_t; |
108 typedef uint32_t uint_fast16_t; | 108 typedef uint32_t uint_fast16_t; |
109 typedef int32_t int_fast32_t; | 109 typedef int32_t int_fast32_t; |
110 typedef uint32_t uint_fast32_t; | 110 typedef uint32_t uint_fast32_t; |
111 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 111 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
112 typedef int64_t int_fast64_t; | 112 typedef int64_t int_fast64_t; |
113 typedef uint64_t uint_fast64_t; | 113 typedef uint64_t uint_fast64_t; |
114 #endif | 114 #endif |
115 | 115 |
116 /* 7.18.1.4. Integer types capable of holding object pointers */ | 116 /* 7.18.1.4. Integer types capable of holding object pointers */ |
124 | 124 |
125 #endif /* !FreeBSD */ | 125 #endif /* !FreeBSD */ |
126 | 126 |
127 /* 7.18.1.5. Greatest-width integer types */ | 127 /* 7.18.1.5. Greatest-width integer types */ |
128 | 128 |
129 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 129 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
130 typedef int64_t intmax_t; | 130 typedef int64_t intmax_t; |
131 typedef uint64_t uintmax_t; | 131 typedef uint64_t uintmax_t; |
132 #else | 132 #else |
133 typedef int32_t intmax_t; | 133 typedef int32_t intmax_t; |
134 typedef uint32_t uintmax_t; | 134 typedef uint32_t uintmax_t; |
151 #define UINT32_MAX 4294967295U | 151 #define UINT32_MAX 4294967295U |
152 #if @HAVE_LONG_64BIT@ | 152 #if @HAVE_LONG_64BIT@ |
153 #define INT64_MIN (~INT64_MIN) | 153 #define INT64_MIN (~INT64_MIN) |
154 #define INT64_MAX 9223372036854775807L | 154 #define INT64_MAX 9223372036854775807L |
155 #define UINT64_MAX 18446744073709551615UL | 155 #define UINT64_MAX 18446744073709551615UL |
156 #elif @HAVE_LONGLONG_64BIT@ | 156 #elif @HAVE_LONG_LONG_64BIT@ |
157 #define INT64_MIN (~INT64_MIN) | 157 #define INT64_MIN (~INT64_MIN) |
158 #define INT64_MAX 9223372036854775807LL | 158 #define INT64_MAX 9223372036854775807LL |
159 #define UINT64_MAX 18446744073709551615ULL | 159 #define UINT64_MAX 18446744073709551615ULL |
160 #endif | 160 #endif |
161 | 161 |
168 #define INT_LEAST16_MAX INT16_MAX | 168 #define INT_LEAST16_MAX INT16_MAX |
169 #define UINT_LEAST16_MAX UINT16_MAX | 169 #define UINT_LEAST16_MAX UINT16_MAX |
170 #define INT_LEAST32_MIN INT32_MIN | 170 #define INT_LEAST32_MIN INT32_MIN |
171 #define INT_LEAST32_MAX INT32_MAX | 171 #define INT_LEAST32_MAX INT32_MAX |
172 #define UINT_LEAST32_MAX UINT32_MAX | 172 #define UINT_LEAST32_MAX UINT32_MAX |
173 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 173 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
174 #define INT_LEAST64_MIN INT64_MIN | 174 #define INT_LEAST64_MIN INT64_MIN |
175 #define INT_LEAST64_MAX INT64_MAX | 175 #define INT_LEAST64_MAX INT64_MAX |
176 #define UINT_LEAST64_MAX UINT64_MAX | 176 #define UINT_LEAST64_MAX UINT64_MAX |
177 #endif | 177 #endif |
178 | 178 |
185 #define INT_FAST16_MAX INT32_MAX | 185 #define INT_FAST16_MAX INT32_MAX |
186 #define UINT_FAST16_MAX UINT32_MAX | 186 #define UINT_FAST16_MAX UINT32_MAX |
187 #define INT_FAST32_MIN INT32_MIN | 187 #define INT_FAST32_MIN INT32_MIN |
188 #define INT_FAST32_MAX INT32_MAX | 188 #define INT_FAST32_MAX INT32_MAX |
189 #define UINT_FAST32_MAX UINT32_MAX | 189 #define UINT_FAST32_MAX UINT32_MAX |
190 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 190 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
191 #define INT_FAST64_MIN INT64_MIN | 191 #define INT_FAST64_MIN INT64_MIN |
192 #define INT_FAST64_MAX INT64_MAX | 192 #define INT_FAST64_MAX INT64_MAX |
193 #define UINT_FAST64_MAX UINT64_MAX | 193 #define UINT_FAST64_MAX UINT64_MAX |
194 #endif | 194 #endif |
195 | 195 |
199 #define INTPTR_MAX LONG_MAX | 199 #define INTPTR_MAX LONG_MAX |
200 #define UINTPTR_MAX ULONG_MAX | 200 #define UINTPTR_MAX ULONG_MAX |
201 | 201 |
202 /* 7.18.2.5. Limits of greatest-width integer types */ | 202 /* 7.18.2.5. Limits of greatest-width integer types */ |
203 | 203 |
204 #if @HAVE_LONG_64BIT@ || @HAVE_LONGLONG_64BIT@ | 204 #if @HAVE_LONG_64BIT@ || @HAVE_LONG_LONG_64BIT@ |
205 #define INTMAX_MIN INT64_MIN | 205 #define INTMAX_MIN INT64_MIN |
206 #define INTMAX_MAX INT64_MAX | 206 #define INTMAX_MAX INT64_MAX |
207 #define UINTMAX_MAX UINT64_MAX | 207 #define UINTMAX_MAX UINT64_MAX |
208 #else | 208 #else |
209 #define INTMAX_MIN INT32_MIN | 209 #define INTMAX_MIN INT32_MIN |
240 #define INT32_C(x) x | 240 #define INT32_C(x) x |
241 #define UINT32_C(x) x##U | 241 #define UINT32_C(x) x##U |
242 #if @HAVE_LONG_64BIT@ | 242 #if @HAVE_LONG_64BIT@ |
243 #define INT64_C(x) x##L | 243 #define INT64_C(x) x##L |
244 #define UINT64_C(x) x##UL | 244 #define UINT64_C(x) x##UL |
245 #elif @HAVE_LONGLONG_64BIT@ | 245 #elif @HAVE_LONG_LONG_64BIT@ |
246 #define INT64_C(x) x##LL | 246 #define INT64_C(x) x##LL |
247 #define UINT64_C(x) x##ULL | 247 #define UINT64_C(x) x##ULL |
248 #endif | 248 #endif |
249 | 249 |
250 /* 7.18.4.2. Macros for greatest-width integer constants */ | 250 /* 7.18.4.2. Macros for greatest-width integer constants */ |
251 | 251 |
252 #if @HAVE_LONG_64BIT@ | 252 #if @HAVE_LONG_64BIT@ |
253 #define INTMAX_C(x) x##L | 253 #define INTMAX_C(x) x##L |
254 #define UINTMAX_C(x) x##UL | 254 #define UINTMAX_C(x) x##UL |
255 #elif @HAVE_LONGLONG_64BIT@ | 255 #elif @HAVE_LONG_LONG_64BIT@ |
256 #define INTMAX_C(x) x##LL | 256 #define INTMAX_C(x) x##LL |
257 #define UINTMAX_C(x) x##ULL | 257 #define UINTMAX_C(x) x##ULL |
258 #else | 258 #else |
259 #define INTMAX_C(x) x | 259 #define INTMAX_C(x) x |
260 #define UINTMAX_C(x) x##U | 260 #define UINTMAX_C(x) x##U |