Home | History | Annotate | Download | only in nspr
      1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* ***** BEGIN LICENSE BLOCK *****
      3  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
      4  *
      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
      7  * the License. You may obtain a copy of the License at
      8  * http://www.mozilla.org/MPL/
      9  *
     10  * Software distributed under the License is distributed on an "AS IS" basis,
     11  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     12  * for the specific language governing rights and limitations under the
     13  * License.
     14  *
     15  * The Original Code is the Netscape Portable Runtime (NSPR).
     16  *
     17  * The Initial Developer of the Original Code is
     18  * Netscape Communications Corporation.
     19  * Portions created by the Initial Developer are Copyright (C) 1998-2000
     20  * the Initial Developer. All Rights Reserved.
     21  *
     22  * Contributor(s):
     23  *
     24  * Alternatively, the contents of this file may be used under the terms of
     25  * either the GNU General Public License Version 2 or later (the "GPL"), or
     26  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     27  * in which case the provisions of the GPL or the LGPL are applicable instead
     28  * of those above. If you wish to allow use of your version of this file only
     29  * under the terms of either the GPL or the LGPL, and not to allow others to
     30  * use your version of this file under the terms of the MPL, indicate your
     31  * decision by deleting the provisions above and replace them with the notice
     32  * and other provisions required by the GPL or the LGPL. If you do not delete
     33  * the provisions above, a recipient may use your version of this file under
     34  * the terms of any one of the MPL, the GPL or the LGPL.
     35  *
     36  * ***** END LICENSE BLOCK ***** */
     37 
     38 #ifndef nspr_cpucfg___
     39 #define nspr_cpucfg___
     40 
     41 #ifndef XP_UNIX
     42 #define XP_UNIX
     43 #endif
     44 
     45 #ifndef LINUX
     46 #define LINUX
     47 #endif
     48 
     49 #define PR_AF_INET6 10  /* same as AF_INET6 */
     50 
     51 #ifdef __powerpc64__
     52 
     53 #undef  IS_LITTLE_ENDIAN
     54 #define IS_BIG_ENDIAN    1
     55 #define IS_64
     56 
     57 #define PR_BYTES_PER_BYTE   1
     58 #define PR_BYTES_PER_SHORT  2
     59 #define PR_BYTES_PER_INT    4
     60 #define PR_BYTES_PER_INT64  8
     61 #define PR_BYTES_PER_LONG   8
     62 #define PR_BYTES_PER_FLOAT  4
     63 #define PR_BYTES_PER_DOUBLE 8
     64 #define PR_BYTES_PER_WORD   8
     65 #define PR_BYTES_PER_DWORD  8
     66 
     67 #define PR_BITS_PER_BYTE    8
     68 #define PR_BITS_PER_SHORT   16
     69 #define PR_BITS_PER_INT     32
     70 #define PR_BITS_PER_INT64   64
     71 #define PR_BITS_PER_LONG    64
     72 #define PR_BITS_PER_FLOAT   32
     73 #define PR_BITS_PER_DOUBLE  64
     74 #define PR_BITS_PER_WORD    64
     75 
     76 #define PR_BITS_PER_BYTE_LOG2   3
     77 #define PR_BITS_PER_SHORT_LOG2  4
     78 #define PR_BITS_PER_INT_LOG2    5
     79 #define PR_BITS_PER_INT64_LOG2  6
     80 #define PR_BITS_PER_LONG_LOG2   6
     81 #define PR_BITS_PER_FLOAT_LOG2  5
     82 #define PR_BITS_PER_DOUBLE_LOG2 6
     83 #define PR_BITS_PER_WORD_LOG2   6
     84 
     85 #define PR_ALIGN_OF_SHORT   2
     86 #define PR_ALIGN_OF_INT     4
     87 #define PR_ALIGN_OF_LONG    8
     88 #define PR_ALIGN_OF_INT64   8
     89 #define PR_ALIGN_OF_FLOAT   4
     90 #define PR_ALIGN_OF_DOUBLE  8
     91 #define PR_ALIGN_OF_POINTER 8
     92 #define PR_ALIGN_OF_WORD    8
     93 
     94 #define PR_BYTES_PER_WORD_LOG2   3
     95 #define PR_BYTES_PER_DWORD_LOG2  3
     96 
     97 #elif defined(__powerpc__)
     98 
     99 #undef  IS_LITTLE_ENDIAN
    100 #define IS_BIG_ENDIAN    1
    101 
    102 #define PR_BYTES_PER_BYTE   1
    103 #define PR_BYTES_PER_SHORT  2
    104 #define PR_BYTES_PER_INT    4
    105 #define PR_BYTES_PER_INT64  8
    106 #define PR_BYTES_PER_LONG   4
    107 #define PR_BYTES_PER_FLOAT  4
    108 #define PR_BYTES_PER_DOUBLE 8
    109 #define PR_BYTES_PER_WORD   4
    110 #define PR_BYTES_PER_DWORD  8
    111 
    112 #define PR_BITS_PER_BYTE    8
    113 #define PR_BITS_PER_SHORT   16
    114 #define PR_BITS_PER_INT     32
    115 #define PR_BITS_PER_INT64   64
    116 #define PR_BITS_PER_LONG    32
    117 #define PR_BITS_PER_FLOAT   32
    118 #define PR_BITS_PER_DOUBLE  64
    119 #define PR_BITS_PER_WORD    32
    120 
    121 #define PR_BITS_PER_BYTE_LOG2   3
    122 #define PR_BITS_PER_SHORT_LOG2  4
    123 #define PR_BITS_PER_INT_LOG2    5
    124 #define PR_BITS_PER_INT64_LOG2  6
    125 #define PR_BITS_PER_LONG_LOG2   5
    126 #define PR_BITS_PER_FLOAT_LOG2  5
    127 #define PR_BITS_PER_DOUBLE_LOG2 6
    128 #define PR_BITS_PER_WORD_LOG2   5
    129 
    130 #define PR_ALIGN_OF_SHORT   2
    131 #define PR_ALIGN_OF_INT     4
    132 #define PR_ALIGN_OF_LONG    4
    133 #define PR_ALIGN_OF_INT64   8
    134 #define PR_ALIGN_OF_FLOAT   4
    135 #define PR_ALIGN_OF_DOUBLE  8
    136 #define PR_ALIGN_OF_POINTER 4
    137 #define PR_ALIGN_OF_WORD    4
    138 
    139 #define PR_BYTES_PER_WORD_LOG2   2
    140 #define PR_BYTES_PER_DWORD_LOG2  3
    141 
    142 #elif defined(__alpha)
    143 
    144 #define IS_LITTLE_ENDIAN 1
    145 #undef  IS_BIG_ENDIAN
    146 #define IS_64
    147 
    148 #define PR_BYTES_PER_BYTE   1
    149 #define PR_BYTES_PER_SHORT  2
    150 #define PR_BYTES_PER_INT    4
    151 #define PR_BYTES_PER_INT64  8
    152 #define PR_BYTES_PER_LONG   8
    153 #define PR_BYTES_PER_FLOAT  4
    154 #define PR_BYTES_PER_DOUBLE 8
    155 #define PR_BYTES_PER_WORD   8
    156 #define PR_BYTES_PER_DWORD  8
    157 
    158 #define PR_BITS_PER_BYTE    8
    159 #define PR_BITS_PER_SHORT   16
    160 #define PR_BITS_PER_INT     32
    161 #define PR_BITS_PER_INT64   64
    162 #define PR_BITS_PER_LONG    64
    163 #define PR_BITS_PER_FLOAT   32
    164 #define PR_BITS_PER_DOUBLE  64
    165 #define PR_BITS_PER_WORD    64
    166 
    167 #define PR_BITS_PER_BYTE_LOG2   3
    168 #define PR_BITS_PER_SHORT_LOG2  4
    169 #define PR_BITS_PER_INT_LOG2    5
    170 #define PR_BITS_PER_INT64_LOG2  6
    171 #define PR_BITS_PER_LONG_LOG2   6
    172 #define PR_BITS_PER_FLOAT_LOG2  5
    173 #define PR_BITS_PER_DOUBLE_LOG2 6
    174 #define PR_BITS_PER_WORD_LOG2   6
    175 
    176 #define PR_ALIGN_OF_SHORT   2
    177 #define PR_ALIGN_OF_INT     4
    178 #define PR_ALIGN_OF_LONG    8
    179 #define PR_ALIGN_OF_INT64   8
    180 #define PR_ALIGN_OF_FLOAT   4
    181 #define PR_ALIGN_OF_DOUBLE  8
    182 #define PR_ALIGN_OF_POINTER 8
    183 #define PR_ALIGN_OF_WORD    8
    184 
    185 #define PR_BYTES_PER_WORD_LOG2  3
    186 #define PR_BYTES_PER_DWORD_LOG2 3
    187 
    188 #elif defined(__ia64__)
    189 
    190 #define IS_LITTLE_ENDIAN 1
    191 #undef  IS_BIG_ENDIAN
    192 #define IS_64
    193 
    194 #define PR_BYTES_PER_BYTE   1
    195 #define PR_BYTES_PER_SHORT  2
    196 #define PR_BYTES_PER_INT    4
    197 #define PR_BYTES_PER_INT64  8
    198 #define PR_BYTES_PER_LONG   8
    199 #define PR_BYTES_PER_FLOAT  4
    200 #define PR_BYTES_PER_DOUBLE 8
    201 #define PR_BYTES_PER_WORD   8
    202 #define PR_BYTES_PER_DWORD  8
    203 
    204 #define PR_BITS_PER_BYTE    8
    205 #define PR_BITS_PER_SHORT   16
    206 #define PR_BITS_PER_INT     32
    207 #define PR_BITS_PER_INT64   64
    208 #define PR_BITS_PER_LONG    64
    209 #define PR_BITS_PER_FLOAT   32
    210 #define PR_BITS_PER_DOUBLE  64
    211 #define PR_BITS_PER_WORD    64
    212 
    213 #define PR_BITS_PER_BYTE_LOG2   3
    214 #define PR_BITS_PER_SHORT_LOG2  4
    215 #define PR_BITS_PER_INT_LOG2    5
    216 #define PR_BITS_PER_INT64_LOG2  6
    217 #define PR_BITS_PER_LONG_LOG2   6
    218 #define PR_BITS_PER_FLOAT_LOG2  5
    219 #define PR_BITS_PER_DOUBLE_LOG2 6
    220 #define PR_BITS_PER_WORD_LOG2   6
    221 
    222 #define PR_ALIGN_OF_SHORT   2
    223 #define PR_ALIGN_OF_INT     4
    224 #define PR_ALIGN_OF_LONG    8
    225 #define PR_ALIGN_OF_INT64   8
    226 #define PR_ALIGN_OF_FLOAT   4
    227 #define PR_ALIGN_OF_DOUBLE  8
    228 #define PR_ALIGN_OF_POINTER 8
    229 #define PR_ALIGN_OF_WORD    8
    230 
    231 #define PR_BYTES_PER_WORD_LOG2  3
    232 #define PR_BYTES_PER_DWORD_LOG2 3
    233 
    234 #elif defined(__x86_64__)
    235 
    236 #define IS_LITTLE_ENDIAN 1
    237 #undef  IS_BIG_ENDIAN
    238 #define IS_64
    239 
    240 #define PR_BYTES_PER_BYTE   1
    241 #define PR_BYTES_PER_SHORT  2
    242 #define PR_BYTES_PER_INT    4
    243 #define PR_BYTES_PER_INT64  8
    244 #define PR_BYTES_PER_LONG   8
    245 #define PR_BYTES_PER_FLOAT  4
    246 #define PR_BYTES_PER_DOUBLE 8
    247 #define PR_BYTES_PER_WORD   8
    248 #define PR_BYTES_PER_DWORD  8
    249 
    250 #define PR_BITS_PER_BYTE    8
    251 #define PR_BITS_PER_SHORT   16
    252 #define PR_BITS_PER_INT     32
    253 #define PR_BITS_PER_INT64   64
    254 #define PR_BITS_PER_LONG    64
    255 #define PR_BITS_PER_FLOAT   32
    256 #define PR_BITS_PER_DOUBLE  64
    257 #define PR_BITS_PER_WORD    64
    258 
    259 #define PR_BITS_PER_BYTE_LOG2   3
    260 #define PR_BITS_PER_SHORT_LOG2  4
    261 #define PR_BITS_PER_INT_LOG2    5
    262 #define PR_BITS_PER_INT64_LOG2  6
    263 #define PR_BITS_PER_LONG_LOG2   6
    264 #define PR_BITS_PER_FLOAT_LOG2  5
    265 #define PR_BITS_PER_DOUBLE_LOG2 6
    266 #define PR_BITS_PER_WORD_LOG2   6
    267 
    268 #define PR_ALIGN_OF_SHORT   2
    269 #define PR_ALIGN_OF_INT     4
    270 #define PR_ALIGN_OF_LONG    8
    271 #define PR_ALIGN_OF_INT64   8
    272 #define PR_ALIGN_OF_FLOAT   4
    273 #define PR_ALIGN_OF_DOUBLE  8
    274 #define PR_ALIGN_OF_POINTER 8
    275 #define PR_ALIGN_OF_WORD    8
    276 
    277 #define PR_BYTES_PER_WORD_LOG2  3
    278 #define PR_BYTES_PER_DWORD_LOG2 3
    279 
    280 #elif defined(__mc68000__)
    281 
    282 #undef  IS_LITTLE_ENDIAN
    283 #define IS_BIG_ENDIAN 1
    284 
    285 #define PR_BYTES_PER_BYTE   1
    286 #define PR_BYTES_PER_SHORT  2
    287 #define PR_BYTES_PER_INT    4
    288 #define PR_BYTES_PER_INT64  8
    289 #define PR_BYTES_PER_LONG   4
    290 #define PR_BYTES_PER_FLOAT  4
    291 #define PR_BYTES_PER_DOUBLE 8
    292 #define PR_BYTES_PER_WORD   4
    293 #define PR_BYTES_PER_DWORD  8
    294 
    295 #define PR_BITS_PER_BYTE    8
    296 #define PR_BITS_PER_SHORT   16
    297 #define PR_BITS_PER_INT     32
    298 #define PR_BITS_PER_INT64   64
    299 #define PR_BITS_PER_LONG    32
    300 #define PR_BITS_PER_FLOAT   32
    301 #define PR_BITS_PER_DOUBLE  64
    302 #define PR_BITS_PER_WORD    32
    303 
    304 #define PR_BITS_PER_BYTE_LOG2   3
    305 #define PR_BITS_PER_SHORT_LOG2  4
    306 #define PR_BITS_PER_INT_LOG2    5
    307 #define PR_BITS_PER_INT64_LOG2  6
    308 #define PR_BITS_PER_LONG_LOG2   5
    309 #define PR_BITS_PER_FLOAT_LOG2  5
    310 #define PR_BITS_PER_DOUBLE_LOG2 6
    311 #define PR_BITS_PER_WORD_LOG2   5
    312 
    313 #define PR_ALIGN_OF_SHORT   2
    314 #define PR_ALIGN_OF_INT     2
    315 #define PR_ALIGN_OF_LONG    2
    316 #define PR_ALIGN_OF_INT64   2
    317 #define PR_ALIGN_OF_FLOAT   2
    318 #define PR_ALIGN_OF_DOUBLE  2
    319 #define PR_ALIGN_OF_POINTER 2
    320 #define PR_ALIGN_OF_WORD    2
    321 
    322 #define PR_BYTES_PER_WORD_LOG2   2
    323 #define PR_BYTES_PER_DWORD_LOG2  3
    324 
    325 #elif defined(__sparc__)
    326 
    327 #undef	IS_LITTLE_ENDIAN
    328 #define	IS_BIG_ENDIAN 1
    329 
    330 #define PR_BYTES_PER_BYTE   1
    331 #define PR_BYTES_PER_SHORT  2
    332 #define PR_BYTES_PER_INT    4
    333 #define PR_BYTES_PER_INT64  8
    334 #define PR_BYTES_PER_LONG   4
    335 #define PR_BYTES_PER_FLOAT  4
    336 #define PR_BYTES_PER_DOUBLE 8
    337 #define PR_BYTES_PER_WORD   4
    338 #define PR_BYTES_PER_DWORD  8
    339 
    340 #define PR_BITS_PER_BYTE    8
    341 #define PR_BITS_PER_SHORT   16
    342 #define PR_BITS_PER_INT     32
    343 #define PR_BITS_PER_INT64   64
    344 #define PR_BITS_PER_LONG    32
    345 #define PR_BITS_PER_FLOAT   32
    346 #define PR_BITS_PER_DOUBLE  64
    347 #define PR_BITS_PER_WORD    32
    348 
    349 #define PR_BITS_PER_BYTE_LOG2   3
    350 #define PR_BITS_PER_SHORT_LOG2  4
    351 #define PR_BITS_PER_INT_LOG2    5
    352 #define PR_BITS_PER_INT64_LOG2  6
    353 #define PR_BITS_PER_LONG_LOG2   5
    354 #define PR_BITS_PER_FLOAT_LOG2  5
    355 #define PR_BITS_PER_DOUBLE_LOG2 6
    356 #define PR_BITS_PER_WORD_LOG2   5
    357 
    358 #define PR_ALIGN_OF_SHORT   2
    359 #define PR_ALIGN_OF_INT     4
    360 #define PR_ALIGN_OF_LONG    4
    361 #define PR_ALIGN_OF_INT64   8
    362 #define PR_ALIGN_OF_FLOAT   4
    363 #define PR_ALIGN_OF_DOUBLE  8
    364 #define PR_ALIGN_OF_POINTER 4
    365 #define PR_ALIGN_OF_WORD    4
    366 
    367 #define PR_BYTES_PER_WORD_LOG2   2
    368 #define PR_BYTES_PER_DWORD_LOG2  3
    369 
    370 #elif defined(__i386__)
    371 
    372 #define IS_LITTLE_ENDIAN 1
    373 #undef  IS_BIG_ENDIAN
    374 
    375 #define PR_BYTES_PER_BYTE   1
    376 #define PR_BYTES_PER_SHORT  2
    377 #define PR_BYTES_PER_INT    4
    378 #define PR_BYTES_PER_INT64  8
    379 #define PR_BYTES_PER_LONG   4
    380 #define PR_BYTES_PER_FLOAT  4
    381 #define PR_BYTES_PER_DOUBLE 8
    382 #define PR_BYTES_PER_WORD   4
    383 #define PR_BYTES_PER_DWORD  8
    384 
    385 #define PR_BITS_PER_BYTE    8
    386 #define PR_BITS_PER_SHORT   16
    387 #define PR_BITS_PER_INT     32
    388 #define PR_BITS_PER_INT64   64
    389 #define PR_BITS_PER_LONG    32
    390 #define PR_BITS_PER_FLOAT   32
    391 #define PR_BITS_PER_DOUBLE  64
    392 #define PR_BITS_PER_WORD    32
    393 
    394 #define PR_BITS_PER_BYTE_LOG2   3
    395 #define PR_BITS_PER_SHORT_LOG2  4
    396 #define PR_BITS_PER_INT_LOG2    5
    397 #define PR_BITS_PER_INT64_LOG2  6
    398 #define PR_BITS_PER_LONG_LOG2   5
    399 #define PR_BITS_PER_FLOAT_LOG2  5
    400 #define PR_BITS_PER_DOUBLE_LOG2 6
    401 #define PR_BITS_PER_WORD_LOG2   5
    402 
    403 #define PR_ALIGN_OF_SHORT   2
    404 #define PR_ALIGN_OF_INT     4
    405 #define PR_ALIGN_OF_LONG    4
    406 #define PR_ALIGN_OF_INT64   4
    407 #define PR_ALIGN_OF_FLOAT   4
    408 #define PR_ALIGN_OF_DOUBLE  4
    409 #define PR_ALIGN_OF_POINTER 4
    410 #define PR_ALIGN_OF_WORD    4
    411 
    412 #define PR_BYTES_PER_WORD_LOG2   2
    413 #define PR_BYTES_PER_DWORD_LOG2  3
    414 
    415 #elif defined(__mips__)
    416 
    417 #ifdef __MIPSEB__
    418 #define IS_BIG_ENDIAN 1
    419 #undef  IS_LITTLE_ENDIAN
    420 #elif defined(__MIPSEL__)
    421 #define IS_LITTLE_ENDIAN 1
    422 #undef  IS_BIG_ENDIAN
    423 #else
    424 #error "Unknown MIPS endianness."
    425 #endif
    426 
    427 #define PR_BYTES_PER_BYTE   1
    428 #define PR_BYTES_PER_SHORT  2
    429 #define PR_BYTES_PER_INT    4
    430 #define PR_BYTES_PER_INT64  8
    431 #define PR_BYTES_PER_LONG   4
    432 #define PR_BYTES_PER_FLOAT  4
    433 #define PR_BYTES_PER_DOUBLE 8
    434 #define PR_BYTES_PER_WORD   4
    435 #define PR_BYTES_PER_DWORD  8
    436 
    437 #define PR_BITS_PER_BYTE    8
    438 #define PR_BITS_PER_SHORT   16
    439 #define PR_BITS_PER_INT     32
    440 #define PR_BITS_PER_INT64   64
    441 #define PR_BITS_PER_LONG    32
    442 #define PR_BITS_PER_FLOAT   32
    443 #define PR_BITS_PER_DOUBLE  64
    444 #define PR_BITS_PER_WORD    32
    445 
    446 #define PR_BITS_PER_BYTE_LOG2   3
    447 #define PR_BITS_PER_SHORT_LOG2  4
    448 #define PR_BITS_PER_INT_LOG2    5
    449 #define PR_BITS_PER_INT64_LOG2  6
    450 #define PR_BITS_PER_LONG_LOG2   5
    451 #define PR_BITS_PER_FLOAT_LOG2  5
    452 #define PR_BITS_PER_DOUBLE_LOG2 6
    453 #define PR_BITS_PER_WORD_LOG2   5
    454 
    455 #define PR_ALIGN_OF_SHORT   2
    456 #define PR_ALIGN_OF_INT     4
    457 #define PR_ALIGN_OF_LONG    4
    458 #define PR_ALIGN_OF_INT64   8
    459 #define PR_ALIGN_OF_FLOAT   4
    460 #define PR_ALIGN_OF_DOUBLE  8
    461 #define PR_ALIGN_OF_POINTER 4
    462 #define PR_ALIGN_OF_WORD    4
    463 
    464 #define PR_BYTES_PER_WORD_LOG2   2
    465 #define PR_BYTES_PER_DWORD_LOG2  3
    466 
    467 #elif defined(__arm__)
    468 
    469 #define IS_LITTLE_ENDIAN 1
    470 #undef  IS_BIG_ENDIAN
    471 
    472 #define PR_BYTES_PER_BYTE   1
    473 #define PR_BYTES_PER_SHORT  2
    474 #define PR_BYTES_PER_INT    4
    475 #define PR_BYTES_PER_INT64  8
    476 #define PR_BYTES_PER_LONG   4
    477 #define PR_BYTES_PER_FLOAT  4
    478 #define PR_BYTES_PER_DOUBLE 8
    479 #define PR_BYTES_PER_WORD   4
    480 #define PR_BYTES_PER_DWORD  8
    481 
    482 #define PR_BITS_PER_BYTE    8
    483 #define PR_BITS_PER_SHORT   16
    484 #define PR_BITS_PER_INT     32
    485 #define PR_BITS_PER_INT64   64
    486 #define PR_BITS_PER_LONG    32
    487 #define PR_BITS_PER_FLOAT   32
    488 #define PR_BITS_PER_DOUBLE  64
    489 #define PR_BITS_PER_WORD    32
    490 
    491 #define PR_BITS_PER_BYTE_LOG2   3
    492 #define PR_BITS_PER_SHORT_LOG2  4
    493 #define PR_BITS_PER_INT_LOG2    5
    494 #define PR_BITS_PER_INT64_LOG2  6
    495 #define PR_BITS_PER_LONG_LOG2   5
    496 #define PR_BITS_PER_FLOAT_LOG2  5
    497 #define PR_BITS_PER_DOUBLE_LOG2 6
    498 #define PR_BITS_PER_WORD_LOG2   5
    499 
    500 #define PR_ALIGN_OF_SHORT   2
    501 #define PR_ALIGN_OF_INT     4
    502 #define PR_ALIGN_OF_LONG    4
    503 #define PR_ALIGN_OF_INT64   4
    504 #define PR_ALIGN_OF_FLOAT   4
    505 #define PR_ALIGN_OF_DOUBLE  4
    506 #define PR_ALIGN_OF_POINTER 4
    507 #define PR_ALIGN_OF_WORD    4
    508 
    509 #define PR_BYTES_PER_WORD_LOG2   2
    510 #define PR_BYTES_PER_DWORD_LOG2  3
    511 
    512 #elif defined(__hppa__)
    513 
    514 #undef  IS_LITTLE_ENDIAN
    515 #define IS_BIG_ENDIAN    1
    516 
    517 #define PR_BYTES_PER_BYTE   1
    518 #define PR_BYTES_PER_SHORT  2
    519 #define PR_BYTES_PER_INT    4
    520 #define PR_BYTES_PER_INT64  8
    521 #define PR_BYTES_PER_LONG   4
    522 #define PR_BYTES_PER_FLOAT  4
    523 #define PR_BYTES_PER_DOUBLE 8
    524 #define PR_BYTES_PER_WORD   4
    525 #define PR_BYTES_PER_DWORD  8
    526 
    527 #define PR_BITS_PER_BYTE    8
    528 #define PR_BITS_PER_SHORT   16
    529 #define PR_BITS_PER_INT     32
    530 #define PR_BITS_PER_INT64   64
    531 #define PR_BITS_PER_LONG    32
    532 #define PR_BITS_PER_FLOAT   32
    533 #define PR_BITS_PER_DOUBLE  64
    534 #define PR_BITS_PER_WORD    32
    535 
    536 #define PR_BITS_PER_BYTE_LOG2   3
    537 #define PR_BITS_PER_SHORT_LOG2  4
    538 #define PR_BITS_PER_INT_LOG2    5
    539 #define PR_BITS_PER_INT64_LOG2  6
    540 #define PR_BITS_PER_LONG_LOG2   5
    541 #define PR_BITS_PER_FLOAT_LOG2  5
    542 #define PR_BITS_PER_DOUBLE_LOG2 6
    543 #define PR_BITS_PER_WORD_LOG2   5
    544 
    545 #define PR_ALIGN_OF_SHORT   2
    546 #define PR_ALIGN_OF_INT     4
    547 #define PR_ALIGN_OF_LONG    4
    548 #define PR_ALIGN_OF_INT64   8
    549 #define PR_ALIGN_OF_FLOAT   4
    550 #define PR_ALIGN_OF_DOUBLE  8
    551 #define PR_ALIGN_OF_POINTER 4
    552 #define PR_ALIGN_OF_WORD    4
    553 
    554 #define PR_BYTES_PER_WORD_LOG2   2
    555 #define PR_BYTES_PER_DWORD_LOG2  3
    556 
    557 #elif defined(__s390x__)
    558 
    559 #define IS_BIG_ENDIAN 1
    560 #undef  IS_LITTLE_ENDIAN
    561 #define IS_64
    562 
    563 #define PR_BYTES_PER_BYTE   1
    564 #define PR_BYTES_PER_SHORT  2
    565 #define PR_BYTES_PER_INT    4
    566 #define PR_BYTES_PER_INT64  8
    567 #define PR_BYTES_PER_LONG   8
    568 #define PR_BYTES_PER_FLOAT  4
    569 #define PR_BYTES_PER_DOUBLE 8
    570 #define PR_BYTES_PER_WORD   8
    571 #define PR_BYTES_PER_DWORD  8
    572 
    573 #define PR_BITS_PER_BYTE    8
    574 #define PR_BITS_PER_SHORT   16
    575 #define PR_BITS_PER_INT     32
    576 #define PR_BITS_PER_INT64   64
    577 #define PR_BITS_PER_LONG    64
    578 #define PR_BITS_PER_FLOAT   32
    579 #define PR_BITS_PER_DOUBLE  64
    580 #define PR_BITS_PER_WORD    64
    581 
    582 #define PR_BITS_PER_BYTE_LOG2   3
    583 #define PR_BITS_PER_SHORT_LOG2  4
    584 #define PR_BITS_PER_INT_LOG2    5
    585 #define PR_BITS_PER_INT64_LOG2  6
    586 #define PR_BITS_PER_LONG_LOG2   6
    587 #define PR_BITS_PER_FLOAT_LOG2  5
    588 #define PR_BITS_PER_DOUBLE_LOG2 6
    589 #define PR_BITS_PER_WORD_LOG2   6
    590 
    591 #define PR_ALIGN_OF_SHORT   2
    592 #define PR_ALIGN_OF_INT     4
    593 #define PR_ALIGN_OF_LONG    8
    594 #define PR_ALIGN_OF_INT64   8
    595 #define PR_ALIGN_OF_FLOAT   4
    596 #define PR_ALIGN_OF_DOUBLE  8
    597 #define PR_ALIGN_OF_POINTER 8
    598 #define PR_ALIGN_OF_WORD    8
    599 
    600 #define PR_BYTES_PER_WORD_LOG2   3
    601 #define PR_BYTES_PER_DWORD_LOG2  3
    602 
    603 #elif defined(__s390__)
    604 
    605 #define IS_BIG_ENDIAN 1
    606 #undef  IS_LITTLE_ENDIAN
    607 
    608 #define PR_BYTES_PER_BYTE   1
    609 #define PR_BYTES_PER_SHORT  2
    610 #define PR_BYTES_PER_INT    4
    611 #define PR_BYTES_PER_INT64  8
    612 #define PR_BYTES_PER_LONG   4
    613 #define PR_BYTES_PER_FLOAT  4
    614 #define PR_BYTES_PER_DOUBLE 8
    615 #define PR_BYTES_PER_WORD   4
    616 #define PR_BYTES_PER_DWORD  8
    617 
    618 #define PR_BITS_PER_BYTE    8
    619 #define PR_BITS_PER_SHORT   16
    620 #define PR_BITS_PER_INT     32
    621 #define PR_BITS_PER_INT64   64
    622 #define PR_BITS_PER_LONG    32
    623 #define PR_BITS_PER_FLOAT   32
    624 #define PR_BITS_PER_DOUBLE  64
    625 #define PR_BITS_PER_WORD    32
    626 
    627 #define PR_BITS_PER_BYTE_LOG2   3
    628 #define PR_BITS_PER_SHORT_LOG2  4
    629 #define PR_BITS_PER_INT_LOG2    5
    630 #define PR_BITS_PER_INT64_LOG2  6
    631 #define PR_BITS_PER_LONG_LOG2   5
    632 #define PR_BITS_PER_FLOAT_LOG2  5
    633 #define PR_BITS_PER_DOUBLE_LOG2 6
    634 #define PR_BITS_PER_WORD_LOG2   5
    635 
    636 #define PR_ALIGN_OF_SHORT   2
    637 #define PR_ALIGN_OF_INT     4
    638 #define PR_ALIGN_OF_LONG    4
    639 #define PR_ALIGN_OF_INT64   4
    640 #define PR_ALIGN_OF_FLOAT   4
    641 #define PR_ALIGN_OF_DOUBLE  4
    642 #define PR_ALIGN_OF_POINTER 4
    643 #define PR_ALIGN_OF_WORD    4
    644 
    645 #define PR_BYTES_PER_WORD_LOG2   2
    646 #define PR_BYTES_PER_DWORD_LOG2  3
    647 
    648 #else
    649 
    650 #error "Unknown CPU architecture"
    651 
    652 #endif
    653 
    654 #define	HAVE_LONG_LONG
    655 #if PR_ALIGN_OF_DOUBLE == 8
    656 #define HAVE_ALIGNED_DOUBLES
    657 #endif
    658 #if PR_ALIGN_OF_INT64 == 8
    659 #define HAVE_ALIGNED_LONGLONGS
    660 #endif
    661 
    662 #ifndef NO_NSPR_10_SUPPORT
    663 
    664 #define BYTES_PER_BYTE		PR_BYTES_PER_BYTE
    665 #define BYTES_PER_SHORT 	PR_BYTES_PER_SHORT
    666 #define BYTES_PER_INT 		PR_BYTES_PER_INT
    667 #define BYTES_PER_INT64		PR_BYTES_PER_INT64
    668 #define BYTES_PER_LONG		PR_BYTES_PER_LONG
    669 #define BYTES_PER_FLOAT		PR_BYTES_PER_FLOAT
    670 #define BYTES_PER_DOUBLE	PR_BYTES_PER_DOUBLE
    671 #define BYTES_PER_WORD		PR_BYTES_PER_WORD
    672 #define BYTES_PER_DWORD		PR_BYTES_PER_DWORD
    673 
    674 #define BITS_PER_BYTE		PR_BITS_PER_BYTE
    675 #define BITS_PER_SHORT		PR_BITS_PER_SHORT
    676 #define BITS_PER_INT		PR_BITS_PER_INT
    677 #define BITS_PER_INT64		PR_BITS_PER_INT64
    678 #define BITS_PER_LONG		PR_BITS_PER_LONG
    679 #define BITS_PER_FLOAT		PR_BITS_PER_FLOAT
    680 #define BITS_PER_DOUBLE		PR_BITS_PER_DOUBLE
    681 #define BITS_PER_WORD		PR_BITS_PER_WORD
    682 
    683 #define BITS_PER_BYTE_LOG2	PR_BITS_PER_BYTE_LOG2
    684 #define BITS_PER_SHORT_LOG2	PR_BITS_PER_SHORT_LOG2
    685 #define BITS_PER_INT_LOG2	PR_BITS_PER_INT_LOG2
    686 #define BITS_PER_INT64_LOG2	PR_BITS_PER_INT64_LOG2
    687 #define BITS_PER_LONG_LOG2	PR_BITS_PER_LONG_LOG2
    688 #define BITS_PER_FLOAT_LOG2	PR_BITS_PER_FLOAT_LOG2
    689 #define BITS_PER_DOUBLE_LOG2 	PR_BITS_PER_DOUBLE_LOG2
    690 #define BITS_PER_WORD_LOG2	PR_BITS_PER_WORD_LOG2
    691 
    692 #define ALIGN_OF_SHORT		PR_ALIGN_OF_SHORT
    693 #define ALIGN_OF_INT		PR_ALIGN_OF_INT
    694 #define ALIGN_OF_LONG		PR_ALIGN_OF_LONG
    695 #define ALIGN_OF_INT64		PR_ALIGN_OF_INT64
    696 #define ALIGN_OF_FLOAT		PR_ALIGN_OF_FLOAT
    697 #define ALIGN_OF_DOUBLE		PR_ALIGN_OF_DOUBLE
    698 #define ALIGN_OF_POINTER	PR_ALIGN_OF_POINTER
    699 #define ALIGN_OF_WORD		PR_ALIGN_OF_WORD
    700 
    701 #define BYTES_PER_WORD_LOG2	PR_BYTES_PER_WORD_LOG2
    702 #define BYTES_PER_DWORD_LOG2	PR_BYTES_PER_DWORD_LOG2
    703 #define WORDS_PER_DWORD_LOG2	PR_WORDS_PER_DWORD_LOG2
    704 
    705 #endif /* NO_NSPR_10_SUPPORT */
    706 
    707 #endif /* nspr_cpucfg___ */
    708