_nto.cfg 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 NTO
  11. #define NTO
  12. #endif
  13. #define PR_AF_INET6 24 /* same as AF_INET6 */
  14. #ifdef __i386__
  15. #define IS_LITTLE_ENDIAN 1
  16. #undef IS_BIG_ENDIAN
  17. #define PR_BYTES_PER_BYTE 1L
  18. #define PR_BYTES_PER_SHORT 2L
  19. #define PR_BYTES_PER_INT 4L
  20. #define PR_BYTES_PER_INT64 8L
  21. #define PR_BYTES_PER_LONG 4L
  22. #define PR_BYTES_PER_FLOAT 4L
  23. #define PR_BYTES_PER_DOUBLE 8L
  24. #define PR_BYTES_PER_WORD 4L
  25. #define PR_BYTES_PER_DWORD 8L
  26. #define PR_BITS_PER_BYTE 8L
  27. #define PR_BITS_PER_SHORT 16L
  28. #define PR_BITS_PER_INT 32L
  29. #define PR_BITS_PER_INT64 64L
  30. #define PR_BITS_PER_LONG 32L
  31. #define PR_BITS_PER_FLOAT 32L
  32. #define PR_BITS_PER_DOUBLE 64L
  33. #define PR_BITS_PER_WORD 32L
  34. #define PR_BITS_PER_BYTE_LOG2 3L
  35. #define PR_BITS_PER_SHORT_LOG2 4L
  36. #define PR_BITS_PER_INT_LOG2 5L
  37. #define PR_BITS_PER_INT64_LOG2 6L
  38. #define PR_BITS_PER_LONG_LOG2 5L
  39. #define PR_BITS_PER_FLOAT_LOG2 5L
  40. #define PR_BITS_PER_DOUBLE_LOG2 6L
  41. #define PR_BITS_PER_WORD_LOG2 5L
  42. #define PR_ALIGN_OF_SHORT 2L
  43. #define PR_ALIGN_OF_INT 4L
  44. #define PR_ALIGN_OF_LONG 4L
  45. #define PR_ALIGN_OF_INT64 4L
  46. #define PR_ALIGN_OF_FLOAT 4L
  47. #define PR_ALIGN_OF_DOUBLE 4L
  48. #define PR_ALIGN_OF_POINTER 4L
  49. #define PR_ALIGN_OF_WORD 4L
  50. #define PR_BYTES_PER_WORD_LOG2 2L
  51. #define PR_BYTES_PER_DWORD_LOG2 3L
  52. #define PR_WORDS_PER_DWORD_LOG2 1L
  53. #else
  54. #error Undefined CPU Architecture
  55. #endif
  56. #ifndef HAVE_LONG_LONG
  57. #define HAVE_LONG_LONG
  58. #endif
  59. #ifndef NO_NSPR_10_SUPPORT
  60. #define BYTES_PER_BYTE PR_BYTES_PER_BYTE
  61. #define BYTES_PER_SHORT PR_BYTES_PER_SHORT
  62. #define BYTES_PER_INT PR_BYTES_PER_INT
  63. #define BYTES_PER_INT64 PR_BYTES_PER_INT64
  64. #define BYTES_PER_LONG PR_BYTES_PER_LONG
  65. #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
  66. #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
  67. #define BYTES_PER_WORD PR_BYTES_PER_WORD
  68. #define BYTES_PER_DWORD PR_BYTES_PER_DWORD
  69. #define BITS_PER_BYTE PR_BITS_PER_BYTE
  70. #define BITS_PER_SHORT PR_BITS_PER_SHORT
  71. #define BITS_PER_INT PR_BITS_PER_INT
  72. #define BITS_PER_INT64 PR_BITS_PER_INT64
  73. #define BITS_PER_LONG PR_BITS_PER_LONG
  74. #define BITS_PER_FLOAT PR_BITS_PER_FLOAT
  75. #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
  76. #define BITS_PER_WORD PR_BITS_PER_WORD
  77. #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
  78. #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
  79. #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
  80. #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
  81. #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
  82. #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
  83. #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
  84. #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
  85. #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
  86. #define ALIGN_OF_INT PR_ALIGN_OF_INT
  87. #define ALIGN_OF_LONG PR_ALIGN_OF_LONG
  88. #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
  89. #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
  90. #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
  91. #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
  92. #define ALIGN_OF_WORD PR_ALIGN_OF_WORD
  93. #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
  94. #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
  95. #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
  96. #endif /* NO_NSPR_10_SUPPORT */
  97. #endif /* nspr_cpucfg___ */