_openbsd.cfg 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nspr_cpucfg___
  6. #define nspr_cpucfg___
  7. #ifndef XP_UNIX
  8. #define XP_UNIX
  9. #endif
  10. #ifndef OPENBSD
  11. #define OPENBSD
  12. #endif
  13. #define PR_AF_INET6 24 /* same as AF_INET6 */
  14. #ifndef HAVE_LONG_LONG
  15. #define HAVE_LONG_LONG
  16. #endif
  17. #if defined(__i386__) || defined(__arm__)
  18. #define IS_LITTLE_ENDIAN 1
  19. #undef IS_BIG_ENDIAN
  20. #undef HAVE_ALIGNED_DOUBLES
  21. #undef HAVE_ALIGNED_LONGLONGS
  22. #define PR_BYTES_PER_BYTE 1
  23. #define PR_BYTES_PER_SHORT 2
  24. #define PR_BYTES_PER_INT 4
  25. #define PR_BYTES_PER_INT64 8
  26. #define PR_BYTES_PER_LONG 4
  27. #define PR_BYTES_PER_FLOAT 4
  28. #define PR_BYTES_PER_DOUBLE 8
  29. #define PR_BYTES_PER_WORD 4
  30. #define PR_BYTES_PER_DWORD 8
  31. #define PR_BYTES_PER_WORD_LOG2 2
  32. #define PR_BYTES_PER_DWORD_LOG2 3
  33. #define PR_BITS_PER_BYTE 8
  34. #define PR_BITS_PER_SHORT 16
  35. #define PR_BITS_PER_INT 32
  36. #define PR_BITS_PER_INT64 64
  37. #define PR_BITS_PER_LONG 32
  38. #define PR_BITS_PER_FLOAT 32
  39. #define PR_BITS_PER_DOUBLE 64
  40. #define PR_BITS_PER_WORD 32
  41. #define PR_BITS_PER_BYTE_LOG2 3
  42. #define PR_BITS_PER_SHORT_LOG2 4
  43. #define PR_BITS_PER_INT_LOG2 5
  44. #define PR_BITS_PER_INT64_LOG2 6
  45. #define PR_BITS_PER_LONG_LOG2 5
  46. #define PR_BITS_PER_FLOAT_LOG2 5
  47. #define PR_BITS_PER_DOUBLE_LOG2 6
  48. #define PR_BITS_PER_WORD_LOG2 5
  49. #define PR_ALIGN_OF_SHORT 2
  50. #define PR_ALIGN_OF_INT 4
  51. #define PR_ALIGN_OF_LONG 4
  52. #define PR_ALIGN_OF_INT64 4
  53. #define PR_ALIGN_OF_FLOAT 4
  54. #define PR_ALIGN_OF_DOUBLE 4
  55. #define PR_ALIGN_OF_POINTER 4
  56. #elif defined(__amd64__)
  57. #define IS_LITTLE_ENDIAN 1
  58. #undef IS_BIG_ENDIAN
  59. #define IS_64
  60. #define PR_BYTES_PER_BYTE 1
  61. #define PR_BYTES_PER_SHORT 2
  62. #define PR_BYTES_PER_INT 4
  63. #define PR_BYTES_PER_INT64 8
  64. #define PR_BYTES_PER_LONG 8
  65. #define PR_BYTES_PER_FLOAT 4
  66. #define PR_BYTES_PER_DOUBLE 8
  67. #define PR_BYTES_PER_WORD 8
  68. #define PR_BYTES_PER_DWORD 8
  69. #define PR_BITS_PER_BYTE 8
  70. #define PR_BITS_PER_SHORT 16
  71. #define PR_BITS_PER_INT 32
  72. #define PR_BITS_PER_INT64 64
  73. #define PR_BITS_PER_LONG 64
  74. #define PR_BITS_PER_FLOAT 32
  75. #define PR_BITS_PER_DOUBLE 64
  76. #define PR_BITS_PER_WORD 64
  77. #define PR_BITS_PER_BYTE_LOG2 3
  78. #define PR_BITS_PER_SHORT_LOG2 4
  79. #define PR_BITS_PER_INT_LOG2 5
  80. #define PR_BITS_PER_INT64_LOG2 6
  81. #define PR_BITS_PER_LONG_LOG2 6
  82. #define PR_BITS_PER_FLOAT_LOG2 5
  83. #define PR_BITS_PER_DOUBLE_LOG2 6
  84. #define PR_BITS_PER_WORD_LOG2 6
  85. #define PR_ALIGN_OF_SHORT 2
  86. #define PR_ALIGN_OF_INT 4
  87. #define PR_ALIGN_OF_LONG 8
  88. #define PR_ALIGN_OF_INT64 8
  89. #define PR_ALIGN_OF_FLOAT 4
  90. #define PR_ALIGN_OF_DOUBLE 8
  91. #define PR_ALIGN_OF_POINTER 8
  92. #define PR_ALIGN_OF_WORD 8
  93. #define PR_BYTES_PER_WORD_LOG2 3
  94. #define PR_BYTES_PER_DWORD_LOG2 3
  95. #define HAVE_ALIGNED_DOUBLES
  96. #define HAVE_ALIGNED_LONGLONGS
  97. #elif defined(__sparc_v9__)
  98. #undef IS_LITTLE_ENDIAN
  99. #define IS_BIG_ENDIAN 1
  100. #define HAVE_ALIGNED_DOUBLES
  101. #define HAVE_ALIGNED_LONGLONGS
  102. #define IS_64
  103. #define PR_BYTES_PER_BYTE 1
  104. #define PR_BYTES_PER_SHORT 2
  105. #define PR_BYTES_PER_INT 4
  106. #define PR_BYTES_PER_INT64 8
  107. #define PR_BYTES_PER_LONG 8
  108. #define PR_BYTES_PER_FLOAT 4
  109. #define PR_BYTES_PER_DOUBLE 8
  110. #define PR_BYTES_PER_WORD 8
  111. #define PR_BYTES_PER_DWORD 8
  112. #define PR_BITS_PER_BYTE 8
  113. #define PR_BITS_PER_SHORT 16
  114. #define PR_BITS_PER_INT 32
  115. #define PR_BITS_PER_INT64 64
  116. #define PR_BITS_PER_LONG 64
  117. #define PR_BITS_PER_FLOAT 32
  118. #define PR_BITS_PER_DOUBLE 64
  119. #define PR_BITS_PER_WORD 64
  120. #define PR_BITS_PER_BYTE_LOG2 3
  121. #define PR_BITS_PER_SHORT_LOG2 4
  122. #define PR_BITS_PER_INT_LOG2 5
  123. #define PR_BITS_PER_INT64_LOG2 6
  124. #define PR_BITS_PER_LONG_LOG2 6
  125. #define PR_BITS_PER_FLOAT_LOG2 5
  126. #define PR_BITS_PER_DOUBLE_LOG2 6
  127. #define PR_BITS_PER_WORD_LOG2 6
  128. #define PR_ALIGN_OF_SHORT 2
  129. #define PR_ALIGN_OF_INT 4
  130. #define PR_ALIGN_OF_LONG 8
  131. #define PR_ALIGN_OF_INT64 8
  132. #define PR_ALIGN_OF_FLOAT 4
  133. #define PR_ALIGN_OF_DOUBLE 8
  134. #define PR_ALIGN_OF_POINTER 8
  135. #define PR_BYTES_PER_WORD_LOG2 3
  136. #define PR_BYTES_PER_DWORD_LOG2 3
  137. #elif defined(__sparc__)
  138. #undef IS_LITTLE_ENDIAN
  139. #define IS_BIG_ENDIAN 1
  140. #define HAVE_ALIGNED_DOUBLES
  141. #define HAVE_ALIGNED_LONGLONGS
  142. #define PR_BYTES_PER_BYTE 1
  143. #define PR_BYTES_PER_SHORT 2
  144. #define PR_BYTES_PER_INT 4
  145. #define PR_BYTES_PER_INT64 8
  146. #define PR_BYTES_PER_LONG 4
  147. #define PR_BYTES_PER_FLOAT 4
  148. #define PR_BYTES_PER_DOUBLE 8
  149. #define PR_BYTES_PER_WORD 4
  150. #define PR_BYTES_PER_DWORD 8
  151. #define PR_BYTES_PER_WORD_LOG2 2
  152. #define PR_BYTES_PER_DWORD_LOG2 3
  153. #define PR_BITS_PER_BYTE 8
  154. #define PR_BITS_PER_SHORT 16
  155. #define PR_BITS_PER_INT 32
  156. #define PR_BITS_PER_INT64 64
  157. #define PR_BITS_PER_LONG 32
  158. #define PR_BITS_PER_FLOAT 32
  159. #define PR_BITS_PER_DOUBLE 64
  160. #define PR_BITS_PER_WORD 32
  161. #define PR_BITS_PER_BYTE_LOG2 3
  162. #define PR_BITS_PER_SHORT_LOG2 4
  163. #define PR_BITS_PER_INT_LOG2 5
  164. #define PR_BITS_PER_INT64_LOG2 6
  165. #define PR_BITS_PER_LONG_LOG2 5
  166. #define PR_BITS_PER_FLOAT_LOG2 5
  167. #define PR_BITS_PER_DOUBLE_LOG2 6
  168. #define PR_BITS_PER_WORD_LOG2 5
  169. #define PR_ALIGN_OF_SHORT 2
  170. #define PR_ALIGN_OF_INT 4
  171. #define PR_ALIGN_OF_LONG 4
  172. #define PR_ALIGN_OF_INT64 8
  173. #define PR_ALIGN_OF_FLOAT 4
  174. #define PR_ALIGN_OF_DOUBLE 8
  175. #define PR_ALIGN_OF_POINTER 4
  176. #elif defined(__alpha__)
  177. #define IS_LITTLE_ENDIAN 1
  178. #undef IS_BIG_ENDIAN
  179. #define HAVE_ALIGNED_DOUBLES
  180. #define HAVE_ALIGNED_LONGLONGS
  181. #define IS_64
  182. #define PR_BYTES_PER_BYTE 1
  183. #define PR_BYTES_PER_SHORT 2
  184. #define PR_BYTES_PER_INT 4
  185. #define PR_BYTES_PER_INT64 8
  186. #define PR_BYTES_PER_LONG 8
  187. #define PR_BYTES_PER_FLOAT 4
  188. #define PR_BYTES_PER_DOUBLE 8
  189. #define PR_BYTES_PER_WORD 8
  190. #define PR_BYTES_PER_DWORD 8
  191. #define PR_BITS_PER_BYTE 8
  192. #define PR_BITS_PER_SHORT 16
  193. #define PR_BITS_PER_INT 32
  194. #define PR_BITS_PER_INT64 64
  195. #define PR_BITS_PER_LONG 64
  196. #define PR_BITS_PER_FLOAT 32
  197. #define PR_BITS_PER_DOUBLE 64
  198. #define PR_BITS_PER_WORD 64
  199. #define PR_BITS_PER_BYTE_LOG2 3
  200. #define PR_BITS_PER_SHORT_LOG2 4
  201. #define PR_BITS_PER_INT_LOG2 5
  202. #define PR_BITS_PER_INT64_LOG2 6
  203. #define PR_BITS_PER_LONG_LOG2 6
  204. #define PR_BITS_PER_FLOAT_LOG2 5
  205. #define PR_BITS_PER_DOUBLE_LOG2 6
  206. #define PR_BITS_PER_WORD_LOG2 6
  207. #define PR_ALIGN_OF_SHORT 2
  208. #define PR_ALIGN_OF_INT 4
  209. #define PR_ALIGN_OF_LONG 8
  210. #define PR_ALIGN_OF_INT64 8
  211. #define PR_ALIGN_OF_FLOAT 4
  212. #define PR_ALIGN_OF_DOUBLE 8
  213. #define PR_ALIGN_OF_POINTER 8
  214. #define PR_BYTES_PER_WORD_LOG2 3
  215. #define PR_BYTES_PER_DWORD_LOG2 3
  216. #elif defined(__powerpc__) || defined(__m68k__)
  217. #undef IS_LITTLE_ENDIAN
  218. #define IS_BIG_ENDIAN 1
  219. #undef HAVE_ALIGNED_DOUBLES
  220. #undef HAVE_ALIGNED_LONGLONGS
  221. #define PR_BYTES_PER_BYTE 1
  222. #define PR_BYTES_PER_SHORT 2
  223. #define PR_BYTES_PER_INT 4
  224. #define PR_BYTES_PER_INT64 8
  225. #define PR_BYTES_PER_LONG 4
  226. #define PR_BYTES_PER_FLOAT 4
  227. #define PR_BYTES_PER_DOUBLE 8
  228. #define PR_BYTES_PER_WORD 4
  229. #define PR_BYTES_PER_DWORD 8
  230. #define PR_BITS_PER_BYTE 8
  231. #define PR_BITS_PER_SHORT 16
  232. #define PR_BITS_PER_INT 32
  233. #define PR_BITS_PER_INT64 64
  234. #define PR_BITS_PER_LONG 32
  235. #define PR_BITS_PER_FLOAT 32
  236. #define PR_BITS_PER_DOUBLE 64
  237. #define PR_BITS_PER_WORD 32
  238. #define PR_BITS_PER_BYTE_LOG2 3
  239. #define PR_BITS_PER_SHORT_LOG2 4
  240. #define PR_BITS_PER_INT_LOG2 5
  241. #define PR_BITS_PER_INT64_LOG2 6
  242. #define PR_BITS_PER_LONG_LOG2 5
  243. #define PR_BITS_PER_FLOAT_LOG2 5
  244. #define PR_BITS_PER_DOUBLE_LOG2 6
  245. #define PR_BITS_PER_WORD_LOG2 5
  246. #define PR_ALIGN_OF_SHORT 2
  247. #define PR_ALIGN_OF_INT 4
  248. #define PR_ALIGN_OF_LONG 4
  249. #define PR_ALIGN_OF_INT64 4
  250. #define PR_ALIGN_OF_FLOAT 4
  251. #define PR_ALIGN_OF_DOUBLE 4
  252. #define PR_ALIGN_OF_POINTER 4
  253. #define PR_BYTES_PER_WORD_LOG2 2
  254. #define PR_BYTES_PER_DWORD_LOG2 3
  255. #else
  256. #error Must define constants for type sizes here.
  257. #endif
  258. #ifndef NO_NSPR_10_SUPPORT
  259. #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
  260. #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
  261. #define BYTES_PER_INT PR_BYTES_PER_INT
  262. #define BYTES_PER_INT64 PR_BYTES_PER_INT64
  263. #define BYTES_PER_LONG PR_BYTES_PER_LONG
  264. #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
  265. #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
  266. #define BYTES_PER_WORD PR_BYTES_PER_WORD
  267. #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
  268. #define BITS_PER_BYTE PR_BITS_PER_BYTE
  269. #define BITS_PER_SHORT PR_BITS_PER_SHORT
  270. #define BITS_PER_INT PR_BITS_PER_INT
  271. #define BITS_PER_INT64 PR_BITS_PER_INT64
  272. #define BITS_PER_LONG PR_BITS_PER_LONG
  273. #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
  274. #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
  275. #define BITS_PER_WORD PR_BITS_PER_WORD
  276. #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
  277. #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
  278. #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
  279. #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
  280. #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
  281. #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
  282. #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
  283. #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
  284. #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
  285. #define ALIGN_OF_INT PR_ALIGN_OF_INT
  286. #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
  287. #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
  288. #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
  289. #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
  290. #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
  291. #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
  292. #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
  293. #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
  294. #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
  295. #endif /* NO_NSPR_10_SUPPORT */
  296. #endif /* nspr_cpucfg___ */