_solaris.cfg 4.8 KB

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