|
|
1.1 root 1: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2: *
3: * The contents of this file are subject to the Netscape Public
4: * License Version 1.1 (the "License"); you may not use this file
5: * except in compliance with the License. You may obtain a copy of
6: * the License at http://www.mozilla.org/NPL/
7: *
8: * Software distributed under the License is distributed on an "AS
9: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10: * implied. See the License for the specific language governing
11: * rights and limitations under the License.
12: *
13: * The Original Code is Mozilla Communicator client code, released
14: * March 31, 1998.
15: *
16: * The Initial Developer of the Original Code is Netscape
17: * Communications Corporation. Portions created by Netscape are
18: * Copyright (C) 1998 Netscape Communications Corporation. All
19: * Rights Reserved.
20: *
21: * Contributor(s):
22: *
23: * Alternatively, the contents of this file may be used under the
24: * terms of the GNU Public License (the "GPL"), in which case the
25: * provisions of the GPL are applicable instead of those above.
26: * If you wish to allow use of your version of this file only
27: * under the terms of the GPL and not to allow others to use your
28: * version of this file under the NPL, indicate your decision by
29: * deleting the provisions above and replace them with the notice
30: * and other provisions required by the GPL. If you do not delete
31: * the provisions above, a recipient may use your version of this
32: * file under either the NPL or the GPL.
33: */
34:
35: #ifndef js_cpucfg___
36: #define js_cpucfg___
37:
38: #include "jsosdep.h"
39:
40: #ifdef XP_MAC
41: #undef IS_LITTLE_ENDIAN
42: #define IS_BIG_ENDIAN 1
43:
44: #define JS_BYTES_PER_BYTE 1L
45: #define JS_BYTES_PER_SHORT 2L
46: #define JS_BYTES_PER_INT 4L
47: #define JS_BYTES_PER_INT64 8L
48: #define JS_BYTES_PER_LONG 4L
49: #define JS_BYTES_PER_FLOAT 4L
50: #define JS_BYTES_PER_DOUBLE 8L
51: #define JS_BYTES_PER_WORD 4L
52: #define JS_BYTES_PER_DWORD 8L
53:
54: #define JS_BITS_PER_BYTE 8L
55: #define JS_BITS_PER_SHORT 16L
56: #define JS_BITS_PER_INT 32L
57: #define JS_BITS_PER_INT64 64L
58: #define JS_BITS_PER_LONG 32L
59: #define JS_BITS_PER_FLOAT 32L
60: #define JS_BITS_PER_DOUBLE 64L
61: #define JS_BITS_PER_WORD 32L
62:
63: #define JS_BITS_PER_BYTE_LOG2 3L
64: #define JS_BITS_PER_SHORT_LOG2 4L
65: #define JS_BITS_PER_INT_LOG2 5L
66: #define JS_BITS_PER_INT64_LOG2 6L
67: #define JS_BITS_PER_LONG_LOG2 5L
68: #define JS_BITS_PER_FLOAT_LOG2 5L
69: #define JS_BITS_PER_DOUBLE_LOG2 6L
70: #define JS_BITS_PER_WORD_LOG2 5L
71:
72: #define JS_ALIGN_OF_SHORT 2L
73: #define JS_ALIGN_OF_INT 4L
74: #define JS_ALIGN_OF_LONG 4L
75: #define JS_ALIGN_OF_INT64 2L
76: #define JS_ALIGN_OF_FLOAT 4L
77: #define JS_ALIGN_OF_DOUBLE 4L
78: #define JS_ALIGN_OF_POINTER 4L
79: #define JS_ALIGN_OF_WORD 4L
80:
81: #define JS_BYTES_PER_WORD_LOG2 2L
82: #define JS_BYTES_PER_DWORD_LOG2 3L
83: #define PR_WORDS_PER_DWORD_LOG2 1L
84:
85: #elif defined(XP_WIN) || defined(XP_OS2)
86:
87: #if defined( _WIN32) || defined(XP_OS2)
88: #define IS_LITTLE_ENDIAN 1
89: #undef IS_BIG_ENDIAN
90:
91: #define JS_BYTES_PER_BYTE 1L
92: #define JS_BYTES_PER_SHORT 2L
93: #define JS_BYTES_PER_INT 4L
94: #define JS_BYTES_PER_INT64 8L
95: #define JS_BYTES_PER_LONG 4L
96: #define JS_BYTES_PER_FLOAT 4L
97: #define JS_BYTES_PER_DOUBLE 8L
98: #define JS_BYTES_PER_WORD 4L
99: #define JS_BYTES_PER_DWORD 8L
100:
101: #define JS_BITS_PER_BYTE 8L
102: #define JS_BITS_PER_SHORT 16L
103: #define JS_BITS_PER_INT 32L
104: #define JS_BITS_PER_INT64 64L
105: #define JS_BITS_PER_LONG 32L
106: #define JS_BITS_PER_FLOAT 32L
107: #define JS_BITS_PER_DOUBLE 64L
108: #define JS_BITS_PER_WORD 32L
109:
110: #define JS_BITS_PER_BYTE_LOG2 3L
111: #define JS_BITS_PER_SHORT_LOG2 4L
112: #define JS_BITS_PER_INT_LOG2 5L
113: #define JS_BITS_PER_INT64_LOG2 6L
114: #define JS_BITS_PER_LONG_LOG2 5L
115: #define JS_BITS_PER_FLOAT_LOG2 5L
116: #define JS_BITS_PER_DOUBLE_LOG2 6L
117: #define JS_BITS_PER_WORD_LOG2 5L
118:
119: #define JS_ALIGN_OF_SHORT 2L
120: #define JS_ALIGN_OF_INT 4L
121: #define JS_ALIGN_OF_LONG 4L
122: #define JS_ALIGN_OF_INT64 8L
123: #define JS_ALIGN_OF_FLOAT 4L
124: #define JS_ALIGN_OF_DOUBLE 4L
125: #define JS_ALIGN_OF_POINTER 4L
126: #define JS_ALIGN_OF_WORD 4L
127:
128: #define JS_BYTES_PER_WORD_LOG2 2L
129: #define JS_BYTES_PER_DWORD_LOG2 3L
130: #define PR_WORDS_PER_DWORD_LOG2 1L
131: #endif /* _WIN32 || XP_OS2 */
132:
133: #if defined(_WINDOWS) && !defined(_WIN32) /* WIN16 */
134: #define IS_LITTLE_ENDIAN 1
135: #undef IS_BIG_ENDIAN
136:
137: #define JS_BYTES_PER_BYTE 1L
138: #define JS_BYTES_PER_SHORT 2L
139: #define JS_BYTES_PER_INT 2L
140: #define JS_BYTES_PER_INT64 8L
141: #define JS_BYTES_PER_LONG 4L
142: #define JS_BYTES_PER_FLOAT 4L
143: #define JS_BYTES_PER_DOUBLE 8L
144: #define JS_BYTES_PER_WORD 4L
145: #define JS_BYTES_PER_DWORD 8L
146:
147: #define JS_BITS_PER_BYTE 8L
148: #define JS_BITS_PER_SHORT 16L
149: #define JS_BITS_PER_INT 16L
150: #define JS_BITS_PER_INT64 64L
151: #define JS_BITS_PER_LONG 32L
152: #define JS_BITS_PER_FLOAT 32L
153: #define JS_BITS_PER_DOUBLE 64L
154: #define JS_BITS_PER_WORD 32L
155:
156: #define JS_BITS_PER_BYTE_LOG2 3L
157: #define JS_BITS_PER_SHORT_LOG2 4L
158: #define JS_BITS_PER_INT_LOG2 4L
159: #define JS_BITS_PER_INT64_LOG2 6L
160: #define JS_BITS_PER_LONG_LOG2 5L
161: #define JS_BITS_PER_FLOAT_LOG2 5L
162: #define JS_BITS_PER_DOUBLE_LOG2 6L
163: #define JS_BITS_PER_WORD_LOG2 5L
164:
165: #define JS_ALIGN_OF_SHORT 2L
166: #define JS_ALIGN_OF_INT 2L
167: #define JS_ALIGN_OF_LONG 2L
168: #define JS_ALIGN_OF_INT64 2L
169: #define JS_ALIGN_OF_FLOAT 2L
170: #define JS_ALIGN_OF_DOUBLE 2L
171: #define JS_ALIGN_OF_POINTER 2L
172: #define JS_ALIGN_OF_WORD 2L
173:
174: #define JS_BYTES_PER_WORD_LOG2 2L
175: #define JS_BYTES_PER_DWORD_LOG2 3L
176: #define PR_WORDS_PER_DWORD_LOG2 1L
177: #endif /* defined(_WINDOWS) && !defined(_WIN32) */
178:
179: #elif defined(XP_UNIX) || defined(XP_BEOS)
180:
181: #error "This file is supposed to be auto-generated on UNIX platforms, but the"
182: #error "static version for Mac and Windows platforms is being used."
183: #error "Something's probably wrong with paths/headers/dependencies/Makefiles."
184:
185: #else
186:
187: #error "Must define one of XP_BEOS, XP_MAC, XP_OS2, XP_WIN, or XP_UNIX"
188:
189: #endif
190:
191: #endif /* js_cpucfg___ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.