delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / nsplugins / sdk / prcpucfg.h
blob247c4db6bd12cfb513787c0a23dbdc7d2cea57c1
1 //krazy:excludeall=copyright
2 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 /* ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Netscape Portable Runtime (NSPR).
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998-2000
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #ifndef nspr_cpucfg___
40 #define nspr_cpucfg___
42 #ifndef XP_UNIX
43 #define XP_UNIX
44 #endif
46 #ifndef LINUX
47 #define LINUX
48 #endif
50 #define PR_AF_INET6 10 /* same as AF_INET6 */
52 #ifdef __powerpc__
54 #undef IS_LITTLE_ENDIAN
55 #define IS_BIG_ENDIAN 1
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 4
62 #define PR_BYTES_PER_FLOAT 4
63 #define PR_BYTES_PER_DOUBLE 8
64 #define PR_BYTES_PER_WORD 4
65 #define PR_BYTES_PER_DWORD 8
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 32
72 #define PR_BITS_PER_FLOAT 32
73 #define PR_BITS_PER_DOUBLE 64
74 #define PR_BITS_PER_WORD 32
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 5
81 #define PR_BITS_PER_FLOAT_LOG2 5
82 #define PR_BITS_PER_DOUBLE_LOG2 6
83 #define PR_BITS_PER_WORD_LOG2 5
85 #define PR_ALIGN_OF_SHORT 2
86 #define PR_ALIGN_OF_INT 4
87 #define PR_ALIGN_OF_LONG 4
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 4
92 #define PR_ALIGN_OF_WORD 4
94 #define PR_BYTES_PER_WORD_LOG2 2
95 #define PR_BYTES_PER_DWORD_LOG2 3
97 #elif defined(__alpha)
99 #define IS_LITTLE_ENDIAN 1
100 #undef IS_BIG_ENDIAN
101 #define IS_64
103 #define PR_BYTES_PER_BYTE 1
104 #define PR_BYTES_PER_SHORT 2
105 #define PR_BYTES_PER_INT 4
106 #define PR_BYTES_PER_INT64 8
107 #define PR_BYTES_PER_LONG 8
108 #define PR_BYTES_PER_FLOAT 4
109 #define PR_BYTES_PER_DOUBLE 8
110 #define PR_BYTES_PER_WORD 8
111 #define PR_BYTES_PER_DWORD 8
113 #define PR_BITS_PER_BYTE 8
114 #define PR_BITS_PER_SHORT 16
115 #define PR_BITS_PER_INT 32
116 #define PR_BITS_PER_INT64 64
117 #define PR_BITS_PER_LONG 64
118 #define PR_BITS_PER_FLOAT 32
119 #define PR_BITS_PER_DOUBLE 64
120 #define PR_BITS_PER_WORD 64
122 #define PR_BITS_PER_BYTE_LOG2 3
123 #define PR_BITS_PER_SHORT_LOG2 4
124 #define PR_BITS_PER_INT_LOG2 5
125 #define PR_BITS_PER_INT64_LOG2 6
126 #define PR_BITS_PER_LONG_LOG2 6
127 #define PR_BITS_PER_FLOAT_LOG2 5
128 #define PR_BITS_PER_DOUBLE_LOG2 6
129 #define PR_BITS_PER_WORD_LOG2 6
131 #define PR_ALIGN_OF_SHORT 2
132 #define PR_ALIGN_OF_INT 4
133 #define PR_ALIGN_OF_LONG 8
134 #define PR_ALIGN_OF_INT64 8
135 #define PR_ALIGN_OF_FLOAT 4
136 #define PR_ALIGN_OF_DOUBLE 8
137 #define PR_ALIGN_OF_POINTER 8
138 #define PR_ALIGN_OF_WORD 8
140 #define PR_BYTES_PER_WORD_LOG2 3
141 #define PR_BYTES_PER_DWORD_LOG2 3
143 #elif defined(__ia64__)
145 #define IS_LITTLE_ENDIAN 1
146 #undef IS_BIG_ENDIAN
147 #define IS_64
149 #define PR_BYTES_PER_BYTE 1
150 #define PR_BYTES_PER_SHORT 2
151 #define PR_BYTES_PER_INT 4
152 #define PR_BYTES_PER_INT64 8
153 #define PR_BYTES_PER_LONG 8
154 #define PR_BYTES_PER_FLOAT 4
155 #define PR_BYTES_PER_DOUBLE 8
156 #define PR_BYTES_PER_WORD 8
157 #define PR_BYTES_PER_DWORD 8
159 #define PR_BITS_PER_BYTE 8
160 #define PR_BITS_PER_SHORT 16
161 #define PR_BITS_PER_INT 32
162 #define PR_BITS_PER_INT64 64
163 #define PR_BITS_PER_LONG 64
164 #define PR_BITS_PER_FLOAT 32
165 #define PR_BITS_PER_DOUBLE 64
166 #define PR_BITS_PER_WORD 64
168 #define PR_BITS_PER_BYTE_LOG2 3
169 #define PR_BITS_PER_SHORT_LOG2 4
170 #define PR_BITS_PER_INT_LOG2 5
171 #define PR_BITS_PER_INT64_LOG2 6
172 #define PR_BITS_PER_LONG_LOG2 6
173 #define PR_BITS_PER_FLOAT_LOG2 5
174 #define PR_BITS_PER_DOUBLE_LOG2 6
175 #define PR_BITS_PER_WORD_LOG2 6
177 #define PR_ALIGN_OF_SHORT 2
178 #define PR_ALIGN_OF_INT 4
179 #define PR_ALIGN_OF_LONG 8
180 #define PR_ALIGN_OF_INT64 8
181 #define PR_ALIGN_OF_FLOAT 4
182 #define PR_ALIGN_OF_DOUBLE 8
183 #define PR_ALIGN_OF_POINTER 8
184 #define PR_ALIGN_OF_WORD 8
186 #define PR_BYTES_PER_WORD_LOG2 3
187 #define PR_BYTES_PER_DWORD_LOG2 3
189 #elif defined(__x86_64__)
191 #define IS_LITTLE_ENDIAN 1
192 #undef IS_BIG_ENDIAN
193 #define IS_64
195 #define PR_BYTES_PER_BYTE 1
196 #define PR_BYTES_PER_SHORT 2
197 #define PR_BYTES_PER_INT 4
198 #define PR_BYTES_PER_INT64 8
199 #define PR_BYTES_PER_LONG 8
200 #define PR_BYTES_PER_FLOAT 4
201 #define PR_BYTES_PER_DOUBLE 8
202 #define PR_BYTES_PER_WORD 8
203 #define PR_BYTES_PER_DWORD 8
205 #define PR_BITS_PER_BYTE 8
206 #define PR_BITS_PER_SHORT 16
207 #define PR_BITS_PER_INT 32
208 #define PR_BITS_PER_INT64 64
209 #define PR_BITS_PER_LONG 64
210 #define PR_BITS_PER_FLOAT 32
211 #define PR_BITS_PER_DOUBLE 64
212 #define PR_BITS_PER_WORD 64
214 #define PR_BITS_PER_BYTE_LOG2 3
215 #define PR_BITS_PER_SHORT_LOG2 4
216 #define PR_BITS_PER_INT_LOG2 5
217 #define PR_BITS_PER_INT64_LOG2 6
218 #define PR_BITS_PER_LONG_LOG2 6
219 #define PR_BITS_PER_FLOAT_LOG2 5
220 #define PR_BITS_PER_DOUBLE_LOG2 6
221 #define PR_BITS_PER_WORD_LOG2 6
223 #define PR_ALIGN_OF_SHORT 2
224 #define PR_ALIGN_OF_INT 4
225 #define PR_ALIGN_OF_LONG 8
226 #define PR_ALIGN_OF_INT64 8
227 #define PR_ALIGN_OF_FLOAT 4
228 #define PR_ALIGN_OF_DOUBLE 8
229 #define PR_ALIGN_OF_POINTER 8
230 #define PR_ALIGN_OF_WORD 8
232 #define PR_BYTES_PER_WORD_LOG2 3
233 #define PR_BYTES_PER_DWORD_LOG2 3
235 #elif defined(__mc68000__)
237 #undef IS_LITTLE_ENDIAN
238 #define IS_BIG_ENDIAN 1
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 4
245 #define PR_BYTES_PER_FLOAT 4
246 #define PR_BYTES_PER_DOUBLE 8
247 #define PR_BYTES_PER_WORD 4
248 #define PR_BYTES_PER_DWORD 8
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 32
255 #define PR_BITS_PER_FLOAT 32
256 #define PR_BITS_PER_DOUBLE 64
257 #define PR_BITS_PER_WORD 32
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 5
264 #define PR_BITS_PER_FLOAT_LOG2 5
265 #define PR_BITS_PER_DOUBLE_LOG2 6
266 #define PR_BITS_PER_WORD_LOG2 5
268 #define PR_ALIGN_OF_SHORT 2
269 #define PR_ALIGN_OF_INT 2
270 #define PR_ALIGN_OF_LONG 2
271 #define PR_ALIGN_OF_INT64 2
272 #define PR_ALIGN_OF_FLOAT 2
273 #define PR_ALIGN_OF_DOUBLE 2
274 #define PR_ALIGN_OF_POINTER 2
275 #define PR_ALIGN_OF_WORD 2
277 #define PR_BYTES_PER_WORD_LOG2 2
278 #define PR_BYTES_PER_DWORD_LOG2 3
280 #elif defined(__sparc__) || (defined(__SUNPRO_CC) && defined(__sparc))
282 #undef IS_LITTLE_ENDIAN
283 #define IS_BIG_ENDIAN 1
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
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
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
313 #define PR_ALIGN_OF_SHORT 2
314 #define PR_ALIGN_OF_INT 4
315 #define PR_ALIGN_OF_LONG 4
316 #define PR_ALIGN_OF_INT64 8
317 #define PR_ALIGN_OF_FLOAT 4
318 #define PR_ALIGN_OF_DOUBLE 8
319 #define PR_ALIGN_OF_POINTER 4
320 #define PR_ALIGN_OF_WORD 4
322 #define PR_BYTES_PER_WORD_LOG2 2
323 #define PR_BYTES_PER_DWORD_LOG2 3
325 #elif defined(__i386__) || (defined(__SUNPRO_CC) && defined(__i386))
327 #define IS_LITTLE_ENDIAN 1
328 #undef IS_BIG_ENDIAN
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
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
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
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 4
362 #define PR_ALIGN_OF_FLOAT 4
363 #define PR_ALIGN_OF_DOUBLE 4
364 #define PR_ALIGN_OF_POINTER 4
365 #define PR_ALIGN_OF_WORD 4
367 #define PR_BYTES_PER_WORD_LOG2 2
368 #define PR_BYTES_PER_DWORD_LOG2 3
370 #elif defined(__mips__)
372 #ifdef __MIPSEB__
373 #define IS_BIG_ENDIAN 1
374 #undef IS_LITTLE_ENDIAN
375 #elif defined(__MIPSEL__)
376 #define IS_LITTLE_ENDIAN 1
377 #undef IS_BIG_ENDIAN
378 #else
379 #error "Unknown MIPS endianness."
380 #endif
382 #define PR_BYTES_PER_BYTE 1
383 #define PR_BYTES_PER_SHORT 2
384 #define PR_BYTES_PER_INT 4
385 #define PR_BYTES_PER_INT64 8
386 #define PR_BYTES_PER_LONG 4
387 #define PR_BYTES_PER_FLOAT 4
388 #define PR_BYTES_PER_DOUBLE 8
389 #define PR_BYTES_PER_WORD 4
390 #define PR_BYTES_PER_DWORD 8
392 #define PR_BITS_PER_BYTE 8
393 #define PR_BITS_PER_SHORT 16
394 #define PR_BITS_PER_INT 32
395 #define PR_BITS_PER_INT64 64
396 #define PR_BITS_PER_LONG 32
397 #define PR_BITS_PER_FLOAT 32
398 #define PR_BITS_PER_DOUBLE 64
399 #define PR_BITS_PER_WORD 32
401 #define PR_BITS_PER_BYTE_LOG2 3
402 #define PR_BITS_PER_SHORT_LOG2 4
403 #define PR_BITS_PER_INT_LOG2 5
404 #define PR_BITS_PER_INT64_LOG2 6
405 #define PR_BITS_PER_LONG_LOG2 5
406 #define PR_BITS_PER_FLOAT_LOG2 5
407 #define PR_BITS_PER_DOUBLE_LOG2 6
408 #define PR_BITS_PER_WORD_LOG2 5
410 #define PR_ALIGN_OF_SHORT 2
411 #define PR_ALIGN_OF_INT 4
412 #define PR_ALIGN_OF_LONG 4
413 #define PR_ALIGN_OF_INT64 8
414 #define PR_ALIGN_OF_FLOAT 4
415 #define PR_ALIGN_OF_DOUBLE 8
416 #define PR_ALIGN_OF_POINTER 4
417 #define PR_ALIGN_OF_WORD 4
419 #define PR_BYTES_PER_WORD_LOG2 2
420 #define PR_BYTES_PER_DWORD_LOG2 3
422 #elif defined(__arm__)
424 #define IS_LITTLE_ENDIAN 1
425 #undef IS_BIG_ENDIAN
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
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
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
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 4
459 #define PR_ALIGN_OF_FLOAT 4
460 #define PR_ALIGN_OF_DOUBLE 4
461 #define PR_ALIGN_OF_POINTER 4
462 #define PR_ALIGN_OF_WORD 4
464 #define PR_BYTES_PER_WORD_LOG2 2
465 #define PR_BYTES_PER_DWORD_LOG2 3
467 #elif defined(__hppa__)
469 #undef IS_LITTLE_ENDIAN
470 #define IS_BIG_ENDIAN 1
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
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
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
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 8
504 #define PR_ALIGN_OF_FLOAT 4
505 #define PR_ALIGN_OF_DOUBLE 8
506 #define PR_ALIGN_OF_POINTER 4
507 #define PR_ALIGN_OF_WORD 4
509 #define PR_BYTES_PER_WORD_LOG2 2
510 #define PR_BYTES_PER_DWORD_LOG2 3
512 #elif defined(__s390x__)
514 #define IS_BIG_ENDIAN 1
515 #undef IS_LITTLE_ENDIAN
516 #define IS_64
518 #define PR_BYTES_PER_BYTE 1
519 #define PR_BYTES_PER_SHORT 2
520 #define PR_BYTES_PER_INT 4
521 #define PR_BYTES_PER_INT64 8
522 #define PR_BYTES_PER_LONG 8
523 #define PR_BYTES_PER_FLOAT 4
524 #define PR_BYTES_PER_DOUBLE 8
525 #define PR_BYTES_PER_WORD 8
526 #define PR_BYTES_PER_DWORD 8
528 #define PR_BITS_PER_BYTE 8
529 #define PR_BITS_PER_SHORT 16
530 #define PR_BITS_PER_INT 32
531 #define PR_BITS_PER_INT64 64
532 #define PR_BITS_PER_LONG 64
533 #define PR_BITS_PER_FLOAT 32
534 #define PR_BITS_PER_DOUBLE 64
535 #define PR_BITS_PER_WORD 64
537 #define PR_BITS_PER_BYTE_LOG2 3
538 #define PR_BITS_PER_SHORT_LOG2 4
539 #define PR_BITS_PER_INT_LOG2 5
540 #define PR_BITS_PER_INT64_LOG2 6
541 #define PR_BITS_PER_LONG_LOG2 6
542 #define PR_BITS_PER_FLOAT_LOG2 5
543 #define PR_BITS_PER_DOUBLE_LOG2 6
544 #define PR_BITS_PER_WORD_LOG2 6
546 #define PR_ALIGN_OF_SHORT 2
547 #define PR_ALIGN_OF_INT 4
548 #define PR_ALIGN_OF_LONG 8
549 #define PR_ALIGN_OF_INT64 8
550 #define PR_ALIGN_OF_FLOAT 4
551 #define PR_ALIGN_OF_DOUBLE 8
552 #define PR_ALIGN_OF_POINTER 8
553 #define PR_ALIGN_OF_WORD 8
555 #define PR_BYTES_PER_WORD_LOG2 3
556 #define PR_BYTES_PER_DWORD_LOG2 3
558 #elif defined(__s390__)
560 #define IS_BIG_ENDIAN 1
561 #undef IS_LITTLE_ENDIAN
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 4
568 #define PR_BYTES_PER_FLOAT 4
569 #define PR_BYTES_PER_DOUBLE 8
570 #define PR_BYTES_PER_WORD 4
571 #define PR_BYTES_PER_DWORD 8
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 32
578 #define PR_BITS_PER_FLOAT 32
579 #define PR_BITS_PER_DOUBLE 64
580 #define PR_BITS_PER_WORD 32
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 5
587 #define PR_BITS_PER_FLOAT_LOG2 5
588 #define PR_BITS_PER_DOUBLE_LOG2 6
589 #define PR_BITS_PER_WORD_LOG2 5
591 #define PR_ALIGN_OF_SHORT 2
592 #define PR_ALIGN_OF_INT 4
593 #define PR_ALIGN_OF_LONG 4
594 #define PR_ALIGN_OF_INT64 4
595 #define PR_ALIGN_OF_FLOAT 4
596 #define PR_ALIGN_OF_DOUBLE 4
597 #define PR_ALIGN_OF_POINTER 4
598 #define PR_ALIGN_OF_WORD 4
600 #define PR_BYTES_PER_WORD_LOG2 2
601 #define PR_BYTES_PER_DWORD_LOG2 3
603 #else
605 #error "Unknown CPU architecture"
607 #endif
609 #define HAVE_LONG_LONG 1
610 #if PR_ALIGN_OF_DOUBLE == 8
611 #define HAVE_ALIGNED_DOUBLES
612 #endif
613 #if PR_ALIGN_OF_INT64 == 8
614 #define HAVE_ALIGNED_LONGLONGS
615 #endif
617 #ifndef NO_NSPR_10_SUPPORT
619 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
620 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
621 #define BYTES_PER_INT PR_BYTES_PER_INT
622 #define BYTES_PER_INT64 PR_BYTES_PER_INT64
623 #define BYTES_PER_LONG PR_BYTES_PER_LONG
624 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
625 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
626 #define BYTES_PER_WORD PR_BYTES_PER_WORD
627 #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
629 #define BITS_PER_BYTE PR_BITS_PER_BYTE
630 #define BITS_PER_SHORT PR_BITS_PER_SHORT
631 #define BITS_PER_INT PR_BITS_PER_INT
632 #define BITS_PER_INT64 PR_BITS_PER_INT64
633 #ifndef BITS_PER_LONG
634 #define BITS_PER_LONG PR_BITS_PER_LONG
635 #endif
636 #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
637 #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
638 #define BITS_PER_WORD PR_BITS_PER_WORD
640 #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
641 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
642 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
643 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
644 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
645 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
646 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
647 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
649 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
650 #define ALIGN_OF_INT PR_ALIGN_OF_INT
651 #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
652 #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
653 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
654 #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
655 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
656 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
658 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
659 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
660 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
662 #endif /* NO_NSPR_10_SUPPORT */
664 #endif /* nspr_cpucfg___ */