OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* This Source Code Form is subject to the terms of the Mozilla Public | 2 /* This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 /* | 6 /* |
7 * This file is used by not only Linux but also other glibc systems | 7 * This file is used by not only Linux but also other glibc systems |
8 * such as GNU/Hurd and GNU/k*BSD. | 8 * such as GNU/Hurd and GNU/k*BSD. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef nspr_cpucfg___ | 11 #ifndef nspr_cpucfg___ |
12 #define nspr_cpucfg___ | 12 #define nspr_cpucfg___ |
13 | 13 |
14 #ifndef XP_UNIX | 14 #ifndef XP_UNIX |
15 #define XP_UNIX | 15 #define XP_UNIX |
16 #endif | 16 #endif |
17 | 17 |
18 #if !defined(LINUX) && defined(__linux__) | 18 #if !defined(LINUX) && defined(__linux__) |
19 #define LINUX | 19 #define LINUX |
20 #endif | 20 #endif |
21 | 21 |
22 #ifdef __FreeBSD_kernel__ | 22 #ifdef __FreeBSD_kernel__ |
23 #define PR_AF_INET6 28 /* same as AF_INET6 */ | 23 #define PR_AF_INET6 28 /* same as AF_INET6 */ |
| 24 #elif defined(__GNU__) |
| 25 #define PR_AF_INET6 26 /* same as AF_INET6 */ |
24 #else | 26 #else |
25 #define PR_AF_INET6 10 /* same as AF_INET6 */ | 27 #define PR_AF_INET6 10 /* same as AF_INET6 */ |
26 #endif | 28 #endif |
27 | 29 |
28 #ifdef __powerpc64__ | 30 #ifdef __powerpc64__ |
29 | 31 |
30 #undef IS_LITTLE_ENDIAN | 32 #undef IS_LITTLE_ENDIAN |
31 #define IS_BIG_ENDIAN 1 | 33 #define IS_BIG_ENDIAN 1 |
32 #define IS_64 | 34 #define IS_64 |
33 | 35 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 #define PR_ALIGN_OF_FLOAT 4 | 205 #define PR_ALIGN_OF_FLOAT 4 |
204 #define PR_ALIGN_OF_DOUBLE 8 | 206 #define PR_ALIGN_OF_DOUBLE 8 |
205 #define PR_ALIGN_OF_POINTER 8 | 207 #define PR_ALIGN_OF_POINTER 8 |
206 #define PR_ALIGN_OF_WORD 8 | 208 #define PR_ALIGN_OF_WORD 8 |
207 | 209 |
208 #define PR_BYTES_PER_WORD_LOG2 3 | 210 #define PR_BYTES_PER_WORD_LOG2 3 |
209 #define PR_BYTES_PER_DWORD_LOG2 3 | 211 #define PR_BYTES_PER_DWORD_LOG2 3 |
210 | 212 |
211 #elif defined(__x86_64__) | 213 #elif defined(__x86_64__) |
212 | 214 |
| 215 #ifdef __ILP32__ |
| 216 |
| 217 #define IS_LITTLE_ENDIAN 1 |
| 218 #undef IS_BIG_ENDIAN |
| 219 |
| 220 #define PR_BYTES_PER_BYTE 1 |
| 221 #define PR_BYTES_PER_SHORT 2 |
| 222 #define PR_BYTES_PER_INT 4 |
| 223 #define PR_BYTES_PER_INT64 8 |
| 224 #define PR_BYTES_PER_LONG 4 |
| 225 #define PR_BYTES_PER_FLOAT 4 |
| 226 #define PR_BYTES_PER_DOUBLE 8 |
| 227 #define PR_BYTES_PER_WORD 4 |
| 228 #define PR_BYTES_PER_DWORD 8 |
| 229 |
| 230 #define PR_BITS_PER_BYTE 8 |
| 231 #define PR_BITS_PER_SHORT 16 |
| 232 #define PR_BITS_PER_INT 32 |
| 233 #define PR_BITS_PER_INT64 64 |
| 234 #define PR_BITS_PER_LONG 32 |
| 235 #define PR_BITS_PER_FLOAT 32 |
| 236 #define PR_BITS_PER_DOUBLE 64 |
| 237 #define PR_BITS_PER_WORD 32 |
| 238 |
| 239 #define PR_BITS_PER_BYTE_LOG2 3 |
| 240 #define PR_BITS_PER_SHORT_LOG2 4 |
| 241 #define PR_BITS_PER_INT_LOG2 5 |
| 242 #define PR_BITS_PER_INT64_LOG2 6 |
| 243 #define PR_BITS_PER_LONG_LOG2 5 |
| 244 #define PR_BITS_PER_FLOAT_LOG2 5 |
| 245 #define PR_BITS_PER_DOUBLE_LOG2 6 |
| 246 #define PR_BITS_PER_WORD_LOG2 5 |
| 247 |
| 248 #define PR_ALIGN_OF_SHORT 2 |
| 249 #define PR_ALIGN_OF_INT 4 |
| 250 #define PR_ALIGN_OF_LONG 4 |
| 251 #define PR_ALIGN_OF_INT64 4 |
| 252 #define PR_ALIGN_OF_FLOAT 4 |
| 253 #define PR_ALIGN_OF_DOUBLE 4 |
| 254 #define PR_ALIGN_OF_POINTER 4 |
| 255 #define PR_ALIGN_OF_WORD 4 |
| 256 |
| 257 #define PR_BYTES_PER_WORD_LOG2 2 |
| 258 #define PR_BYTES_PER_DWORD_LOG2 3 |
| 259 |
| 260 #else |
| 261 |
213 #define IS_LITTLE_ENDIAN 1 | 262 #define IS_LITTLE_ENDIAN 1 |
214 #undef IS_BIG_ENDIAN | 263 #undef IS_BIG_ENDIAN |
215 #define IS_64 | 264 #define IS_64 |
216 | 265 |
217 #define PR_BYTES_PER_BYTE 1 | 266 #define PR_BYTES_PER_BYTE 1 |
218 #define PR_BYTES_PER_SHORT 2 | 267 #define PR_BYTES_PER_SHORT 2 |
219 #define PR_BYTES_PER_INT 4 | 268 #define PR_BYTES_PER_INT 4 |
220 #define PR_BYTES_PER_INT64 8 | 269 #define PR_BYTES_PER_INT64 8 |
221 #define PR_BYTES_PER_LONG 8 | 270 #define PR_BYTES_PER_LONG 8 |
222 #define PR_BYTES_PER_FLOAT 4 | 271 #define PR_BYTES_PER_FLOAT 4 |
(...skipping 24 matching lines...) Expand all Loading... |
247 #define PR_ALIGN_OF_LONG 8 | 296 #define PR_ALIGN_OF_LONG 8 |
248 #define PR_ALIGN_OF_INT64 8 | 297 #define PR_ALIGN_OF_INT64 8 |
249 #define PR_ALIGN_OF_FLOAT 4 | 298 #define PR_ALIGN_OF_FLOAT 4 |
250 #define PR_ALIGN_OF_DOUBLE 8 | 299 #define PR_ALIGN_OF_DOUBLE 8 |
251 #define PR_ALIGN_OF_POINTER 8 | 300 #define PR_ALIGN_OF_POINTER 8 |
252 #define PR_ALIGN_OF_WORD 8 | 301 #define PR_ALIGN_OF_WORD 8 |
253 | 302 |
254 #define PR_BYTES_PER_WORD_LOG2 3 | 303 #define PR_BYTES_PER_WORD_LOG2 3 |
255 #define PR_BYTES_PER_DWORD_LOG2 3 | 304 #define PR_BYTES_PER_DWORD_LOG2 3 |
256 | 305 |
| 306 #endif |
| 307 |
257 #elif defined(__mc68000__) | 308 #elif defined(__mc68000__) |
258 | 309 |
259 #undef IS_LITTLE_ENDIAN | 310 #undef IS_LITTLE_ENDIAN |
260 #define IS_BIG_ENDIAN 1 | 311 #define IS_BIG_ENDIAN 1 |
261 | 312 |
262 #define PR_BYTES_PER_BYTE 1 | 313 #define PR_BYTES_PER_BYTE 1 |
263 #define PR_BYTES_PER_SHORT 2 | 314 #define PR_BYTES_PER_SHORT 2 |
264 #define PR_BYTES_PER_INT 4 | 315 #define PR_BYTES_PER_INT 4 |
265 #define PR_BYTES_PER_INT64 8 | 316 #define PR_BYTES_PER_INT64 8 |
266 #define PR_BYTES_PER_LONG 4 | 317 #define PR_BYTES_PER_LONG 4 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
865 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER | 916 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER |
866 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD | 917 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD |
867 | 918 |
868 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 | 919 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 |
869 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 | 920 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 |
870 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 | 921 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 |
871 | 922 |
872 #endif /* NO_NSPR_10_SUPPORT */ | 923 #endif /* NO_NSPR_10_SUPPORT */ |
873 | 924 |
874 #endif /* nspr_cpucfg___ */ | 925 #endif /* nspr_cpucfg___ */ |
OLD | NEW |