_darwin.cfg 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. #define PR_AF_INET6 30 /* same as AF_INET6 */
  11. #ifdef __LITTLE_ENDIAN__
  12. #undef IS_BIG_ENDIAN
  13. #define IS_LITTLE_ENDIAN 1
  14. #else
  15. #undef IS_LITTLE_ENDIAN
  16. #define IS_BIG_ENDIAN 1
  17. #endif
  18. #ifdef __LP64__
  19. #define IS_64
  20. #endif
  21. #ifndef HAVE_LONG_LONG
  22. #define HAVE_LONG_LONG
  23. #endif
  24. #undef HAVE_ALIGNED_DOUBLES
  25. #define HAVE_ALIGNED_LONGLONGS 1
  26. #ifdef IS_64
  27. #define PR_BYTES_PER_BYTE 1
  28. #define PR_BYTES_PER_SHORT 2
  29. #define PR_BYTES_PER_INT 4
  30. #define PR_BYTES_PER_INT64 8
  31. #define PR_BYTES_PER_LONG 8
  32. #define PR_BYTES_PER_FLOAT 4
  33. #define PR_BYTES_PER_DOUBLE 8
  34. #define PR_BYTES_PER_WORD 8
  35. #define PR_BYTES_PER_DWORD 8
  36. #define PR_BITS_PER_BYTE 8
  37. #define PR_BITS_PER_SHORT 16
  38. #define PR_BITS_PER_INT 32
  39. #define PR_BITS_PER_INT64 64
  40. #define PR_BITS_PER_LONG 64
  41. #define PR_BITS_PER_FLOAT 32
  42. #define PR_BITS_PER_DOUBLE 64
  43. #define PR_BITS_PER_WORD 64
  44. #define PR_BITS_PER_DWORD 64
  45. #define PR_BITS_PER_BYTE_LOG2 3
  46. #define PR_BITS_PER_SHORT_LOG2 4
  47. #define PR_BITS_PER_INT_LOG2 5
  48. #define PR_BITS_PER_INT64_LOG2 6
  49. #define PR_BITS_PER_LONG_LOG2 6
  50. #define PR_BITS_PER_FLOAT_LOG2 5
  51. #define PR_BITS_PER_DOUBLE_LOG2 6
  52. #define PR_BITS_PER_WORD_LOG2 6
  53. #define PR_BITS_PER_DWORD_LOG2 6
  54. #define PR_ALIGN_OF_SHORT 2
  55. #define PR_ALIGN_OF_INT 4
  56. #define PR_ALIGN_OF_LONG 8
  57. #define PR_ALIGN_OF_INT64 8
  58. #define PR_ALIGN_OF_FLOAT 4
  59. #define PR_ALIGN_OF_DOUBLE 8
  60. #define PR_ALIGN_OF_POINTER 8
  61. #define PR_ALIGN_OF_WORD 8
  62. #define PR_ALIGN_OF_DWORD 8
  63. #else /* IS_64 */
  64. #define PR_BYTES_PER_BYTE 1
  65. #define PR_BYTES_PER_SHORT 2
  66. #define PR_BYTES_PER_INT 4
  67. #define PR_BYTES_PER_INT64 8
  68. #define PR_BYTES_PER_LONG 4
  69. #define PR_BYTES_PER_FLOAT 4
  70. #define PR_BYTES_PER_DOUBLE 8
  71. #define PR_BYTES_PER_WORD 4
  72. #define PR_BYTES_PER_DWORD 8
  73. #define PR_BYTES_PER_WORD_LOG2 2
  74. #define PR_BYTES_PER_DWORD_LOG2 3
  75. #define PR_BITS_PER_BYTE 8
  76. #define PR_BITS_PER_SHORT 16
  77. #define PR_BITS_PER_INT 32
  78. #define PR_BITS_PER_INT64 64
  79. #define PR_BITS_PER_LONG 32
  80. #define PR_BITS_PER_FLOAT 32
  81. #define PR_BITS_PER_DOUBLE 64
  82. #define PR_BITS_PER_WORD 32
  83. #define PR_BITS_PER_DWORD 64
  84. #define PR_BITS_PER_BYTE_LOG2 3
  85. #define PR_BITS_PER_SHORT_LOG2 4
  86. #define PR_BITS_PER_INT_LOG2 5
  87. #define PR_BITS_PER_INT64_LOG2 6
  88. #define PR_BITS_PER_LONG_LOG2 5
  89. #define PR_BITS_PER_FLOAT_LOG2 5
  90. #define PR_BITS_PER_DOUBLE_LOG2 6
  91. #define PR_BITS_PER_WORD_LOG2 5
  92. #define PR_ALIGN_OF_SHORT 2
  93. #define PR_ALIGN_OF_INT 4
  94. #define PR_ALIGN_OF_LONG 4
  95. #define PR_ALIGN_OF_INT64 4
  96. #define PR_ALIGN_OF_FLOAT 4
  97. #define PR_ALIGN_OF_DOUBLE 4
  98. #define PR_ALIGN_OF_POINTER 4
  99. #define PR_ALIGN_OF_WORD 4
  100. #endif /* IS_64 */
  101. #ifndef NO_NSPR_10_SUPPORT
  102. #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
  103. #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
  104. #define BYTES_PER_INT PR_BYTES_PER_INT
  105. #define BYTES_PER_INT64 PR_BYTES_PER_INT64
  106. #define BYTES_PER_LONG PR_BYTES_PER_LONG
  107. #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
  108. #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
  109. #define BYTES_PER_WORD PR_BYTES_PER_WORD
  110. #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
  111. #define BITS_PER_BYTE PR_BITS_PER_BYTE
  112. #define BITS_PER_SHORT PR_BITS_PER_SHORT
  113. #define BITS_PER_INT PR_BITS_PER_INT
  114. #define BITS_PER_INT64 PR_BITS_PER_INT64
  115. #define BITS_PER_LONG PR_BITS_PER_LONG
  116. #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
  117. #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
  118. #define BITS_PER_WORD PR_BITS_PER_WORD
  119. #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
  120. #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
  121. #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
  122. #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
  123. #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
  124. #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
  125. #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
  126. #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
  127. #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
  128. #define ALIGN_OF_INT PR_ALIGN_OF_INT
  129. #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
  130. #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
  131. #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
  132. #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
  133. #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
  134. #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
  135. #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
  136. #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
  137. #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
  138. #endif /* NO_NSPR_10_SUPPORT */
  139. #endif /* nspr_cpucfg___ */