protypes.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : protypes.h
00004 *  Part of     : Webkit \ Plugin
00005 *  Interface   : 
00006 *  Description :
00007 *  Version     : 3.1
00008 *
00009 *    The Original Code is from the Netscape Portable Runtime (NSPR).
00010 *
00011 *    Portions Copyright (c) 1998-2000, Netscape Communications Corporation
00012 *    Portions Copyright (c) 2004-2006, Nokia Corporation
00013 *    All rights reserved.
00014 *  
00015 *       Redistribution and use in source and binary forms, with or without
00016 *       modification, are permitted provided that the following conditions
00017 *       are met:
00018 *  
00019 *      * Redistributions of source code must retain the above copyright
00020 *        notice, this list of conditions and the following disclaimer.
00021 *      * Redistributions in binary form must reproduce the above copyright
00022 *        notice, this list of conditions and the following disclaimer in
00023 *        the documentation and/or other materials provided with the
00024 *        distribution.
00025 *      * Neither the name of the Nokia Corporation nor the names of its
00026 *        contributors may be used to endorse or promote products derived
00027 *        from this software without specific prior written permission.
00028 *  
00029 *       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00030 *       "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00031 *       LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00032 *       A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00033 *       OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00034 *       SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00035 *       LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00036 *       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00037 *       THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00038 *       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00039 *       USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
00040 *       DAMAGE.
00041 *  
00042 *    Please see file patentlicense.txt for further grants.
00043 * ==============================================================================
00044 */
00045 
00046 /*
00047 * NOTE:
00048 * Nokia modified this file, originated from Netscape Communications Corporation,
00049 * by changing certain variables for the purpose of porting the file to the
00050 * Symbian platform on May 1st, 2004. As noted in the original license block
00051 * provided for this file, we are using the alternatively acceptable license,
00052 * LGPL. We have added our LGPL license to this file in accordance to the 
00053 * license, and added the copyrights that where previously attached to this
00054 * file. A copy of the original license is included in this directory,
00055 * see MPL_GPL_LGPL.txt or http://www.mozilla.org/MPL/.
00056 */
00057 
00058 
00059 #if !defined(PROTYPES_H)
00060 #define PROTYPES_H
00061 
00062 typedef PRUintn uintn;
00063 #ifndef _XP_Core_
00064 typedef PRIntn intn;
00065 #endif
00066 
00067 /*
00068  * It is trickier to define uint, int8, uint8, int16, uint16,
00069  * int32, uint32, int64, and uint64 because some of these int
00070  * types are defined by standard header files on some platforms.
00071  * Our strategy here is to include all such standard headers
00072  * first, and then define these int types only if they are not
00073  * defined by those standard headers.
00074  */
00075 
00076 /*
00077  * BeOS defines all the int types below in its standard header
00078  * file SupportDefs.h.
00079  */
00080 #ifdef XP_BEOS
00081 #include <support/SupportDefs.h>
00082 #endif
00083 
00084 /*
00085  * OpenVMS defines all the int types below in its standard
00086  * header files ints.h and types.h.
00087  */
00088 #ifdef VMS
00089 #include <ints.h>
00090 #include <types.h>
00091 #endif
00092 
00093 /*
00094  * SVR4 typedef of uint is commonly found on UNIX machines.
00095  *
00096  * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
00097  * defines the types int8, int16, int32, and int64.
00098  */
00099 #ifdef XP_UNIX
00100 #include <sys/types.h>
00101 #endif
00102 
00103 /* model.h on HP-UX defines int8, int16, and int32. */
00104 #ifdef HPUX
00105 #include <model.h>
00106 #endif
00107 
00108 /*
00109  * uint
00110  */
00111 
00112 #if !defined(XP_BEOS) && !defined(VMS) \
00113     && !defined(XP_UNIX) || defined(NTO)
00114 typedef PRUintn uint;
00115 #endif
00116 
00117 /*
00118  * uint64
00119  */
00120 
00121 #if !defined(XP_BEOS) && !defined(VMS)
00122 typedef PRUint64 uint64;
00123 #endif
00124 
00125 /*
00126  * uint32
00127  */
00128 
00129 #if !defined(XP_BEOS) && !defined(VMS)
00130 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)  && !defined(__SYMBIAN32__)
00131 typedef PRUint32 uint32;
00132 #else
00133 typedef unsigned long uint32;
00134 #endif
00135 #endif
00136 
00137 /*
00138  * uint16
00139  */
00140 
00141 #if !defined(XP_BEOS) && !defined(VMS)
00142 typedef PRUint16 uint16;
00143 #endif
00144 
00145 /*
00146  * uint8
00147  */
00148 
00149 #if !defined(XP_BEOS) && !defined(VMS)
00150 typedef PRUint8 uint8;
00151 #endif
00152 
00153 /*
00154  * int64
00155  */
00156 
00157 #if !defined(XP_BEOS) && !defined(VMS) \
00158     && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
00159 typedef PRInt64 int64;
00160 #endif
00161 
00162 /*
00163  * int32
00164  */
00165 
00166 #if !defined(XP_BEOS) && !defined(VMS) \
00167     && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
00168     && !defined(HPUX)
00169 #if !defined(WIN32) || !defined(_WINSOCK2API_)  /* defines its own "int32" */
00170 #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) && !defined(__SYMBIAN32__)
00171 typedef PRInt32 int32;
00172 #else
00173 typedef long int32;
00174 #endif
00175 #endif
00176 #endif
00177 
00178 /*
00179  * int16
00180  */
00181 
00182 #if !defined(XP_BEOS) && !defined(VMS) \
00183     && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
00184     && !defined(HPUX)
00185 typedef PRInt16 int16;
00186 #endif
00187 
00188 /*
00189  * int8
00190  */
00191 
00192 #if !defined(XP_BEOS) && !defined(VMS) \
00193     && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
00194     && !defined(HPUX)
00195 typedef PRInt8 int8;
00196 #endif
00197 
00198 typedef PRFloat64 float64;
00199 typedef PRUptrdiff uptrdiff_t;
00200 typedef PRUword uprword_t;
00201 typedef PRWord prword_t;
00202 
00203 
00204 /* Re: prbit.h */
00205 #define TEST_BIT        PR_TEST_BIT
00206 #define SET_BIT         PR_SET_BIT
00207 #define CLEAR_BIT       PR_CLEAR_BIT
00208 
00209 /* Re: prarena.h->plarena.h */
00210 #define PRArena PLArena
00211 #define PRArenaPool PLArenaPool
00212 #define PRArenaStats PLArenaStats
00213 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
00214 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
00215 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
00216 #define PR_ARENA_GROW PL_ARENA_GROW
00217 #define PR_ARENA_MARK PL_ARENA_MARK
00218 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
00219 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
00220 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
00221 #define PR_COUNT_ARENA PL_COUNT_ARENA
00222 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
00223 #define PR_InitArenaPool PL_InitArenaPool
00224 #define PR_FreeArenaPool PL_FreeArenaPool
00225 #define PR_FinishArenaPool PL_FinishArenaPool
00226 #define PR_CompactArenaPool PL_CompactArenaPool
00227 #define PR_ArenaFinish PL_ArenaFinish
00228 #define PR_ArenaAllocate PL_ArenaAllocate
00229 #define PR_ArenaGrow PL_ArenaGrow
00230 #define PR_ArenaRelease PL_ArenaRelease
00231 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
00232 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
00233 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
00234 #define PR_ArenaCountRelease PL_ArenaCountRelease
00235 #define PR_ArenaCountRetract PL_ArenaCountRetract
00236 
00237 /* Re: prhash.h->plhash.h */
00238 #define PRHashEntry PLHashEntry
00239 #define PRHashTable PLHashTable
00240 #define PRHashNumber PLHashNumber
00241 #define PRHashFunction PLHashFunction
00242 #define PRHashComparator PLHashComparator
00243 #define PRHashEnumerator PLHashEnumerator
00244 #define PRHashAllocOps PLHashAllocOps
00245 #define PR_NewHashTable PL_NewHashTable
00246 #define PR_HashTableDestroy PL_HashTableDestroy
00247 #define PR_HashTableRawLookup PL_HashTableRawLookup
00248 #define PR_HashTableRawAdd PL_HashTableRawAdd
00249 #define PR_HashTableRawRemove PL_HashTableRawRemove
00250 #define PR_HashTableAdd PL_HashTableAdd
00251 #define PR_HashTableRemove PL_HashTableRemove
00252 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
00253 #define PR_HashTableLookup PL_HashTableLookup
00254 #define PR_HashTableDump PL_HashTableDump
00255 #define PR_HashString PL_HashString
00256 #define PR_CompareStrings PL_CompareStrings
00257 #define PR_CompareValues PL_CompareValues
00258 
00259 #if defined(XP_MAC)
00260 #ifndef TRUE                            /* Mac standard is lower case true */
00261         #define TRUE 1
00262 #endif
00263 #ifndef FALSE                           /* Mac standard is lower case false */
00264         #define FALSE 0
00265 #endif
00266 #endif
00267 
00268 #endif /* !defined(PROTYPES_H) */

Copyright © Nokia Corporation 2001-2008
Back to top