Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nspr_cpucfg___
7 #define nspr_cpucfg___
9 #ifndef XP_UNIX
10 #define XP_UNIX
11 #endif
13 #ifndef RISCOS
14 #define RISCOS
15 #endif
17 #define IS_LITTLE_ENDIAN 1
18 #undef IS_BIG_ENDIAN
19 #ifndef HAVE_LONG_LONG
20 #define HAVE_LONG_LONG
21 #endif
22 #undef HAVE_ALIGNED_DOUBLES
23 #undef HAVE_ALIGNED_LONGLONGS
25 #define PR_BYTES_PER_BYTE 1
26 #define PR_BYTES_PER_SHORT 2
27 #define PR_BYTES_PER_INT 4
28 #define PR_BYTES_PER_INT64 8
29 #define PR_BYTES_PER_LONG 4
30 #define PR_BYTES_PER_FLOAT 4
31 #define PR_BYTES_PER_DOUBLE 8
32 #define PR_BYTES_PER_WORD 4
33 #define PR_BYTES_PER_DWORD 8
35 #define PR_BITS_PER_BYTE 8
36 #define PR_BITS_PER_SHORT 16
37 #define PR_BITS_PER_INT 32
38 #define PR_BITS_PER_INT64 64
39 #define PR_BITS_PER_LONG 32
40 #define PR_BITS_PER_FLOAT 32
41 #define PR_BITS_PER_DOUBLE 64
42 #define PR_BITS_PER_WORD 32
44 #define PR_BITS_PER_BYTE_LOG2 3
45 #define PR_BITS_PER_SHORT_LOG2 4
46 #define PR_BITS_PER_INT_LOG2 5
47 #define PR_BITS_PER_INT64_LOG2 6
48 #define PR_BITS_PER_LONG_LOG2 5
49 #define PR_BITS_PER_FLOAT_LOG2 5
50 #define PR_BITS_PER_DOUBLE_LOG2 6
51 #define PR_BITS_PER_WORD_LOG2 5
53 #define PR_ALIGN_OF_SHORT 2
54 #define PR_ALIGN_OF_INT 4
55 #define PR_ALIGN_OF_LONG 4
56 #define PR_ALIGN_OF_INT64 4
57 #define PR_ALIGN_OF_FLOAT 4
58 #define PR_ALIGN_OF_DOUBLE 4
59 #define PR_ALIGN_OF_POINTER 4
60 #define PR_ALIGN_OF_WORD 4
62 #define PR_BYTES_PER_WORD_LOG2 2
63 #define PR_BYTES_PER_DWORD_LOG2 3
64 #define PR_WORDS_PER_DWORD_LOG2 1
66 #ifndef NO_NSPR_10_SUPPORT
68 #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
69 #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
70 #define BYTES_PER_INT PR_BYTES_PER_INT
71 #define BYTES_PER_INT64 PR_BYTES_PER_INT64
72 #define BYTES_PER_LONG PR_BYTES_PER_LONG
73 #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
74 #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
75 #define BYTES_PER_WORD PR_BYTES_PER_WORD
76 #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
78 #define BITS_PER_BYTE PR_BITS_PER_BYTE
79 #define BITS_PER_SHORT PR_BITS_PER_SHORT
80 #define BITS_PER_INT PR_BITS_PER_INT
81 #define BITS_PER_INT64 PR_BITS_PER_INT64
82 #define BITS_PER_LONG PR_BITS_PER_LONG
83 #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
84 #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
85 #define BITS_PER_WORD PR_BITS_PER_WORD
87 #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
88 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
89 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
90 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
91 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
92 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
93 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
94 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
96 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
97 #define ALIGN_OF_INT PR_ALIGN_OF_INT
98 #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
99 #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
100 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
101 #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
102 #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
103 #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
105 #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
106 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
107 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
109 #endif /* NO_NSPR_10_SUPPORT */
111 #endif /* nspr_cpucfg___ */