author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 1 | 666f914201fb |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
williamr@2 | 2 |
/* |
williamr@2 | 3 |
* The contents of this file are subject to the Mozilla Public |
williamr@2 | 4 |
* License Version 1.1 (the "License"); you may not use this file |
williamr@2 | 5 |
* except in compliance with the License. You may obtain a copy of |
williamr@2 | 6 |
* the License at http://www.mozilla.org/MPL/ |
williamr@2 | 7 |
* |
williamr@2 | 8 |
* Software distributed under the License is distributed on an "AS |
williamr@2 | 9 |
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or |
williamr@2 | 10 |
* implied. See the License for the specific language governing |
williamr@2 | 11 |
* rights and limitations under the License. |
williamr@2 | 12 |
* |
williamr@2 | 13 |
* The Original Code is the Netscape Portable Runtime (NSPR). |
williamr@2 | 14 |
* |
williamr@2 | 15 |
* The Initial Developer of the Original Code is Netscape |
williamr@2 | 16 |
* Communications Corporation. Portions created by Netscape are |
williamr@2 | 17 |
* Copyright (C) 1998-2000 Netscape Communications Corporation. All |
williamr@2 | 18 |
* Rights Reserved. |
williamr@2 | 19 |
* |
williamr@2 | 20 |
* Contributor(s): |
williamr@2 | 21 |
* Portions Copyright (c) 2004-2006, Nokia Corporation |
williamr@2 | 22 |
* |
williamr@2 | 23 |
* |
williamr@2 | 24 |
* Alternatively, the contents of this file may be used under the |
williamr@2 | 25 |
* terms of the GNU General Public License Version 2 or later (the |
williamr@2 | 26 |
* "GPL"), in which case the provisions of the GPL are applicable |
williamr@2 | 27 |
* instead of those above. If you wish to allow use of your |
williamr@2 | 28 |
* version of this file only under the terms of the GPL and not to |
williamr@2 | 29 |
* allow others to use your version of this file under the MPL, |
williamr@2 | 30 |
* indicate your decision by deleting the provisions above and |
williamr@2 | 31 |
* replace them with the notice and other provisions required by |
williamr@2 | 32 |
* the GPL. If you do not delete the provisions above, a recipient |
williamr@2 | 33 |
* may use your version of this file under either the MPL or the |
williamr@2 | 34 |
* GPL. |
williamr@2 | 35 |
*/ |
williamr@2 | 36 |
|
williamr@2 | 37 |
/* NOTES: |
williamr@2 | 38 |
* Nokia modified this file, by changing certain variables for the purpose of |
williamr@2 | 39 |
* porting the file to the Symbian platform on May 1st, 2004. |
williamr@2 | 40 |
*/ |
williamr@2 | 41 |
|
williamr@2 | 42 |
|
williamr@2 | 43 |
#ifndef nspr_cpucfg___ |
williamr@2 | 44 |
#define nspr_cpucfg___ |
williamr@2 | 45 |
|
williamr@2 | 46 |
#ifndef XP_PC |
williamr@2 | 47 |
#define XP_PC |
williamr@2 | 48 |
#endif |
williamr@2 | 49 |
|
williamr@2 | 50 |
#ifndef WIN32 |
williamr@2 | 51 |
#define WIN32 |
williamr@2 | 52 |
#endif |
williamr@2 | 53 |
|
williamr@2 | 54 |
#ifndef WIN95 |
williamr@2 | 55 |
#define WIN95 |
williamr@2 | 56 |
#endif |
williamr@2 | 57 |
|
williamr@2 | 58 |
#ifdef __SYMBIAN32__ |
williamr@2 | 59 |
# undef XP_WIN |
williamr@2 | 60 |
# undef XP_MAC |
williamr@2 | 61 |
# undef XP_MACOSX |
williamr@2 | 62 |
# undef XP_OS2 |
williamr@2 | 63 |
# undef XP_UNIX |
williamr@2 | 64 |
# undef MOZ_X11 |
williamr@2 | 65 |
# undef _WINDOWS |
williamr@2 | 66 |
# undef __INTEL__ |
williamr@2 | 67 |
#endif |
williamr@2 | 68 |
|
williamr@2 | 69 |
#define PR_AF_INET6 23 /* same as AF_INET6 */ |
williamr@2 | 70 |
|
williamr@2 | 71 |
#if defined(_M_IX86) || defined(_X86_) || defined(__SYMBIAN32__) |
williamr@2 | 72 |
|
williamr@2 | 73 |
#define IS_LITTLE_ENDIAN 1 |
williamr@2 | 74 |
#undef IS_BIG_ENDIAN |
williamr@2 | 75 |
|
williamr@2 | 76 |
#define PR_BYTES_PER_BYTE 1 |
williamr@2 | 77 |
#define PR_BYTES_PER_SHORT 2 |
williamr@2 | 78 |
#define PR_BYTES_PER_INT 4 |
williamr@2 | 79 |
#define PR_BYTES_PER_INT64 8 |
williamr@2 | 80 |
#define PR_BYTES_PER_LONG 4 |
williamr@2 | 81 |
#define PR_BYTES_PER_FLOAT 4 |
williamr@2 | 82 |
#define PR_BYTES_PER_WORD 4 |
williamr@2 | 83 |
#define PR_BYTES_PER_DWORD 8 |
williamr@2 | 84 |
#define PR_BYTES_PER_DOUBLE 8 |
williamr@2 | 85 |
|
williamr@2 | 86 |
#define PR_BITS_PER_BYTE 8 |
williamr@2 | 87 |
#define PR_BITS_PER_SHORT 16 |
williamr@2 | 88 |
#define PR_BITS_PER_INT 32 |
williamr@2 | 89 |
#define PR_BITS_PER_INT64 64 |
williamr@2 | 90 |
#define PR_BITS_PER_LONG 32 |
williamr@2 | 91 |
#define PR_BITS_PER_FLOAT 32 |
williamr@2 | 92 |
#define PR_BITS_PER_WORD 32 |
williamr@2 | 93 |
#define PR_BITS_PER_DWORD 64 |
williamr@2 | 94 |
#define PR_BITS_PER_DOUBLE 64 |
williamr@2 | 95 |
|
williamr@2 | 96 |
#define PR_BITS_PER_BYTE_LOG2 3 |
williamr@2 | 97 |
#define PR_BITS_PER_SHORT_LOG2 4 |
williamr@2 | 98 |
#define PR_BITS_PER_INT_LOG2 5 |
williamr@2 | 99 |
#define PR_BITS_PER_INT64_LOG2 6 |
williamr@2 | 100 |
#define PR_BITS_PER_LONG_LOG2 5 |
williamr@2 | 101 |
#define PR_BITS_PER_FLOAT_LOG2 5 |
williamr@2 | 102 |
#define PR_BITS_PER_WORD_LOG2 5 |
williamr@2 | 103 |
#define PR_BITS_PER_DWORD_LOG2 6 |
williamr@2 | 104 |
#define PR_BITS_PER_DOUBLE_LOG2 6 |
williamr@2 | 105 |
|
williamr@2 | 106 |
#define PR_ALIGN_OF_SHORT 2 |
williamr@2 | 107 |
#define PR_ALIGN_OF_INT 4 |
williamr@2 | 108 |
#define PR_ALIGN_OF_LONG 4 |
williamr@2 | 109 |
#define PR_ALIGN_OF_INT64 8 |
williamr@2 | 110 |
#define PR_ALIGN_OF_FLOAT 4 |
williamr@2 | 111 |
#define PR_ALIGN_OF_WORD 4 |
williamr@2 | 112 |
#define PR_ALIGN_OF_DWORD 8 |
williamr@2 | 113 |
#define PR_ALIGN_OF_DOUBLE 4 |
williamr@2 | 114 |
#define PR_ALIGN_OF_POINTER 4 |
williamr@2 | 115 |
|
williamr@2 | 116 |
#define PR_BYTES_PER_WORD_LOG2 2 |
williamr@2 | 117 |
#define PR_BYTES_PER_DWORD_LOG2 2 |
williamr@2 | 118 |
|
williamr@2 | 119 |
#elif defined(_ALPHA_) |
williamr@2 | 120 |
|
williamr@2 | 121 |
#define IS_LITTLE_ENDIAN 1 |
williamr@2 | 122 |
#undef IS_BIG_ENDIAN |
williamr@2 | 123 |
|
williamr@2 | 124 |
#define PR_BYTES_PER_BYTE 1 |
williamr@2 | 125 |
#define PR_BYTES_PER_SHORT 2 |
williamr@2 | 126 |
#define PR_BYTES_PER_INT 4 |
williamr@2 | 127 |
#define PR_BYTES_PER_INT64 8 |
williamr@2 | 128 |
#define PR_BYTES_PER_LONG 4 |
williamr@2 | 129 |
#define PR_BYTES_PER_FLOAT 4 |
williamr@2 | 130 |
#define PR_BYTES_PER_DOUBLE 8 |
williamr@2 | 131 |
#define PR_BYTES_PER_WORD 4 |
williamr@2 | 132 |
#define PR_BYTES_PER_DWORD 8 |
williamr@2 | 133 |
|
williamr@2 | 134 |
#define PR_BITS_PER_BYTE 8 |
williamr@2 | 135 |
#define PR_BITS_PER_SHORT 16 |
williamr@2 | 136 |
#define PR_BITS_PER_INT 32 |
williamr@2 | 137 |
#define PR_BITS_PER_INT64 64 |
williamr@2 | 138 |
#define PR_BITS_PER_LONG 32 |
williamr@2 | 139 |
#define PR_BITS_PER_FLOAT 32 |
williamr@2 | 140 |
#define PR_BITS_PER_DOUBLE 64 |
williamr@2 | 141 |
#define PR_BITS_PER_WORD 32 |
williamr@2 | 142 |
|
williamr@2 | 143 |
#define PR_BITS_PER_BYTE_LOG2 3 |
williamr@2 | 144 |
#define PR_BITS_PER_SHORT_LOG2 4 |
williamr@2 | 145 |
#define PR_BITS_PER_INT_LOG2 5 |
williamr@2 | 146 |
#define PR_BITS_PER_INT64_LOG2 6 |
williamr@2 | 147 |
#define PR_BITS_PER_LONG_LOG2 5 |
williamr@2 | 148 |
#define PR_BITS_PER_FLOAT_LOG2 5 |
williamr@2 | 149 |
#define PR_BITS_PER_DOUBLE_LOG2 6 |
williamr@2 | 150 |
#define PR_BITS_PER_WORD_LOG2 5 |
williamr@2 | 151 |
|
williamr@2 | 152 |
#define PR_BYTES_PER_WORD_LOG2 2 |
williamr@2 | 153 |
#define PR_BYTES_PER_DWORD_LOG2 3 |
williamr@2 | 154 |
|
williamr@2 | 155 |
#define PR_ALIGN_OF_SHORT 2 |
williamr@2 | 156 |
#define PR_ALIGN_OF_INT 4 |
williamr@2 | 157 |
#define PR_ALIGN_OF_LONG 4 |
williamr@2 | 158 |
#define PR_ALIGN_OF_INT64 8 |
williamr@2 | 159 |
#define PR_ALIGN_OF_FLOAT 4 |
williamr@2 | 160 |
#define PR_ALIGN_OF_DOUBLE 8 |
williamr@2 | 161 |
#define PR_ALIGN_OF_POINTER 4 |
williamr@2 | 162 |
|
williamr@2 | 163 |
#else /* defined(_M_IX86) || defined(_X86_) */ |
williamr@2 | 164 |
|
williamr@2 | 165 |
#error unknown processor architecture |
williamr@2 | 166 |
|
williamr@2 | 167 |
#endif /* defined(_M_IX86) || defined(_X86_) */ |
williamr@2 | 168 |
|
williamr@2 | 169 |
#define HAVE_LONG_LONG |
williamr@2 | 170 |
|
williamr@2 | 171 |
#ifndef NO_NSPR_10_SUPPORT |
williamr@2 | 172 |
|
williamr@2 | 173 |
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE |
williamr@2 | 174 |
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT |
williamr@2 | 175 |
#define BYTES_PER_INT PR_BYTES_PER_INT |
williamr@2 | 176 |
#define BYTES_PER_INT64 PR_BYTES_PER_INT64 |
williamr@2 | 177 |
#define BYTES_PER_LONG PR_BYTES_PER_LONG |
williamr@2 | 178 |
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT |
williamr@2 | 179 |
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE |
williamr@2 | 180 |
#define BYTES_PER_WORD PR_BYTES_PER_WORD |
williamr@2 | 181 |
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD |
williamr@2 | 182 |
|
williamr@2 | 183 |
#define BITS_PER_BYTE PR_BITS_PER_BYTE |
williamr@2 | 184 |
#define BITS_PER_SHORT PR_BITS_PER_SHORT |
williamr@2 | 185 |
#define BITS_PER_INT PR_BITS_PER_INT |
williamr@2 | 186 |
#define BITS_PER_INT64 PR_BITS_PER_INT64 |
williamr@2 | 187 |
#define BITS_PER_LONG PR_BITS_PER_LONG |
williamr@2 | 188 |
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT |
williamr@2 | 189 |
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE |
williamr@2 | 190 |
#define BITS_PER_WORD PR_BITS_PER_WORD |
williamr@2 | 191 |
|
williamr@2 | 192 |
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 |
williamr@2 | 193 |
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 |
williamr@2 | 194 |
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 |
williamr@2 | 195 |
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 |
williamr@2 | 196 |
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 |
williamr@2 | 197 |
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 |
williamr@2 | 198 |
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 |
williamr@2 | 199 |
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 |
williamr@2 | 200 |
|
williamr@2 | 201 |
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT |
williamr@2 | 202 |
#define ALIGN_OF_INT PR_ALIGN_OF_INT |
williamr@2 | 203 |
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG |
williamr@2 | 204 |
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 |
williamr@2 | 205 |
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT |
williamr@2 | 206 |
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE |
williamr@2 | 207 |
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER |
williamr@2 | 208 |
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD |
williamr@2 | 209 |
|
williamr@2 | 210 |
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 |
williamr@2 | 211 |
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 |
williamr@2 | 212 |
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 |
williamr@2 | 213 |
|
williamr@2 | 214 |
#endif /* NO_NSPR_10_SUPPORT */ |
williamr@2 | 215 |
|
williamr@2 | 216 |
#endif /* nspr_cpucfg___ */ |