PageRenderTime 27ms CodeModel.GetById 1ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/md/_openbsd.cfg

http://firefox-mac-pdf.googlecode.com/
Unknown | 385 lines | 328 code | 57 blank | 0 comment | 0 complexity | e4531631a650943dac43421723c96f24 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. #ifndef nspr_cpucfg___
  38. #define nspr_cpucfg___
  39. #ifndef XP_UNIX
  40. #define XP_UNIX
  41. #endif
  42. #ifndef OPENBSD
  43. #define OPENBSD
  44. #endif
  45. #define PR_AF_INET6 24 /* same as AF_INET6 */
  46. #ifndef HAVE_LONG_LONG
  47. #define HAVE_LONG_LONG
  48. #endif
  49. #if defined(__i386__) || defined(__arm__)
  50. #define IS_LITTLE_ENDIAN 1
  51. #undef IS_BIG_ENDIAN
  52. #undef HAVE_ALIGNED_DOUBLES
  53. #undef HAVE_ALIGNED_LONGLONGS
  54. #define PR_BYTES_PER_BYTE 1
  55. #define PR_BYTES_PER_SHORT 2
  56. #define PR_BYTES_PER_INT 4
  57. #define PR_BYTES_PER_INT64 8
  58. #define PR_BYTES_PER_LONG 4
  59. #define PR_BYTES_PER_FLOAT 4
  60. #define PR_BYTES_PER_DOUBLE 8
  61. #define PR_BYTES_PER_WORD 4
  62. #define PR_BYTES_PER_DWORD 8
  63. #define PR_BYTES_PER_WORD_LOG2 2
  64. #define PR_BYTES_PER_DWORD_LOG2 3
  65. #define PR_BITS_PER_BYTE 8
  66. #define PR_BITS_PER_SHORT 16
  67. #define PR_BITS_PER_INT 32
  68. #define PR_BITS_PER_INT64 64
  69. #define PR_BITS_PER_LONG 32
  70. #define PR_BITS_PER_FLOAT 32
  71. #define PR_BITS_PER_DOUBLE 64
  72. #define PR_BITS_PER_WORD 32
  73. #define PR_BITS_PER_BYTE_LOG2 3
  74. #define PR_BITS_PER_SHORT_LOG2 4
  75. #define PR_BITS_PER_INT_LOG2 5
  76. #define PR_BITS_PER_INT64_LOG2 6
  77. #define PR_BITS_PER_LONG_LOG2 5
  78. #define PR_BITS_PER_FLOAT_LOG2 5
  79. #define PR_BITS_PER_DOUBLE_LOG2 6
  80. #define PR_BITS_PER_WORD_LOG2 5
  81. #define PR_ALIGN_OF_SHORT 2
  82. #define PR_ALIGN_OF_INT 4
  83. #define PR_ALIGN_OF_LONG 4
  84. #define PR_ALIGN_OF_INT64 4
  85. #define PR_ALIGN_OF_FLOAT 4
  86. #define PR_ALIGN_OF_DOUBLE 4
  87. #define PR_ALIGN_OF_POINTER 4
  88. #elif defined(__amd64__)
  89. #define IS_LITTLE_ENDIAN 1
  90. #undef IS_BIG_ENDIAN
  91. #define IS_64
  92. #define PR_BYTES_PER_BYTE 1
  93. #define PR_BYTES_PER_SHORT 2
  94. #define PR_BYTES_PER_INT 4
  95. #define PR_BYTES_PER_INT64 8
  96. #define PR_BYTES_PER_LONG 8
  97. #define PR_BYTES_PER_FLOAT 4
  98. #define PR_BYTES_PER_DOUBLE 8
  99. #define PR_BYTES_PER_WORD 8
  100. #define PR_BYTES_PER_DWORD 8
  101. #define PR_BITS_PER_BYTE 8
  102. #define PR_BITS_PER_SHORT 16
  103. #define PR_BITS_PER_INT 32
  104. #define PR_BITS_PER_INT64 64
  105. #define PR_BITS_PER_LONG 64
  106. #define PR_BITS_PER_FLOAT 32
  107. #define PR_BITS_PER_DOUBLE 64
  108. #define PR_BITS_PER_WORD 64
  109. #define PR_BITS_PER_BYTE_LOG2 3
  110. #define PR_BITS_PER_SHORT_LOG2 4
  111. #define PR_BITS_PER_INT_LOG2 5
  112. #define PR_BITS_PER_INT64_LOG2 6
  113. #define PR_BITS_PER_LONG_LOG2 6
  114. #define PR_BITS_PER_FLOAT_LOG2 5
  115. #define PR_BITS_PER_DOUBLE_LOG2 6
  116. #define PR_BITS_PER_WORD_LOG2 6
  117. #define PR_ALIGN_OF_SHORT 2
  118. #define PR_ALIGN_OF_INT 4
  119. #define PR_ALIGN_OF_LONG 8
  120. #define PR_ALIGN_OF_INT64 8
  121. #define PR_ALIGN_OF_FLOAT 4
  122. #define PR_ALIGN_OF_DOUBLE 8
  123. #define PR_ALIGN_OF_POINTER 8
  124. #define PR_ALIGN_OF_WORD 8
  125. #define PR_BYTES_PER_WORD_LOG2 3
  126. #define PR_BYTES_PER_DWORD_LOG2 3
  127. #define HAVE_ALIGNED_DOUBLES
  128. #define HAVE_ALIGNED_LONGLONGS
  129. #elif defined(__sparc_v9__)
  130. #undef IS_LITTLE_ENDIAN
  131. #define IS_BIG_ENDIAN 1
  132. #define HAVE_ALIGNED_DOUBLES
  133. #define HAVE_ALIGNED_LONGLONGS
  134. #define IS_64
  135. #define PR_BYTES_PER_BYTE 1
  136. #define PR_BYTES_PER_SHORT 2
  137. #define PR_BYTES_PER_INT 4
  138. #define PR_BYTES_PER_INT64 8
  139. #define PR_BYTES_PER_LONG 8
  140. #define PR_BYTES_PER_FLOAT 4
  141. #define PR_BYTES_PER_DOUBLE 8
  142. #define PR_BYTES_PER_WORD 8
  143. #define PR_BYTES_PER_DWORD 8
  144. #define PR_BITS_PER_BYTE 8
  145. #define PR_BITS_PER_SHORT 16
  146. #define PR_BITS_PER_INT 32
  147. #define PR_BITS_PER_INT64 64
  148. #define PR_BITS_PER_LONG 64
  149. #define PR_BITS_PER_FLOAT 32
  150. #define PR_BITS_PER_DOUBLE 64
  151. #define PR_BITS_PER_WORD 64
  152. #define PR_BITS_PER_BYTE_LOG2 3
  153. #define PR_BITS_PER_SHORT_LOG2 4
  154. #define PR_BITS_PER_INT_LOG2 5
  155. #define PR_BITS_PER_INT64_LOG2 6
  156. #define PR_BITS_PER_LONG_LOG2 6
  157. #define PR_BITS_PER_FLOAT_LOG2 5
  158. #define PR_BITS_PER_DOUBLE_LOG2 6
  159. #define PR_BITS_PER_WORD_LOG2 6
  160. #define PR_ALIGN_OF_SHORT 2
  161. #define PR_ALIGN_OF_INT 4
  162. #define PR_ALIGN_OF_LONG 8
  163. #define PR_ALIGN_OF_INT64 8
  164. #define PR_ALIGN_OF_FLOAT 4
  165. #define PR_ALIGN_OF_DOUBLE 8
  166. #define PR_ALIGN_OF_POINTER 8
  167. #define PR_BYTES_PER_WORD_LOG2 3
  168. #define PR_BYTES_PER_DWORD_LOG2 3
  169. #elif defined(__sparc__)
  170. #undef IS_LITTLE_ENDIAN
  171. #define IS_BIG_ENDIAN 1
  172. #define HAVE_ALIGNED_DOUBLES
  173. #define HAVE_ALIGNED_LONGLONGS
  174. #define PR_BYTES_PER_BYTE 1
  175. #define PR_BYTES_PER_SHORT 2
  176. #define PR_BYTES_PER_INT 4
  177. #define PR_BYTES_PER_INT64 8
  178. #define PR_BYTES_PER_LONG 4
  179. #define PR_BYTES_PER_FLOAT 4
  180. #define PR_BYTES_PER_DOUBLE 8
  181. #define PR_BYTES_PER_WORD 4
  182. #define PR_BYTES_PER_DWORD 8
  183. #define PR_BYTES_PER_WORD_LOG2 2
  184. #define PR_BYTES_PER_DWORD_LOG2 3
  185. #define PR_BITS_PER_BYTE 8
  186. #define PR_BITS_PER_SHORT 16
  187. #define PR_BITS_PER_INT 32
  188. #define PR_BITS_PER_INT64 64
  189. #define PR_BITS_PER_LONG 32
  190. #define PR_BITS_PER_FLOAT 32
  191. #define PR_BITS_PER_DOUBLE 64
  192. #define PR_BITS_PER_WORD 32
  193. #define PR_BITS_PER_BYTE_LOG2 3
  194. #define PR_BITS_PER_SHORT_LOG2 4
  195. #define PR_BITS_PER_INT_LOG2 5
  196. #define PR_BITS_PER_INT64_LOG2 6
  197. #define PR_BITS_PER_LONG_LOG2 5
  198. #define PR_BITS_PER_FLOAT_LOG2 5
  199. #define PR_BITS_PER_DOUBLE_LOG2 6
  200. #define PR_BITS_PER_WORD_LOG2 5
  201. #define PR_ALIGN_OF_SHORT 2
  202. #define PR_ALIGN_OF_INT 4
  203. #define PR_ALIGN_OF_LONG 4
  204. #define PR_ALIGN_OF_INT64 8
  205. #define PR_ALIGN_OF_FLOAT 4
  206. #define PR_ALIGN_OF_DOUBLE 8
  207. #define PR_ALIGN_OF_POINTER 4
  208. #elif defined(__alpha__)
  209. #define IS_LITTLE_ENDIAN 1
  210. #undef IS_BIG_ENDIAN
  211. #define HAVE_ALIGNED_DOUBLES
  212. #define HAVE_ALIGNED_LONGLONGS
  213. #define IS_64
  214. #define PR_BYTES_PER_BYTE 1
  215. #define PR_BYTES_PER_SHORT 2
  216. #define PR_BYTES_PER_INT 4
  217. #define PR_BYTES_PER_INT64 8
  218. #define PR_BYTES_PER_LONG 8
  219. #define PR_BYTES_PER_FLOAT 4
  220. #define PR_BYTES_PER_DOUBLE 8
  221. #define PR_BYTES_PER_WORD 8
  222. #define PR_BYTES_PER_DWORD 8
  223. #define PR_BITS_PER_BYTE 8
  224. #define PR_BITS_PER_SHORT 16
  225. #define PR_BITS_PER_INT 32
  226. #define PR_BITS_PER_INT64 64
  227. #define PR_BITS_PER_LONG 64
  228. #define PR_BITS_PER_FLOAT 32
  229. #define PR_BITS_PER_DOUBLE 64
  230. #define PR_BITS_PER_WORD 64
  231. #define PR_BITS_PER_BYTE_LOG2 3
  232. #define PR_BITS_PER_SHORT_LOG2 4
  233. #define PR_BITS_PER_INT_LOG2 5
  234. #define PR_BITS_PER_INT64_LOG2 6
  235. #define PR_BITS_PER_LONG_LOG2 6
  236. #define PR_BITS_PER_FLOAT_LOG2 5
  237. #define PR_BITS_PER_DOUBLE_LOG2 6
  238. #define PR_BITS_PER_WORD_LOG2 6
  239. #define PR_ALIGN_OF_SHORT 2
  240. #define PR_ALIGN_OF_INT 4
  241. #define PR_ALIGN_OF_LONG 8
  242. #define PR_ALIGN_OF_INT64 8
  243. #define PR_ALIGN_OF_FLOAT 4
  244. #define PR_ALIGN_OF_DOUBLE 8
  245. #define PR_ALIGN_OF_POINTER 8
  246. #define PR_BYTES_PER_WORD_LOG2 3
  247. #define PR_BYTES_PER_DWORD_LOG2 3
  248. #elif defined(__powerpc__) || defined(__m68k__)
  249. #undef IS_LITTLE_ENDIAN
  250. #define IS_BIG_ENDIAN 1
  251. #undef HAVE_ALIGNED_DOUBLES
  252. #undef HAVE_ALIGNED_LONGLONGS
  253. #define PR_BYTES_PER_BYTE 1
  254. #define PR_BYTES_PER_SHORT 2
  255. #define PR_BYTES_PER_INT 4
  256. #define PR_BYTES_PER_INT64 8
  257. #define PR_BYTES_PER_LONG 4
  258. #define PR_BYTES_PER_FLOAT 4
  259. #define PR_BYTES_PER_DOUBLE 8
  260. #define PR_BYTES_PER_WORD 4
  261. #define PR_BYTES_PER_DWORD 8
  262. #define PR_BITS_PER_BYTE 8
  263. #define PR_BITS_PER_SHORT 16
  264. #define PR_BITS_PER_INT 32
  265. #define PR_BITS_PER_INT64 64
  266. #define PR_BITS_PER_LONG 32
  267. #define PR_BITS_PER_FLOAT 32
  268. #define PR_BITS_PER_DOUBLE 64
  269. #define PR_BITS_PER_WORD 32
  270. #define PR_BITS_PER_BYTE_LOG2 3
  271. #define PR_BITS_PER_SHORT_LOG2 4
  272. #define PR_BITS_PER_INT_LOG2 5
  273. #define PR_BITS_PER_INT64_LOG2 6
  274. #define PR_BITS_PER_LONG_LOG2 5
  275. #define PR_BITS_PER_FLOAT_LOG2 5
  276. #define PR_BITS_PER_DOUBLE_LOG2 6
  277. #define PR_BITS_PER_WORD_LOG2 5
  278. #define PR_ALIGN_OF_SHORT 2
  279. #define PR_ALIGN_OF_INT 4
  280. #define PR_ALIGN_OF_LONG 4
  281. #define PR_ALIGN_OF_INT64 4
  282. #define PR_ALIGN_OF_FLOAT 4
  283. #define PR_ALIGN_OF_DOUBLE 4
  284. #define PR_ALIGN_OF_POINTER 4
  285. #define PR_BYTES_PER_WORD_LOG2 2
  286. #define PR_BYTES_PER_DWORD_LOG2 3
  287. #else
  288. #error Must define constants for type sizes here.
  289. #endif
  290. #ifndef NO_NSPR_10_SUPPORT
  291. #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
  292. #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
  293. #define BYTES_PER_INT PR_BYTES_PER_INT
  294. #define BYTES_PER_INT64 PR_BYTES_PER_INT64
  295. #define BYTES_PER_LONG PR_BYTES_PER_LONG
  296. #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
  297. #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
  298. #define BYTES_PER_WORD PR_BYTES_PER_WORD
  299. #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
  300. #define BITS_PER_BYTE PR_BITS_PER_BYTE
  301. #define BITS_PER_SHORT PR_BITS_PER_SHORT
  302. #define BITS_PER_INT PR_BITS_PER_INT
  303. #define BITS_PER_INT64 PR_BITS_PER_INT64
  304. #define BITS_PER_LONG PR_BITS_PER_LONG
  305. #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
  306. #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
  307. #define BITS_PER_WORD PR_BITS_PER_WORD
  308. #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
  309. #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
  310. #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
  311. #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
  312. #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
  313. #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
  314. #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
  315. #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
  316. #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
  317. #define ALIGN_OF_INT PR_ALIGN_OF_INT
  318. #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
  319. #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
  320. #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
  321. #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
  322. #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
  323. #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
  324. #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
  325. #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
  326. #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
  327. #endif /* NO_NSPR_10_SUPPORT */
  328. #endif /* nspr_cpucfg___ */