Debian Codegraph @

nsdejavu/npsdk/obsolete/protypes.h

raw
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 the Netscape Portable Runtime (NSPR).
16 *
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.
21 *
22 * Contributor(s):
23 *
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.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38 /*
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.
43 */
44
45 #if !defined(PROTYPES_H)
46 #define PROTYPES_H
47
48 typedef PRUintn uintn;
49 #ifndef _XP_Core_
50 typedef PRIntn intn;
51 #endif
52
53 /*
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.
60 */
61
62 /*
63 * BeOS defines all the int types below in its standard header
64 * file SupportDefs.h.
65 */
66 #ifdef XP_BEOS
67 #include <support/SupportDefs.h>
68 #endif
69
70 /*
71 * OpenVMS defines all the int types below in its standard
72 * header files ints.h and types.h.
73 */
74 #ifdef VMS
75 #include <ints.h>
76 #include <types.h>
77 #endif
78
79 /*
80 * SVR4 typedef of uint is commonly found on UNIX machines.
81 *
82 * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
83 * defines the types int8, int16, int32, and int64.
84 */
85 #ifdef XP_UNIX
86 #include <sys/types.h>
87 #endif
88
89 /* model.h on HP-UX defines int8, int16, and int32. */
90 #ifdef HPUX
91 #include <model.h>
92 #endif
93
94 /*
95 * uint
96 */
97
98 #if !defined(XP_BEOS) && !defined(VMS) \
99 && !defined(XP_UNIX) || defined(NTO)
100 typedef PRUintn uint;
101 #endif
102
103 /*
104 * uint64
105 */
106
107 #if !defined(XP_BEOS) && !defined(VMS)
108 typedef PRUint64 uint64;
109 #endif
110
111 /*
112 * uint32
113 */
114
115 #if !defined(XP_BEOS) && !defined(VMS)
116 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
117 typedef PRUint32 uint32;
118 #else
119 typedef unsigned long uint32;
120 #endif
121 #endif
122
123 /*
124 * uint16
125 */
126
127 #if !defined(XP_BEOS) && !defined(VMS)
128 typedef PRUint16 uint16;
129 #endif
130
131 /*
132 * uint8
133 */
134
135 #if !defined(XP_BEOS) && !defined(VMS)
136 typedef PRUint8 uint8;
137 #endif
138
139 /*
140 * int64
141 */
142
143 #if !defined(XP_BEOS) && !defined(VMS) \
144 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
145 typedef PRInt64 int64;
146 #endif
147
148 /*
149 * int32
150 */
151
152 #if !defined(XP_BEOS) && !defined(VMS) \
153 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
154 && !defined(HPUX)
155 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
156 typedef PRInt32 int32;
157 #else
158 typedef long int32;
159 #endif
160 #endif
161
162 /*
163 * int16
164 */
165
166 #if !defined(XP_BEOS) && !defined(VMS) \
167 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
168 && !defined(HPUX)
169 typedef PRInt16 int16;
170 #endif
171
172 /*
173 * int8
174 */
175
176 #if !defined(XP_BEOS) && !defined(VMS) \
177 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
178 && !defined(HPUX)
179 typedef PRInt8 int8;
180 #endif
181
182 typedef PRFloat64 float64;
183 typedef PRUptrdiff uptrdiff_t;
184 typedef PRUword uprword_t;
185 typedef PRWord prword_t;
186
187
188 /* Re: prbit.h */
189 #define TEST_BIT PR_TEST_BIT
190 #define SET_BIT PR_SET_BIT
191 #define CLEAR_BIT PR_CLEAR_BIT
192
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
220
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
242
243 #if defined(XP_MAC)
244 #ifndef TRUE /* Mac standard is lower case true */
245 #define TRUE 1
246 #endif
247 #ifndef FALSE /* Mac standard is lower case false */
248 #define FALSE 0
249 #endif
250 #endif
251
252 #endif /* !defined(PROTYPES_H) */