_winnt.cfg 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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_PC
  8. #define XP_PC
  9. #endif
  10. #ifndef WIN32
  11. #define WIN32
  12. #endif
  13. #ifndef WINNT
  14. #define WINNT
  15. #endif
  16. #define PR_AF_INET6 23 /* same as AF_INET6 */
  17. #if defined(_M_IX86) || defined(_X86_)
  18. #define IS_LITTLE_ENDIAN 1
  19. #undef IS_BIG_ENDIAN
  20. #define PR_BYTES_PER_BYTE 1
  21. #define PR_BYTES_PER_SHORT 2
  22. #define PR_BYTES_PER_INT 4
  23. #define PR_BYTES_PER_INT64 8
  24. #define PR_BYTES_PER_LONG 4
  25. #define PR_BYTES_PER_FLOAT 4
  26. #define PR_BYTES_PER_WORD 4
  27. #define PR_BYTES_PER_DWORD 8
  28. #define PR_BYTES_PER_DOUBLE 8
  29. #define PR_BITS_PER_BYTE 8
  30. #define PR_BITS_PER_SHORT 16
  31. #define PR_BITS_PER_INT 32
  32. #define PR_BITS_PER_INT64 64
  33. #define PR_BITS_PER_LONG 32
  34. #define PR_BITS_PER_FLOAT 32
  35. #define PR_BITS_PER_WORD 32
  36. #define PR_BITS_PER_DWORD 64
  37. #define PR_BITS_PER_DOUBLE 64
  38. #define PR_BITS_PER_BYTE_LOG2 3
  39. #define PR_BITS_PER_SHORT_LOG2 4
  40. #define PR_BITS_PER_INT_LOG2 5
  41. #define PR_BITS_PER_INT64_LOG2 6
  42. #define PR_BITS_PER_LONG_LOG2 5
  43. #define PR_BITS_PER_FLOAT_LOG2 5
  44. #define PR_BITS_PER_WORD_LOG2 5
  45. #define PR_BITS_PER_DWORD_LOG2 6
  46. #define PR_BITS_PER_DOUBLE_LOG2 6
  47. #define PR_ALIGN_OF_SHORT 2
  48. #define PR_ALIGN_OF_INT 4
  49. #define PR_ALIGN_OF_LONG 4
  50. #define PR_ALIGN_OF_INT64 8
  51. #define PR_ALIGN_OF_FLOAT 4
  52. #define PR_ALIGN_OF_WORD 4
  53. #define PR_ALIGN_OF_DWORD 8
  54. #define PR_ALIGN_OF_DOUBLE 4
  55. #define PR_ALIGN_OF_POINTER 4
  56. #define PR_BYTES_PER_WORD_LOG2 2
  57. #define PR_BYTES_PER_DWORD_LOG2 2
  58. #elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
  59. #define IS_LITTLE_ENDIAN 1
  60. #undef IS_BIG_ENDIAN
  61. #define IS_64
  62. #define PR_BYTES_PER_BYTE 1
  63. #define PR_BYTES_PER_SHORT 2
  64. #define PR_BYTES_PER_INT 4
  65. #define PR_BYTES_PER_INT64 8
  66. #define PR_BYTES_PER_LONG 4
  67. #define PR_BYTES_PER_FLOAT 4
  68. #define PR_BYTES_PER_WORD 8
  69. #define PR_BYTES_PER_DWORD 8
  70. #define PR_BYTES_PER_DOUBLE 8
  71. #define PR_BITS_PER_BYTE 8
  72. #define PR_BITS_PER_SHORT 16
  73. #define PR_BITS_PER_INT 32
  74. #define PR_BITS_PER_INT64 64
  75. #define PR_BITS_PER_LONG 32
  76. #define PR_BITS_PER_FLOAT 32
  77. #define PR_BITS_PER_WORD 64
  78. #define PR_BITS_PER_DWORD 64
  79. #define PR_BITS_PER_DOUBLE 64
  80. #define PR_BITS_PER_BYTE_LOG2 3
  81. #define PR_BITS_PER_SHORT_LOG2 4
  82. #define PR_BITS_PER_INT_LOG2 5
  83. #define PR_BITS_PER_INT64_LOG2 6
  84. #define PR_BITS_PER_LONG_LOG2 5
  85. #define PR_BITS_PER_FLOAT_LOG2 5
  86. #define PR_BITS_PER_WORD_LOG2 6
  87. #define PR_BITS_PER_DWORD_LOG2 6
  88. #define PR_BITS_PER_DOUBLE_LOG2 6
  89. #define PR_ALIGN_OF_SHORT 2
  90. #define PR_ALIGN_OF_INT 4
  91. #define PR_ALIGN_OF_LONG 4
  92. #define PR_ALIGN_OF_INT64 8
  93. #define PR_ALIGN_OF_FLOAT 4
  94. #define PR_ALIGN_OF_WORD 8
  95. #define PR_ALIGN_OF_DWORD 8
  96. #define PR_ALIGN_OF_DOUBLE 8
  97. #define PR_ALIGN_OF_POINTER 8
  98. #define PR_BYTES_PER_WORD_LOG2 3
  99. #define PR_BYTES_PER_DWORD_LOG2 3
  100. #elif defined(_M_IA64) || defined(_IA64_)
  101. #define IS_LITTLE_ENDIAN 1
  102. #undef IS_BIG_ENDIAN
  103. #define IS_64
  104. #define PR_BYTES_PER_BYTE 1
  105. #define PR_BYTES_PER_SHORT 2
  106. #define PR_BYTES_PER_INT 4
  107. #define PR_BYTES_PER_INT64 8
  108. #define PR_BYTES_PER_LONG 4
  109. #define PR_BYTES_PER_FLOAT 4
  110. #define PR_BYTES_PER_WORD 8
  111. #define PR_BYTES_PER_DWORD 8
  112. #define PR_BYTES_PER_DOUBLE 8
  113. #define PR_BITS_PER_BYTE 8
  114. #define PR_BITS_PER_SHORT 16
  115. #define PR_BITS_PER_INT 32
  116. #define PR_BITS_PER_INT64 64
  117. #define PR_BITS_PER_LONG 32
  118. #define PR_BITS_PER_FLOAT 32
  119. #define PR_BITS_PER_WORD 64
  120. #define PR_BITS_PER_DWORD 64
  121. #define PR_BITS_PER_DOUBLE 64
  122. #define PR_BITS_PER_BYTE_LOG2 3
  123. #define PR_BITS_PER_SHORT_LOG2 4
  124. #define PR_BITS_PER_INT_LOG2 5
  125. #define PR_BITS_PER_INT64_LOG2 6
  126. #define PR_BITS_PER_LONG_LOG2 5
  127. #define PR_BITS_PER_FLOAT_LOG2 5
  128. #define PR_BITS_PER_WORD_LOG2 6
  129. #define PR_BITS_PER_DWORD_LOG2 6
  130. #define PR_BITS_PER_DOUBLE_LOG2 6
  131. #define PR_ALIGN_OF_SHORT 2
  132. #define PR_ALIGN_OF_INT 4
  133. #define PR_ALIGN_OF_LONG 4
  134. #define PR_ALIGN_OF_INT64 8
  135. #define PR_ALIGN_OF_FLOAT 4
  136. #define PR_ALIGN_OF_WORD 8
  137. #define PR_ALIGN_OF_DWORD 8
  138. #define PR_ALIGN_OF_DOUBLE 8
  139. #define PR_ALIGN_OF_POINTER 8
  140. #define PR_BYTES_PER_WORD_LOG2 3
  141. #define PR_BYTES_PER_DWORD_LOG2 3
  142. #else /* defined(_M_IX86) || defined(_X86_) */
  143. #error unknown processor architecture
  144. #endif /* defined(_M_IX86) || defined(_X86_) */
  145. #ifndef HAVE_LONG_LONG
  146. #define HAVE_LONG_LONG
  147. #endif
  148. #ifndef NO_NSPR_10_SUPPORT
  149. #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
  150. #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
  151. #define BYTES_PER_INT PR_BYTES_PER_INT
  152. #define BYTES_PER_INT64 PR_BYTES_PER_INT64
  153. #define BYTES_PER_LONG PR_BYTES_PER_LONG
  154. #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
  155. #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
  156. #define BYTES_PER_WORD PR_BYTES_PER_WORD
  157. #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
  158. #define BITS_PER_BYTE PR_BITS_PER_BYTE
  159. #define BITS_PER_SHORT PR_BITS_PER_SHORT
  160. #define BITS_PER_INT PR_BITS_PER_INT
  161. #define BITS_PER_INT64 PR_BITS_PER_INT64
  162. #define BITS_PER_LONG PR_BITS_PER_LONG
  163. #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
  164. #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
  165. #define BITS_PER_WORD PR_BITS_PER_WORD
  166. #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
  167. #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
  168. #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
  169. #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
  170. #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
  171. #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
  172. #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
  173. #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
  174. #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
  175. #define ALIGN_OF_INT PR_ALIGN_OF_INT
  176. #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
  177. #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
  178. #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
  179. #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
  180. #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
  181. #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
  182. #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
  183. #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
  184. #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
  185. #endif /* NO_NSPR_10_SUPPORT */
  186. #endif /* nspr_cpucfg___ */