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 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 #ifndef nspr_cpucfg___ | 38 #ifndef nspr_cpucfg___ |
39 #define nspr_cpucfg___ | 39 #define nspr_cpucfg___ |
40 | 40 |
41 #ifndef XP_UNIX | 41 #ifndef XP_UNIX |
42 #define XP_UNIX | 42 #define XP_UNIX |
43 #endif | 43 #endif |
44 | 44 |
45 #define PR_AF_INET6 30 /* same as AF_INET6 */ | 45 #define PR_AF_INET6 30 /* same as AF_INET6 */ |
46 | 46 |
47 #if defined(i386) | 47 #ifdef __LITTLE_ENDIAN__ |
48 #undef IS_BIG_ENDIAN | 48 #undef IS_BIG_ENDIAN |
49 #define IS_LITTLE_ENDIAN 1 | 49 #define IS_LITTLE_ENDIAN 1 |
50 #else | 50 #else |
51 #undef IS_LITTLE_ENDIAN | 51 #undef IS_LITTLE_ENDIAN |
52 #define IS_BIG_ENDIAN 1 | 52 #define IS_BIG_ENDIAN 1 |
53 #endif | 53 #endif |
54 | 54 |
55 #if defined(__x86_64__) | |
wtc
2011/03/22 23:34:07
Please use
#ifdef __x86_64__
to match the upstre
| |
56 #define IS_64 | |
57 #endif | |
58 | |
59 #ifndef HAVE_LONG_LONG | |
55 #define HAVE_LONG_LONG | 60 #define HAVE_LONG_LONG |
61 #endif | |
56 #undef HAVE_ALIGNED_DOUBLES | 62 #undef HAVE_ALIGNED_DOUBLES |
57 #define HAVE_ALIGNED_LONGLONGS 1 | 63 #define HAVE_ALIGNED_LONGLONGS 1 |
58 | 64 |
65 #ifdef IS_64 | |
66 | |
67 #define PR_BYTES_PER_BYTE 1 | |
68 #define PR_BYTES_PER_SHORT 2 | |
69 #define PR_BYTES_PER_INT 4 | |
70 #define PR_BYTES_PER_INT64 8 | |
71 #define PR_BYTES_PER_LONG 8 | |
72 #define PR_BYTES_PER_FLOAT 4 | |
73 #define PR_BYTES_PER_DOUBLE 8 | |
74 #define PR_BYTES_PER_WORD 8 | |
75 #define PR_BYTES_PER_DWORD 8 | |
76 | |
77 #define PR_BITS_PER_BYTE 8 | |
78 #define PR_BITS_PER_SHORT 16 | |
79 #define PR_BITS_PER_INT 32 | |
80 #define PR_BITS_PER_INT64 64 | |
81 #define PR_BITS_PER_LONG 64 | |
82 #define PR_BITS_PER_FLOAT 32 | |
83 #define PR_BITS_PER_DOUBLE 64 | |
84 #define PR_BITS_PER_WORD 64 | |
85 #define PR_BITS_PER_DWORD 64 | |
86 | |
87 #define PR_BITS_PER_BYTE_LOG2 3 | |
88 #define PR_BITS_PER_SHORT_LOG2 4 | |
89 #define PR_BITS_PER_INT_LOG2 5 | |
90 #define PR_BITS_PER_INT64_LOG2 6 | |
91 #define PR_BITS_PER_LONG_LOG2 6 | |
92 #define PR_BITS_PER_FLOAT_LOG2 5 | |
93 #define PR_BITS_PER_DOUBLE_LOG2 6 | |
94 #define PR_BITS_PER_WORD_LOG2 6 | |
95 #define PR_BITS_PER_DWORD_LOG2 6 | |
96 | |
97 #define PR_ALIGN_OF_SHORT 2 | |
98 #define PR_ALIGN_OF_INT 4 | |
99 #define PR_ALIGN_OF_LONG 8 | |
100 #define PR_ALIGN_OF_INT64 8 | |
101 #define PR_ALIGN_OF_FLOAT 4 | |
102 #define PR_ALIGN_OF_DOUBLE 8 | |
103 #define PR_ALIGN_OF_POINTER 8 | |
104 #define PR_ALIGN_OF_WORD 8 | |
105 #define PR_ALIGN_OF_DWORD 8 | |
106 | |
107 #else /* IS_64 */ | |
108 | |
59 #define PR_BYTES_PER_BYTE 1 | 109 #define PR_BYTES_PER_BYTE 1 |
60 #define PR_BYTES_PER_SHORT 2 | 110 #define PR_BYTES_PER_SHORT 2 |
61 #define PR_BYTES_PER_INT 4 | 111 #define PR_BYTES_PER_INT 4 |
62 #define PR_BYTES_PER_INT64 8 | 112 #define PR_BYTES_PER_INT64 8 |
63 #define PR_BYTES_PER_LONG 4 | 113 #define PR_BYTES_PER_LONG 4 |
64 #define PR_BYTES_PER_FLOAT 4 | 114 #define PR_BYTES_PER_FLOAT 4 |
65 #define PR_BYTES_PER_DOUBLE 8 | 115 #define PR_BYTES_PER_DOUBLE 8 |
66 #define PR_BYTES_PER_WORD 4 | 116 #define PR_BYTES_PER_WORD 4 |
67 #define PR_BYTES_PER_DWORD 8 | 117 #define PR_BYTES_PER_DWORD 8 |
68 #define PR_BYTES_PER_WORD_LOG2 2 | 118 #define PR_BYTES_PER_WORD_LOG2 2 |
(...skipping 20 matching lines...) Expand all Loading... | |
89 | 139 |
90 #define PR_ALIGN_OF_SHORT 2 | 140 #define PR_ALIGN_OF_SHORT 2 |
91 #define PR_ALIGN_OF_INT 4 | 141 #define PR_ALIGN_OF_INT 4 |
92 #define PR_ALIGN_OF_LONG 4 | 142 #define PR_ALIGN_OF_LONG 4 |
93 #define PR_ALIGN_OF_INT64 4 | 143 #define PR_ALIGN_OF_INT64 4 |
94 #define PR_ALIGN_OF_FLOAT 4 | 144 #define PR_ALIGN_OF_FLOAT 4 |
95 #define PR_ALIGN_OF_DOUBLE 4 | 145 #define PR_ALIGN_OF_DOUBLE 4 |
96 #define PR_ALIGN_OF_POINTER 4 | 146 #define PR_ALIGN_OF_POINTER 4 |
97 #define PR_ALIGN_OF_WORD 4 | 147 #define PR_ALIGN_OF_WORD 4 |
98 | 148 |
149 #endif /* IS_64 */ | |
150 | |
99 #ifndef NO_NSPR_10_SUPPORT | 151 #ifndef NO_NSPR_10_SUPPORT |
100 | 152 |
101 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE | 153 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE |
102 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT | 154 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT |
103 #define BYTES_PER_INT PR_BYTES_PER_INT | 155 #define BYTES_PER_INT PR_BYTES_PER_INT |
104 #define BYTES_PER_INT64 PR_BYTES_PER_INT64 | 156 #define BYTES_PER_INT64 PR_BYTES_PER_INT64 |
105 #define BYTES_PER_LONG PR_BYTES_PER_LONG | 157 #define BYTES_PER_LONG PR_BYTES_PER_LONG |
106 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT | 158 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT |
107 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE | 159 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE |
108 #define BYTES_PER_WORD PR_BYTES_PER_WORD | 160 #define BYTES_PER_WORD PR_BYTES_PER_WORD |
(...skipping 27 matching lines...) Expand all Loading... | |
136 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD | 188 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD |
137 | 189 |
138 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 | 190 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 |
139 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 | 191 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 |
140 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 | 192 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 |
141 | 193 |
142 #endif /* NO_NSPR_10_SUPPORT */ | 194 #endif /* NO_NSPR_10_SUPPORT */ |
143 | 195 |
144 #endif /* nspr_cpucfg___ */ | 196 #endif /* nspr_cpucfg___ */ |
145 | 197 |
OLD | NEW |