PageRenderTime 104ms CodeModel.GetById 60ms app.highlight 6ms RepoModel.GetById 34ms app.codeStats 0ms

/gecko_api/include/md/_linux.cfg

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