Back to index

lightning-sunbird  0.9+nobinonly
jsotypes.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is Mozilla Communicator client code, released
00016  * March 31, 1998.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either of the GNU General Public License Version 2 or later (the "GPL"),
00027  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 /*
00040  * This section typedefs the old 'native' types to the new PR<type>s.
00041  * These definitions are scheduled to be eliminated at the earliest
00042  * possible time. The NSPR API is implemented and documented using
00043  * the new definitions.
00044  */
00045 
00046 /*
00047  * Note that we test for PROTYPES_H, not JSOTYPES_H.  This is to avoid
00048  * double-definitions of scalar types such as uint32, if NSPR's
00049  * protypes.h is also included.
00050  */
00051 #ifndef PROTYPES_H
00052 #define PROTYPES_H
00053 
00054 #ifdef XP_BEOS
00055 /* BeOS defines most int types in SupportDefs.h (int8, uint8, int16,
00056  * uint16, int32, uint32, int64, uint64), so in the interest of
00057  * not conflicting with other definitions elsewhere we have to skip the
00058  * #ifdef jungle below, duplicate some definitions, and do our stuff.
00059  */
00060 #include <SupportDefs.h>
00061 
00062 typedef JSUintn uintn;
00063 #ifndef _XP_Core_
00064 typedef JSIntn intn;
00065 #endif
00066 
00067 #else
00068 
00069 /* SVR4 typedef of uint is commonly found on UNIX machines. */
00070 #if defined(XP_UNIX) && !defined(__QNXNTO__)
00071 #include <sys/types.h>
00072 #else
00073 typedef JSUintn uint;
00074 #endif
00075 
00076 typedef JSUintn uintn;
00077 typedef JSUint64 uint64;
00078 #if !defined(_WIN32) && !defined(XP_OS2)
00079 typedef JSUint32 uint32;
00080 #else
00081 typedef unsigned long uint32;
00082 #endif
00083 typedef JSUint16 uint16;
00084 typedef JSUint8 uint8;
00085 
00086 #ifndef _XP_Core_
00087 typedef JSIntn intn;
00088 #endif
00089 
00090 /*
00091  * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h, a very
00092  * common header file) defines the types int8, int16, int32, and int64.
00093  * So we don't define these four types here to avoid conflicts in case
00094  * the code also includes sys/types.h.
00095  */
00096 #if defined(AIX) && defined(HAVE_SYS_INTTYPES_H)
00097 #include <sys/inttypes.h>
00098 #else
00099 typedef JSInt64 int64;
00100 
00101 /* /usr/include/model.h on HP-UX defines int8, int16, and int32 */
00102 #ifdef HPUX
00103 #include <model.h>
00104 #else
00105 #if !defined(_WIN32) && !defined(XP_OS2)
00106 typedef JSInt32 int32;
00107 #else
00108 typedef long int32;
00109 #endif
00110 typedef JSInt16 int16;
00111 typedef JSInt8 int8;
00112 #endif /* HPUX */
00113 #endif /* AIX && HAVE_SYS_INTTYPES_H */
00114 
00115 #endif  /* XP_BEOS */
00116 
00117 typedef JSFloat64 float64;
00118 
00119 /* Re: jsbit.h */
00120 #define TEST_BIT        JS_TEST_BIT
00121 #define SET_BIT         JS_SET_BIT
00122 #define CLEAR_BIT       JS_CLEAR_BIT
00123 
00124 /* Re: prarena.h->plarena.h */
00125 #define PRArena PLArena
00126 #define PRArenaPool PLArenaPool
00127 #define PRArenaStats PLArenaStats
00128 #define PR_ARENA_ALIGN PL_ARENA_ALIGN
00129 #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
00130 #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
00131 #define PR_ARENA_GROW PL_ARENA_GROW
00132 #define PR_ARENA_MARK PL_ARENA_MARK
00133 #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
00134 #define PR_CLEAR_ARENA PL_CLEAR_ARENA
00135 #define PR_ARENA_RELEASE PL_ARENA_RELEASE
00136 #define PR_COUNT_ARENA PL_COUNT_ARENA
00137 #define PR_ARENA_DESTROY PL_ARENA_DESTROY
00138 #define PR_InitArenaPool PL_InitArenaPool
00139 #define PR_FreeArenaPool PL_FreeArenaPool
00140 #define PR_FinishArenaPool PL_FinishArenaPool
00141 #define PR_CompactArenaPool PL_CompactArenaPool
00142 #define PR_ArenaFinish PL_ArenaFinish
00143 #define PR_ArenaAllocate PL_ArenaAllocate
00144 #define PR_ArenaGrow PL_ArenaGrow
00145 #define PR_ArenaRelease PL_ArenaRelease
00146 #define PR_ArenaCountAllocation PL_ArenaCountAllocation
00147 #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
00148 #define PR_ArenaCountGrowth PL_ArenaCountGrowth
00149 #define PR_ArenaCountRelease PL_ArenaCountRelease
00150 #define PR_ArenaCountRetract PL_ArenaCountRetract
00151 
00152 /* Re: prevent.h->plevent.h */
00153 #define PREvent PLEvent
00154 #define PREventQueue PLEventQueue
00155 #define PR_CreateEventQueue PL_CreateEventQueue
00156 #define PR_DestroyEventQueue PL_DestroyEventQueue
00157 #define PR_GetEventQueueMonitor PL_GetEventQueueMonitor
00158 #define PR_ENTER_EVENT_QUEUE_MONITOR PL_ENTER_EVENT_QUEUE_MONITOR
00159 #define PR_EXIT_EVENT_QUEUE_MONITOR PL_EXIT_EVENT_QUEUE_MONITOR
00160 #define PR_PostEvent PL_PostEvent
00161 #define PR_PostSynchronousEvent PL_PostSynchronousEvent
00162 #define PR_GetEvent PL_GetEvent
00163 #define PR_EventAvailable PL_EventAvailable
00164 #define PREventFunProc PLEventFunProc
00165 #define PR_MapEvents PL_MapEvents
00166 #define PR_RevokeEvents PL_RevokeEvents
00167 #define PR_ProcessPendingEvents PL_ProcessPendingEvents
00168 #define PR_WaitForEvent PL_WaitForEvent
00169 #define PR_EventLoop PL_EventLoop
00170 #define PR_GetEventQueueSelectFD PL_GetEventQueueSelectFD
00171 #define PRHandleEventProc PLHandleEventProc
00172 #define PRDestroyEventProc PLDestroyEventProc
00173 #define PR_InitEvent PL_InitEvent
00174 #define PR_GetEventOwner PL_GetEventOwner
00175 #define PR_HandleEvent PL_HandleEvent
00176 #define PR_DestroyEvent PL_DestroyEvent
00177 #define PR_DequeueEvent PL_DequeueEvent
00178 #define PR_GetMainEventQueue PL_GetMainEventQueue
00179 
00180 /* Re: prhash.h->plhash.h */
00181 #define PRHashEntry PLHashEntry
00182 #define PRHashTable PLHashTable
00183 #define PRHashNumber PLHashNumber
00184 #define PRHashFunction PLHashFunction
00185 #define PRHashComparator PLHashComparator
00186 #define PRHashEnumerator PLHashEnumerator
00187 #define PRHashAllocOps PLHashAllocOps
00188 #define PR_NewHashTable PL_NewHashTable
00189 #define PR_HashTableDestroy PL_HashTableDestroy
00190 #define PR_HashTableRawLookup PL_HashTableRawLookup
00191 #define PR_HashTableRawAdd PL_HashTableRawAdd
00192 #define PR_HashTableRawRemove PL_HashTableRawRemove
00193 #define PR_HashTableAdd PL_HashTableAdd
00194 #define PR_HashTableRemove PL_HashTableRemove
00195 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
00196 #define PR_HashTableLookup PL_HashTableLookup
00197 #define PR_HashTableDump PL_HashTableDump
00198 #define PR_HashString PL_HashString
00199 #define PR_CompareStrings PL_CompareStrings
00200 #define PR_CompareValues PL_CompareValues
00201 
00202 #endif /* !defined(PROTYPES_H) */