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
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/
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
15
* The Original Code is the Netscape Portable Runtime (NSPR).
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.
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.
36
* ***** END LICENSE BLOCK ***** */
39
* This header typedefs the old 'native' types to the new PR<type>s.
40
* These definitions are scheduled to be eliminated at the earliest
41
* possible time. The NSPR API is implemented and documented using
42
* the new definitions.
45
#if !defined(PROTYPES_H)
48
typedef PRUintn uintn;
54
* It is trickier to define uint, int8, uint8, int16, uint16,
55
* int32, uint32, int64, and uint64 because some of these int
56
* types are defined by standard header files on some platforms.
57
* Our strategy here is to include all such standard headers
58
* first, and then define these int types only if they are not
59
* defined by those standard headers.
63
* BeOS defines all the int types below in its standard header
67
#include <support/SupportDefs.h>
71
* OpenVMS defines all the int types below in its standard
72
* header files ints.h and types.h.
80
* SVR4 typedef of uint is commonly found on UNIX machines.
82
* On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
83
* defines the types int8, int16, int32, and int64.
86
#include <sys/types.h>
89
/* model.h on HP-UX defines int8, int16, and int32. */
98
#if !defined(XP_BEOS) && !defined(VMS) \
99
&& !defined(XP_UNIX) || defined(NTO)
100
typedef PRUintn uint;
107
#if !defined(XP_BEOS) && !defined(VMS)
108
typedef PRUint64 uint64;
115
#if !defined(XP_BEOS) && !defined(VMS)
116
#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
117
typedef PRUint32 uint32;
119
typedef unsigned long uint32;
127
#if !defined(XP_BEOS) && !defined(VMS)
128
typedef PRUint16 uint16;
135
#if !defined(XP_BEOS) && !defined(VMS)
136
typedef PRUint8 uint8;
143
#if !defined(XP_BEOS) && !defined(VMS) \
144
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
145
typedef PRInt64 int64;
152
#if !defined(XP_BEOS) && !defined(VMS) \
153
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
155
#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
156
typedef PRInt32 int32;
166
#if !defined(XP_BEOS) && !defined(VMS) \
167
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
169
typedef PRInt16 int16;
176
#if !defined(XP_BEOS) && !defined(VMS) \
177
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
182
typedef PRFloat64 float64;
183
typedef PRUptrdiff uptrdiff_t;
184
typedef PRUword uprword_t;
185
typedef PRWord prword_t;
189
#define TEST_BIT PR_TEST_BIT
190
#define SET_BIT PR_SET_BIT
191
#define CLEAR_BIT PR_CLEAR_BIT
193
/* Re: prarena.h->plarena.h */
194
#define PRArena PLArena
195
#define PRArenaPool PLArenaPool
196
#define PRArenaStats PLArenaStats
197
#define PR_ARENA_ALIGN PL_ARENA_ALIGN
198
#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
199
#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
200
#define PR_ARENA_GROW PL_ARENA_GROW
201
#define PR_ARENA_MARK PL_ARENA_MARK
202
#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
203
#define PR_CLEAR_ARENA PL_CLEAR_ARENA
204
#define PR_ARENA_RELEASE PL_ARENA_RELEASE
205
#define PR_COUNT_ARENA PL_COUNT_ARENA
206
#define PR_ARENA_DESTROY PL_ARENA_DESTROY
207
#define PR_InitArenaPool PL_InitArenaPool
208
#define PR_FreeArenaPool PL_FreeArenaPool
209
#define PR_FinishArenaPool PL_FinishArenaPool
210
#define PR_CompactArenaPool PL_CompactArenaPool
211
#define PR_ArenaFinish PL_ArenaFinish
212
#define PR_ArenaAllocate PL_ArenaAllocate
213
#define PR_ArenaGrow PL_ArenaGrow
214
#define PR_ArenaRelease PL_ArenaRelease
215
#define PR_ArenaCountAllocation PL_ArenaCountAllocation
216
#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
217
#define PR_ArenaCountGrowth PL_ArenaCountGrowth
218
#define PR_ArenaCountRelease PL_ArenaCountRelease
219
#define PR_ArenaCountRetract PL_ArenaCountRetract
221
/* Re: prhash.h->plhash.h */
222
#define PRHashEntry PLHashEntry
223
#define PRHashTable PLHashTable
224
#define PRHashNumber PLHashNumber
225
#define PRHashFunction PLHashFunction
226
#define PRHashComparator PLHashComparator
227
#define PRHashEnumerator PLHashEnumerator
228
#define PRHashAllocOps PLHashAllocOps
229
#define PR_NewHashTable PL_NewHashTable
230
#define PR_HashTableDestroy PL_HashTableDestroy
231
#define PR_HashTableRawLookup PL_HashTableRawLookup
232
#define PR_HashTableRawAdd PL_HashTableRawAdd
233
#define PR_HashTableRawRemove PL_HashTableRawRemove
234
#define PR_HashTableAdd PL_HashTableAdd
235
#define PR_HashTableRemove PL_HashTableRemove
236
#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
237
#define PR_HashTableLookup PL_HashTableLookup
238
#define PR_HashTableDump PL_HashTableDump
239
#define PR_HashString PL_HashString
240
#define PR_CompareStrings PL_CompareStrings
241
#define PR_CompareValues PL_CompareValues
244
#ifndef TRUE /* Mac standard is lower case true */
247
#ifndef FALSE /* Mac standard is lower case false */
252
#endif /* !defined(PROTYPES_H) */