00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * The contents of this file are subject to the Mozilla Public 00004 * License Version 1.1 (the "License"); you may not use this file 00005 * except in compliance with the License. You may obtain a copy of 00006 * the License at http://www.mozilla.org/MPL/ 00007 * 00008 * Software distributed under the License is distributed on an "AS 00009 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 00010 * implied. See the License for the specific language governing 00011 * rights and limitations under the License. 00012 * 00013 * The Original Code is the Netscape Portable Runtime (NSPR). 00014 * 00015 * The Initial Developer of the Original Code is Netscape 00016 * Communications Corporation. Portions created by Netscape are 00017 * Copyright (C) 1998-2000 Netscape Communications Corporation. All 00018 * Rights Reserved. 00019 * 00020 * Contributor(s): 00021 * Portions Copyright (c) 2004-2006, Nokia Corporation 00022 * 00023 * 00024 * Alternatively, the contents of this file may be used under the 00025 * terms of the GNU General Public License Version 2 or later (the 00026 * "GPL"), in which case the provisions of the GPL are applicable 00027 * instead of those above. If you wish to allow use of your 00028 * version of this file only under the terms of the GPL and not to 00029 * allow others to use your version of this file under the MPL, 00030 * indicate your decision by deleting the provisions above and 00031 * replace them with the notice and other provisions required by 00032 * the GPL. If you do not delete the provisions above, a recipient 00033 * may use your version of this file under either the MPL or the 00034 * GPL. 00035 */ 00036 00037 /* NOTES: 00038 * Nokia modified this file, by changing certain variables for the purpose of 00039 * porting the file to the Symbian platform on May 1st, 2004. 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 /* same as AF_INET6 */ 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 /* defined(_M_IX86) || defined(_X86_) */ 00164 00165 #error unknown processor architecture 00166 00167 #endif /* defined(_M_IX86) || defined(_X86_) */ 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 /* NO_NSPR_10_SUPPORT */ 00215 00216 #endif /* nspr_cpucfg___ */