1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3 * The contents of this file are subject to the Mozilla 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/MPL/
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.
13 * The Original Code is the Netscape Portable Runtime (NSPR).
15 * The Initial Developer of the Original Code is Netscape
16 * Communications Corporation. Portions created by Netscape are
17 * Copyright (C) 1998-2000 Netscape Communications Corporation. All
22 * Alternatively, the contents of this file may be used under the
23 * terms of the GNU General Public License Version 2 or later (the
24 * "GPL"), in which case the provisions of the GPL are applicable
25 * instead of those above. If you wish to allow use of your
26 * version of this file only under the terms of the GPL and not to
27 * allow others to use your version of this file under the MPL,
28 * indicate your decision by deleting the provisions above and
29 * replace them with the notice and other provisions required by
30 * the GPL. If you do not delete the provisions above, a recipient
31 * may use your version of this file under either the MPL or the
36 * This header typedefs the old 'native' types to the new PR<type>s.
37 * These definitions are scheduled to be eliminated at the earliest
38 * possible time. The NSPR API is implemented and documented using
39 * the new definitions.
42 //krazy:excludeall=captruefalse
44 #ifndef NSPLUGIN_PROTYPES_H
45 #define NSPLUGIN_PROTYPES_H
47 typedef PRUintn uintn
;
53 * It is trickier to define uint, int8, uint8, int16, uint16,
54 * int32, uint32, int64, and uint64 because some of these int
55 * types are defined by standard header files on some platforms.
56 * Our strategy here is to include all such standard headers
57 * first, and then define these int types only if they are not
58 * defined by those standard headers.
62 * BeOS defines all the int types below in its standard header
66 #include <support/SupportDefs.h>
70 * OpenVMS defines all the int types below in its standard
71 * header files ints.h and types.h.
79 * SVR4 typedef of uint is commonly found on UNIX machines.
81 * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
82 * defines the types int8, int16, int32, and int64.
85 #include <sys/types.h>
88 /* model.h on HP-UX defines int8, int16, and int32. */
97 #if !defined(XP_BEOS) && !defined(VMS) \
98 && !defined(XP_UNIX) || defined(NTO)
106 #if !defined(XP_BEOS) && !defined(VMS)
107 typedef PRUint64 uint64
;
114 #if !defined(XP_BEOS) && !defined(VMS)
115 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
116 typedef PRUint32 uint32
;
118 typedef unsigned long uint32
;
126 #if !defined(XP_BEOS) && !defined(VMS)
127 typedef PRUint16 uint16
;
134 #if !defined(XP_BEOS) && !defined(VMS)
135 typedef PRUint8 uint8
;
142 #if !defined(XP_BEOS) && !defined(VMS) \
143 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
144 typedef PRInt64 int64
;
151 #if !defined(XP_BEOS) && !defined(VMS) \
152 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
154 #if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */
155 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
156 typedef PRInt32 int32
;
167 #if !defined(XP_BEOS) && !defined(VMS) \
168 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
170 typedef PRInt16 int16
;
177 #if !defined(XP_BEOS) && !defined(VMS) \
178 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
183 typedef PRFloat64 float64
;
184 typedef PRUptrdiff uptrdiff_t
;
185 typedef PRUword uprword_t
;
186 typedef PRWord prword_t
;
190 #define TEST_BIT PR_TEST_BIT
191 #define SET_BIT PR_SET_BIT
192 #define CLEAR_BIT PR_CLEAR_BIT
194 /* Re: prarena.h->plarena.h */
195 #define PRArena PLArena
196 #define PRArenaPool PLArenaPool
197 #define PRArenaStats PLArenaStats
198 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
199 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
200 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
201 #define PR_ARENA_GROW PL_ARENA_GROW
202 #define PR_ARENA_MARK PL_ARENA_MARK
203 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
204 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
205 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
206 #define PR_COUNT_ARENA PL_COUNT_ARENA
207 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
208 #define PR_InitArenaPool PL_InitArenaPool
209 #define PR_FreeArenaPool PL_FreeArenaPool
210 #define PR_FinishArenaPool PL_FinishArenaPool
211 #define PR_CompactArenaPool PL_CompactArenaPool
212 #define PR_ArenaFinish PL_ArenaFinish
213 #define PR_ArenaAllocate PL_ArenaAllocate
214 #define PR_ArenaGrow PL_ArenaGrow
215 #define PR_ArenaRelease PL_ArenaRelease
216 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
217 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
218 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
219 #define PR_ArenaCountRelease PL_ArenaCountRelease
220 #define PR_ArenaCountRetract PL_ArenaCountRetract
222 /* Re: prhash.h->plhash.h */
223 #define PRHashEntry PLHashEntry
224 #define PRHashTable PLHashTable
225 #define PRHashNumber PLHashNumber
226 #define PRHashFunction PLHashFunction
227 #define PRHashComparator PLHashComparator
228 #define PRHashEnumerator PLHashEnumerator
229 #define PRHashAllocOps PLHashAllocOps
230 #define PR_NewHashTable PL_NewHashTable
231 #define PR_HashTableDestroy PL_HashTableDestroy
232 #define PR_HashTableRawLookup PL_HashTableRawLookup
233 #define PR_HashTableRawAdd PL_HashTableRawAdd
234 #define PR_HashTableRawRemove PL_HashTableRawRemove
235 #define PR_HashTableAdd PL_HashTableAdd
236 #define PR_HashTableRemove PL_HashTableRemove
237 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
238 #define PR_HashTableLookup PL_HashTableLookup
239 #define PR_HashTableDump PL_HashTableDump
240 #define PR_HashString PL_HashString
241 #define PR_CompareStrings PL_CompareStrings
242 #define PR_CompareValues PL_CompareValues
245 #ifndef TRUE /* Mac standard is lower case true */
248 #ifndef FALSE /* Mac standard is lower case false */
253 #endif /* NSPLUGIN_PROTYPES_H */