00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef nspr_cpucfg___
00044 #define nspr_cpucfg___
00045
00046 #ifndef XP_PC
00047 #define XP_PC
00048 #endif
00049
00050 #ifndef WIN32
00051 #define WIN32
00052 #endif
00053
00054 #ifndef WIN95
00055 #define WIN95
00056 #endif
00057
00058 #ifdef __SYMBIAN32__
00059 # undef XP_WIN
00060 # undef XP_MAC
00061 # undef XP_MACOSX
00062 # undef XP_OS2
00063 # undef XP_UNIX
00064 # undef MOZ_X11
00065 # undef _WINDOWS
00066 # undef __INTEL__
00067 #endif
00068
00069 #define PR_AF_INET6 23
00070
00071 #if defined(_M_IX86) || defined(_X86_) || defined(__SYMBIAN32__)
00072
00073 #define IS_LITTLE_ENDIAN 1
00074 #undef IS_BIG_ENDIAN
00075
00076 #define PR_BYTES_PER_BYTE 1
00077 #define PR_BYTES_PER_SHORT 2
00078 #define PR_BYTES_PER_INT 4
00079 #define PR_BYTES_PER_INT64 8
00080 #define PR_BYTES_PER_LONG 4
00081 #define PR_BYTES_PER_FLOAT 4
00082 #define PR_BYTES_PER_WORD 4
00083 #define PR_BYTES_PER_DWORD 8
00084 #define PR_BYTES_PER_DOUBLE 8
00085
00086 #define PR_BITS_PER_BYTE 8
00087 #define PR_BITS_PER_SHORT 16
00088 #define PR_BITS_PER_INT 32
00089 #define PR_BITS_PER_INT64 64
00090 #define PR_BITS_PER_LONG 32
00091 #define PR_BITS_PER_FLOAT 32
00092 #define PR_BITS_PER_WORD 32
00093 #define PR_BITS_PER_DWORD 64
00094 #define PR_BITS_PER_DOUBLE 64
00095
00096 #define PR_BITS_PER_BYTE_LOG2 3
00097 #define PR_BITS_PER_SHORT_LOG2 4
00098 #define PR_BITS_PER_INT_LOG2 5
00099 #define PR_BITS_PER_INT64_LOG2 6
00100 #define PR_BITS_PER_LONG_LOG2 5
00101 #define PR_BITS_PER_FLOAT_LOG2 5
00102 #define PR_BITS_PER_WORD_LOG2 5
00103 #define PR_BITS_PER_DWORD_LOG2 6
00104 #define PR_BITS_PER_DOUBLE_LOG2 6
00105
00106 #define PR_ALIGN_OF_SHORT 2
00107 #define PR_ALIGN_OF_INT 4
00108 #define PR_ALIGN_OF_LONG 4
00109 #define PR_ALIGN_OF_INT64 8
00110 #define PR_ALIGN_OF_FLOAT 4
00111 #define PR_ALIGN_OF_WORD 4
00112 #define PR_ALIGN_OF_DWORD 8
00113 #define PR_ALIGN_OF_DOUBLE 4
00114 #define PR_ALIGN_OF_POINTER 4
00115
00116 #define PR_BYTES_PER_WORD_LOG2 2
00117 #define PR_BYTES_PER_DWORD_LOG2 2
00118
00119 #elif defined(_ALPHA_)
00120
00121 #define IS_LITTLE_ENDIAN 1
00122 #undef IS_BIG_ENDIAN
00123
00124 #define PR_BYTES_PER_BYTE 1
00125 #define PR_BYTES_PER_SHORT 2
00126 #define PR_BYTES_PER_INT 4
00127 #define PR_BYTES_PER_INT64 8
00128 #define PR_BYTES_PER_LONG 4
00129 #define PR_BYTES_PER_FLOAT 4
00130 #define PR_BYTES_PER_DOUBLE 8
00131 #define PR_BYTES_PER_WORD 4
00132 #define PR_BYTES_PER_DWORD 8
00133
00134 #define PR_BITS_PER_BYTE 8
00135 #define PR_BITS_PER_SHORT 16
00136 #define PR_BITS_PER_INT 32
00137 #define PR_BITS_PER_INT64 64
00138 #define PR_BITS_PER_LONG 32
00139 #define PR_BITS_PER_FLOAT 32
00140 #define PR_BITS_PER_DOUBLE 64
00141 #define PR_BITS_PER_WORD 32
00142
00143 #define PR_BITS_PER_BYTE_LOG2 3
00144 #define PR_BITS_PER_SHORT_LOG2 4
00145 #define PR_BITS_PER_INT_LOG2 5
00146 #define PR_BITS_PER_INT64_LOG2 6
00147 #define PR_BITS_PER_LONG_LOG2 5
00148 #define PR_BITS_PER_FLOAT_LOG2 5
00149 #define PR_BITS_PER_DOUBLE_LOG2 6
00150 #define PR_BITS_PER_WORD_LOG2 5
00151
00152 #define PR_BYTES_PER_WORD_LOG2 2
00153 #define PR_BYTES_PER_DWORD_LOG2 3
00154
00155 #define PR_ALIGN_OF_SHORT 2
00156 #define PR_ALIGN_OF_INT 4
00157 #define PR_ALIGN_OF_LONG 4
00158 #define PR_ALIGN_OF_INT64 8
00159 #define PR_ALIGN_OF_FLOAT 4
00160 #define PR_ALIGN_OF_DOUBLE 8
00161 #define PR_ALIGN_OF_POINTER 4
00162
00163 #else
00164
00165 #error unknown processor architecture
00166
00167 #endif
00168
00169 #define HAVE_LONG_LONG
00170
00171 #ifndef NO_NSPR_10_SUPPORT
00172
00173 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
00174 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
00175 #define BYTES_PER_INT PR_BYTES_PER_INT
00176 #define BYTES_PER_INT64 PR_BYTES_PER_INT64
00177 #define BYTES_PER_LONG PR_BYTES_PER_LONG
00178 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
00179 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
00180 #define BYTES_PER_WORD PR_BYTES_PER_WORD
00181 #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
00182
00183 #define BITS_PER_BYTE PR_BITS_PER_BYTE
00184 #define BITS_PER_SHORT PR_BITS_PER_SHORT
00185 #define BITS_PER_INT PR_BITS_PER_INT
00186 #define BITS_PER_INT64 PR_BITS_PER_INT64
00187 #define BITS_PER_LONG PR_BITS_PER_LONG
00188 #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
00189 #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
00190 #define BITS_PER_WORD PR_BITS_PER_WORD
00191
00192 #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
00193 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
00194 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
00195 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
00196 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
00197 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
00198 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
00199 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
00200
00201 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
00202 #define ALIGN_OF_INT PR_ALIGN_OF_INT
00203 #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
00204 #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
00205 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
00206 #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
00207 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
00208 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
00209
00210 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
00211 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
00212 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
00213
00214 #endif
00215
00216 #endif