]>
git.saurik.com Git - apple/security.git/blob - libsecurity_asn1/lib/protypes.h
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 #if !defined(PROTYPES_H)
45 typedef PRUintn uintn
;
51 * It is trickier to define uint, int8, uint8, int16, uint16,
52 * int32, uint32, int64, and uint64 because some of these int
53 * types are defined by standard header files on some platforms.
54 * Our strategy here is to include all such standard headers
55 * first, and then define these int types only if they are not
56 * defined by those standard headers.
60 * BeOS defines all the int types below in its standard header
64 #include <support/SupportDefs.h>
68 * OpenVMS defines all the int types below in its standard
69 * header files ints.h and types.h.
77 * SVR4 typedef of uint is commonly found on UNIX machines.
79 * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
80 * defines the types int8, int16, int32, and int64.
83 #include <sys/types.h>
86 /* model.h on HP-UX defines int8, int16, and int32. */
95 #if !defined(XP_BEOS) && !defined(VMS) \
96 && !defined(XP_UNIX) & !defined(__APPLE__) || defined(NTO)
104 #if !defined(XP_BEOS) && !defined(VMS) && !defined(__APPLE__)
105 typedef PRUint64 uint64
;
112 #if !defined(XP_BEOS) && !defined(VMS) && !defined(__APPLE__)
113 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
114 typedef PRUint32 uint32
;
116 typedef unsigned long uint32
;
124 #if !defined(XP_BEOS) && !defined(VMS) && !defined(__APPLE__)
125 typedef PRUint16 uint16
;
132 #if !defined(XP_BEOS) && !defined(VMS) && !defined(__APPLE__)
133 typedef PRUint8 uint8
;
140 #if !defined(XP_BEOS) && !defined(VMS) \
141 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
142 typedef PRInt64 int64
;
149 #if !defined(XP_BEOS) && !defined(VMS) \
150 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
152 #if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */
153 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
154 typedef PRInt32 int32
;
165 #if !defined(XP_BEOS) && !defined(VMS) \
166 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
168 typedef PRInt16 int16
;
175 #if !defined(XP_BEOS) && !defined(VMS) \
176 && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
181 typedef PRFloat64 float64
;
182 typedef PRUptrdiff uptrdiff_t
;
183 typedef PRUword uprword_t
;
184 typedef PRWord prword_t
;
188 #define TEST_BIT PR_TEST_BIT
189 #define SET_BIT PR_SET_BIT
190 #define CLEAR_BIT PR_CLEAR_BIT
192 /* Re: prarena.h->plarena.h */
193 #define PRArena PLArena
194 #define PRArenaPool PLArenaPool
195 #define PRArenaStats PLArenaStats
196 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
197 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
198 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
199 #define PR_ARENA_GROW PL_ARENA_GROW
200 #define PR_ARENA_MARK PL_ARENA_MARK
201 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
202 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
203 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
204 #define PR_COUNT_ARENA PL_COUNT_ARENA
205 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
206 #define PR_InitArenaPool PL_InitArenaPool
207 #define PR_FreeArenaPool PL_FreeArenaPool
208 #define PR_FinishArenaPool PL_FinishArenaPool
209 #define PR_CompactArenaPool PL_CompactArenaPool
210 #define PR_ArenaFinish PL_ArenaFinish
211 #define PR_ArenaAllocate PL_ArenaAllocate
212 #define PR_ArenaGrow PL_ArenaGrow
213 #define PR_ArenaRelease PL_ArenaRelease
214 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
215 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
216 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
217 #define PR_ArenaCountRelease PL_ArenaCountRelease
218 #define PR_ArenaCountRetract PL_ArenaCountRetract
220 /* Re: prhash.h->plhash.h */
221 #define PRHashEntry PLHashEntry
222 #define PRHashTable PLHashTable
223 #define PRHashNumber PLHashNumber
224 #define PRHashFunction PLHashFunction
225 #define PRHashComparator PLHashComparator
226 #define PRHashEnumerator PLHashEnumerator
227 #define PRHashAllocOps PLHashAllocOps
228 #define PR_NewHashTable PL_NewHashTable
229 #define PR_HashTableDestroy PL_HashTableDestroy
230 #define PR_HashTableRawLookup PL_HashTableRawLookup
231 #define PR_HashTableRawAdd PL_HashTableRawAdd
232 #define PR_HashTableRawRemove PL_HashTableRawRemove
233 #define PR_HashTableAdd PL_HashTableAdd
234 #define PR_HashTableRemove PL_HashTableRemove
235 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
236 #define PR_HashTableLookup PL_HashTableLookup
237 #define PR_HashTableDump PL_HashTableDump
238 #define PR_HashString PL_HashString
239 #define PR_CompareStrings PL_CompareStrings
240 #define PR_CompareValues PL_CompareValues
243 #ifndef TRUE /* Mac standard is lower case true */
246 #ifndef FALSE /* Mac standard is lower case false */
251 #endif /* !defined(PROTYPES_H) */