/[jscoverage]/trunk/js/jsotypes.h
ViewVC logotype

Contents of /trunk/js/jsotypes.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 507 - (show annotations)
Sun Jan 10 07:23:34 2010 UTC (9 years, 7 months ago) by siliconforks
File MIME type: text/plain
File size: 7073 byte(s)
Update SpiderMonkey from Firefox 3.6rc1.

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 Mozilla Communicator client code, released
16 * March 31, 1998.
17 *
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or 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.
36 *
37 * ***** END LICENSE BLOCK ***** */
38
39 /*
40 * This section typedefs the old 'native' types to the new PR<type>s.
41 * These definitions are scheduled to be eliminated at the earliest
42 * possible time. The NSPR API is implemented and documented using
43 * the new definitions.
44 */
45
46 /*
47 * Note that we test for PROTYPES_H, not JSOTYPES_H. This is to avoid
48 * double-definitions of scalar types such as uint32, if NSPR's
49 * protypes.h is also included.
50 */
51 #ifndef PROTYPES_H
52 #define PROTYPES_H
53
54 #ifdef XP_BEOS
55 /* BeOS defines most int types in SupportDefs.h (int8, uint8, int16,
56 * uint16, int32, uint32, int64, uint64), so in the interest of
57 * not conflicting with other definitions elsewhere we have to skip the
58 * #ifdef jungle below, duplicate some definitions, and do our stuff.
59 */
60 #include <SupportDefs.h>
61
62 typedef JSUintn uintn;
63 #ifndef _XP_Core_
64 typedef JSIntn intn;
65 #endif
66
67 #else
68
69 /* SVR4 typedef of uint is commonly found on UNIX machines. */
70 #ifdef XP_UNIX
71 #include <sys/types.h>
72 #else
73 typedef JSUintn uint;
74 #endif
75
76 typedef JSUintn uintn;
77 typedef JSUint64 uint64;
78 #if !defined(_WIN32) && !defined(XP_OS2)
79 typedef JSUint32 uint32;
80 #else
81 typedef unsigned long uint32;
82 #endif
83 typedef JSUint16 uint16;
84 typedef JSUint8 uint8;
85
86 #ifndef _XP_Core_
87 typedef JSIntn intn;
88 #endif
89
90 /*
91 * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very
92 * common header file) defines the types int8, int16, int32, and int64.
93 * So we don't define these four types here to avoid conflicts in case
94 * the code also includes sys/types.h.
95 */
96 #if defined(AIX) && defined(HAVE_SYS_INTTYPES_H)
97 #include <sys/inttypes.h>
98 #else
99 typedef JSInt64 int64;
100
101 /* /usr/include/model.h on HP-UX defines int8, int16, and int32 */
102 #if !defined(_WIN32) && !defined(XP_OS2)
103 typedef JSInt32 int32;
104 #else
105 typedef long int32;
106 #endif
107 typedef JSInt16 int16;
108 typedef JSInt8 int8;
109 #endif /* AIX && HAVE_SYS_INTTYPES_H */
110
111 #endif /* XP_BEOS */
112
113 typedef JSFloat64 float64;
114
115 /* Re: jsbit.h */
116 #define TEST_BIT JS_TEST_BIT
117 #define SET_BIT JS_SET_BIT
118 #define CLEAR_BIT JS_CLEAR_BIT
119
120 /* Re: prarena.h->plarena.h */
121 #define PRArena PLArena
122 #define PRArenaPool PLArenaPool
123 #define PRArenaStats PLArenaStats
124 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
125 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
126 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
127 #define PR_ARENA_GROW PL_ARENA_GROW
128 #define PR_ARENA_MARK PL_ARENA_MARK
129 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
130 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
131 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
132 #define PR_COUNT_ARENA PL_COUNT_ARENA
133 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
134 #define PR_InitArenaPool PL_InitArenaPool
135 #define PR_FreeArenaPool PL_FreeArenaPool
136 #define PR_FinishArenaPool PL_FinishArenaPool
137 #define PR_CompactArenaPool PL_CompactArenaPool
138 #define PR_ArenaFinish PL_ArenaFinish
139 #define PR_ArenaAllocate PL_ArenaAllocate
140 #define PR_ArenaGrow PL_ArenaGrow
141 #define PR_ArenaRelease PL_ArenaRelease
142 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
143 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
144 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
145 #define PR_ArenaCountRelease PL_ArenaCountRelease
146 #define PR_ArenaCountRetract PL_ArenaCountRetract
147
148 /* Re: prevent.h->plevent.h */
149 #define PREvent PLEvent
150 #define PREventQueue PLEventQueue
151 #define PR_CreateEventQueue PL_CreateEventQueue
152 #define PR_DestroyEventQueue PL_DestroyEventQueue
153 #define PR_GetEventQueueMonitor PL_GetEventQueueMonitor
154 #define PR_ENTER_EVENT_QUEUE_MONITOR PL_ENTER_EVENT_QUEUE_MONITOR
155 #define PR_EXIT_EVENT_QUEUE_MONITOR PL_EXIT_EVENT_QUEUE_MONITOR
156 #define PR_PostEvent PL_PostEvent
157 #define PR_PostSynchronousEvent PL_PostSynchronousEvent
158 #define PR_GetEvent PL_GetEvent
159 #define PR_EventAvailable PL_EventAvailable
160 #define PREventFunProc PLEventFunProc
161 #define PR_MapEvents PL_MapEvents
162 #define PR_RevokeEvents PL_RevokeEvents
163 #define PR_ProcessPendingEvents PL_ProcessPendingEvents
164 #define PR_WaitForEvent PL_WaitForEvent
165 #define PR_EventLoop PL_EventLoop
166 #define PR_GetEventQueueSelectFD PL_GetEventQueueSelectFD
167 #define PRHandleEventProc PLHandleEventProc
168 #define PRDestroyEventProc PLDestroyEventProc
169 #define PR_InitEvent PL_InitEvent
170 #define PR_GetEventOwner PL_GetEventOwner
171 #define PR_HandleEvent PL_HandleEvent
172 #define PR_DestroyEvent PL_DestroyEvent
173 #define PR_DequeueEvent PL_DequeueEvent
174 #define PR_GetMainEventQueue PL_GetMainEventQueue
175
176 /* Re: prhash.h->plhash.h */
177 #define PRHashEntry PLHashEntry
178 #define PRHashTable PLHashTable
179 #define PRHashNumber PLHashNumber
180 #define PRHashFunction PLHashFunction
181 #define PRHashComparator PLHashComparator
182 #define PRHashEnumerator PLHashEnumerator
183 #define PRHashAllocOps PLHashAllocOps
184 #define PR_NewHashTable PL_NewHashTable
185 #define PR_HashTableDestroy PL_HashTableDestroy
186 #define PR_HashTableRawLookup PL_HashTableRawLookup
187 #define PR_HashTableRawAdd PL_HashTableRawAdd
188 #define PR_HashTableRawRemove PL_HashTableRawRemove
189 #define PR_HashTableAdd PL_HashTableAdd
190 #define PR_HashTableRemove PL_HashTableRemove
191 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
192 #define PR_HashTableLookup PL_HashTableLookup
193 #define PR_HashTableDump PL_HashTableDump
194 #define PR_HashString PL_HashString
195 #define PR_CompareStrings PL_CompareStrings
196 #define PR_CompareValues PL_CompareValues
197
198 #endif /* !defined(PROTYPES_H) */

  ViewVC Help
Powered by ViewVC 1.1.24