PageRenderTime 33ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/obsolete/protypes.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 252 lines | 124 code | 33 blank | 95 comment | 24 complexity | 45740a9bd9cd7f129a0f4be12a7c88fa MD5 | raw file
  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. * This header typedefs the old 'native' types to the new PR<type>s.
  39. * These definitions are scheduled to be eliminated at the earliest
  40. * possible time. The NSPR API is implemented and documented using
  41. * the new definitions.
  42. */
  43. #if !defined(PROTYPES_H)
  44. #define PROTYPES_H
  45. typedef PRUintn uintn;
  46. #ifndef _XP_Core_
  47. typedef PRIntn intn;
  48. #endif
  49. /*
  50. * It is trickier to define uint, int8, uint8, int16, uint16,
  51. * int32, uint32, int64, and uint64 because some of these int
  52. * types are defined by standard header files on some platforms.
  53. * Our strategy here is to include all such standard headers
  54. * first, and then define these int types only if they are not
  55. * defined by those standard headers.
  56. */
  57. /*
  58. * BeOS defines all the int types below in its standard header
  59. * file SupportDefs.h.
  60. */
  61. #ifdef XP_BEOS
  62. #include <support/SupportDefs.h>
  63. #endif
  64. /*
  65. * OpenVMS defines all the int types below in its standard
  66. * header files ints.h and types.h.
  67. */
  68. #ifdef VMS
  69. #include <ints.h>
  70. #include <types.h>
  71. #endif
  72. /*
  73. * SVR4 typedef of uint is commonly found on UNIX machines.
  74. *
  75. * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
  76. * defines the types int8, int16, int32, and int64.
  77. */
  78. #ifdef XP_UNIX
  79. #include <sys/types.h>
  80. #endif
  81. /* model.h on HP-UX defines int8, int16, and int32. */
  82. #ifdef HPUX
  83. #include <model.h>
  84. #endif
  85. /*
  86. * uint
  87. */
  88. #if !defined(XP_BEOS) && !defined(VMS) \
  89. && !defined(XP_UNIX) || defined(NTO)
  90. typedef PRUintn uint;
  91. #endif
  92. /*
  93. * uint64
  94. */
  95. #if !defined(XP_BEOS) && !defined(VMS)
  96. typedef PRUint64 uint64;
  97. #endif
  98. /*
  99. * uint32
  100. */
  101. #if !defined(XP_BEOS) && !defined(VMS)
  102. #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
  103. typedef PRUint32 uint32;
  104. #else
  105. typedef unsigned long uint32;
  106. #endif
  107. #endif
  108. /*
  109. * uint16
  110. */
  111. #if !defined(XP_BEOS) && !defined(VMS)
  112. typedef PRUint16 uint16;
  113. #endif
  114. /*
  115. * uint8
  116. */
  117. #if !defined(XP_BEOS) && !defined(VMS)
  118. typedef PRUint8 uint8;
  119. #endif
  120. /*
  121. * int64
  122. */
  123. #if !defined(XP_BEOS) && !defined(VMS) \
  124. && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
  125. typedef PRInt64 int64;
  126. #endif
  127. /*
  128. * int32
  129. */
  130. #if !defined(XP_BEOS) && !defined(VMS) \
  131. && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
  132. && !defined(HPUX)
  133. #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
  134. typedef PRInt32 int32;
  135. #else
  136. typedef long int32;
  137. #endif
  138. #endif
  139. /*
  140. * int16
  141. */
  142. #if !defined(XP_BEOS) && !defined(VMS) \
  143. && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
  144. && !defined(HPUX)
  145. typedef PRInt16 int16;
  146. #endif
  147. /*
  148. * int8
  149. */
  150. #if !defined(XP_BEOS) && !defined(VMS) \
  151. && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
  152. && !defined(HPUX)
  153. typedef PRInt8 int8;
  154. #endif
  155. typedef PRFloat64 float64;
  156. typedef PRUptrdiff uptrdiff_t;
  157. typedef PRUword uprword_t;
  158. typedef PRWord prword_t;
  159. /* Re: prbit.h */
  160. #define TEST_BIT PR_TEST_BIT
  161. #define SET_BIT PR_SET_BIT
  162. #define CLEAR_BIT PR_CLEAR_BIT
  163. /* Re: prarena.h->plarena.h */
  164. #define PRArena PLArena
  165. #define PRArenaPool PLArenaPool
  166. #define PRArenaStats PLArenaStats
  167. #define PR_ARENA_ALIGN PL_ARENA_ALIGN
  168. #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
  169. #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
  170. #define PR_ARENA_GROW PL_ARENA_GROW
  171. #define PR_ARENA_MARK PL_ARENA_MARK
  172. #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
  173. #define PR_CLEAR_ARENA PL_CLEAR_ARENA
  174. #define PR_ARENA_RELEASE PL_ARENA_RELEASE
  175. #define PR_COUNT_ARENA PL_COUNT_ARENA
  176. #define PR_ARENA_DESTROY PL_ARENA_DESTROY
  177. #define PR_InitArenaPool PL_InitArenaPool
  178. #define PR_FreeArenaPool PL_FreeArenaPool
  179. #define PR_FinishArenaPool PL_FinishArenaPool
  180. #define PR_CompactArenaPool PL_CompactArenaPool
  181. #define PR_ArenaFinish PL_ArenaFinish
  182. #define PR_ArenaAllocate PL_ArenaAllocate
  183. #define PR_ArenaGrow PL_ArenaGrow
  184. #define PR_ArenaRelease PL_ArenaRelease
  185. #define PR_ArenaCountAllocation PL_ArenaCountAllocation
  186. #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
  187. #define PR_ArenaCountGrowth PL_ArenaCountGrowth
  188. #define PR_ArenaCountRelease PL_ArenaCountRelease
  189. #define PR_ArenaCountRetract PL_ArenaCountRetract
  190. /* Re: prhash.h->plhash.h */
  191. #define PRHashEntry PLHashEntry
  192. #define PRHashTable PLHashTable
  193. #define PRHashNumber PLHashNumber
  194. #define PRHashFunction PLHashFunction
  195. #define PRHashComparator PLHashComparator
  196. #define PRHashEnumerator PLHashEnumerator
  197. #define PRHashAllocOps PLHashAllocOps
  198. #define PR_NewHashTable PL_NewHashTable
  199. #define PR_HashTableDestroy PL_HashTableDestroy
  200. #define PR_HashTableRawLookup PL_HashTableRawLookup
  201. #define PR_HashTableRawAdd PL_HashTableRawAdd
  202. #define PR_HashTableRawRemove PL_HashTableRawRemove
  203. #define PR_HashTableAdd PL_HashTableAdd
  204. #define PR_HashTableRemove PL_HashTableRemove
  205. #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
  206. #define PR_HashTableLookup PL_HashTableLookup
  207. #define PR_HashTableDump PL_HashTableDump
  208. #define PR_HashString PL_HashString
  209. #define PR_CompareStrings PL_CompareStrings
  210. #define PR_CompareValues PL_CompareValues
  211. #if defined(XP_MAC)
  212. #ifndef TRUE /* Mac standard is lower case true */
  213. #define TRUE 1
  214. #endif
  215. #ifndef FALSE /* Mac standard is lower case false */
  216. #define FALSE 0
  217. #endif
  218. #endif
  219. #endif /* !defined(PROTYPES_H) */