config.h.in 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. /*
  2. * Ensure we have C99-style int64_t, etc, all defined.
  3. */
  4. /* First, we need to know if the system has already defined them. */
  5. #cmakedefine HAVE_INT16_T
  6. #cmakedefine HAVE_INT32_T
  7. #cmakedefine HAVE_INT64_T
  8. #cmakedefine HAVE_INTMAX_T
  9. #cmakedefine HAVE_UINT8_T
  10. #cmakedefine HAVE_UINT16_T
  11. #cmakedefine HAVE_UINT32_T
  12. #cmakedefine HAVE_UINT64_T
  13. #cmakedefine HAVE_UINTMAX_T
  14. /* We might have the types we want under other spellings. */
  15. #cmakedefine HAVE___INT64
  16. #cmakedefine HAVE_U_INT64_T
  17. #cmakedefine HAVE_UNSIGNED___INT64
  18. /* The sizes of various standard integer types. */
  19. @SIZE_OF_SHORT_CODE@
  20. @SIZE_OF_INT_CODE@
  21. @SIZE_OF_LONG_CODE@
  22. @SIZE_OF_LONG_LONG_CODE@
  23. @SIZE_OF_UNSIGNED_SHORT_CODE@
  24. @SIZE_OF_UNSIGNED_CODE@
  25. @SIZE_OF_UNSIGNED_LONG_CODE@
  26. @SIZE_OF_UNSIGNED_LONG_LONG_CODE@
  27. /*
  28. * If we lack int64_t, define it to the first of __int64, int, long, and long long
  29. * that exists and is the right size.
  30. */
  31. #if !defined(HAVE_INT64_T) && defined(HAVE___INT64)
  32. typedef __int64 int64_t;
  33. #define HAVE_INT64_T
  34. #endif
  35. #if !defined(HAVE_INT64_T) && SIZE_OF_INT == 8
  36. typedef int int64_t;
  37. #define HAVE_INT64_T
  38. #endif
  39. #if !defined(HAVE_INT64_T) && SIZE_OF_LONG == 8
  40. typedef long int64_t;
  41. #define HAVE_INT64_T
  42. #endif
  43. #if !defined(HAVE_INT64_T) && SIZE_OF_LONG_LONG == 8
  44. typedef long long int64_t;
  45. #define HAVE_INT64_T
  46. #endif
  47. #if !defined(HAVE_INT64_T)
  48. #error No 64-bit integer type was found.
  49. #endif
  50. /*
  51. * Similarly for int32_t
  52. */
  53. #if !defined(HAVE_INT32_T) && SIZE_OF_INT == 4
  54. typedef int int32_t;
  55. #define HAVE_INT32_T
  56. #endif
  57. #if !defined(HAVE_INT32_T) && SIZE_OF_LONG == 4
  58. typedef long int32_t;
  59. #define HAVE_INT32_T
  60. #endif
  61. #if !defined(HAVE_INT32_T)
  62. #error No 32-bit integer type was found.
  63. #endif
  64. /*
  65. * Similarly for int16_t
  66. */
  67. #if !defined(HAVE_INT16_T) && SIZE_OF_INT == 2
  68. typedef int int16_t;
  69. #define HAVE_INT16_T
  70. #endif
  71. #if !defined(HAVE_INT16_T) && SIZE_OF_SHORT == 2
  72. typedef short int16_t;
  73. #define HAVE_INT16_T
  74. #endif
  75. #if !defined(HAVE_INT16_T)
  76. #error No 16-bit integer type was found.
  77. #endif
  78. /*
  79. * Similarly for uint64_t
  80. */
  81. #if !defined(HAVE_UINT64_T) && defined(HAVE_UNSIGNED___INT64)
  82. typedef unsigned __int64 uint64_t;
  83. #define HAVE_UINT64_T
  84. #endif
  85. #if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED == 8
  86. typedef unsigned uint64_t;
  87. #define HAVE_UINT64_T
  88. #endif
  89. #if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG == 8
  90. typedef unsigned long uint64_t;
  91. #define HAVE_UINT64_T
  92. #endif
  93. #if !defined(HAVE_UINT64_T) && SIZE_OF_UNSIGNED_LONG_LONG == 8
  94. typedef unsigned long long uint64_t;
  95. #define HAVE_UINT64_T
  96. #endif
  97. #if !defined(HAVE_UINT64_T)
  98. #error No 64-bit unsigned integer type was found.
  99. #endif
  100. /*
  101. * Similarly for uint32_t
  102. */
  103. #if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED == 4
  104. typedef unsigned uint32_t;
  105. #define HAVE_UINT32_T
  106. #endif
  107. #if !defined(HAVE_UINT32_T) && SIZE_OF_UNSIGNED_LONG == 4
  108. typedef unsigned long uint32_t;
  109. #define HAVE_UINT32_T
  110. #endif
  111. #if !defined(HAVE_UINT32_T)
  112. #error No 32-bit unsigned integer type was found.
  113. #endif
  114. /*
  115. * Similarly for uint16_t
  116. */
  117. #if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED == 2
  118. typedef unsigned uint16_t;
  119. #define HAVE_UINT16_T
  120. #endif
  121. #if !defined(HAVE_UINT16_T) && SIZE_OF_UNSIGNED_SHORT == 2
  122. typedef unsigned short uint16_t;
  123. #define HAVE_UINT16_T
  124. #endif
  125. #if !defined(HAVE_UINT16_T)
  126. #error No 16-bit unsigned integer type was found.
  127. #endif
  128. /*
  129. * Similarly for uint8_t
  130. */
  131. #if !defined(HAVE_UINT8_T)
  132. typedef unsigned char uint8_t;
  133. #define HAVE_UINT8_T
  134. #endif
  135. #if !defined(HAVE_UINT16_T)
  136. #error No 8-bit unsigned integer type was found.
  137. #endif
  138. /* Define intmax_t and uintmax_t if they are not already defined. */
  139. #if !defined(HAVE_INTMAX_T)
  140. typedef int64_t intmax_t;
  141. #define INTMAX_MIN INT64_MIN
  142. #define INTMAX_MAX INT64_MAX
  143. #endif
  144. #if !defined(HAVE_UINTMAX_T)
  145. typedef uint64_t uintmax_t;
  146. #endif
  147. #cmakedefine uintptr_t @uintptr_t@
  148. #cmakedefine HAVE_RESTRICT
  149. #cmakedefine HAVE___RESTRICT
  150. #cmakedefine HAVE_INLINE
  151. #cmakedefine HAVE___INLINE
  152. #ifndef HAVE_RESTRICT
  153. # ifdef HAVE___RESTRICT
  154. # define restrict __restrict
  155. # else
  156. # define restrict
  157. # endif
  158. #endif /* HAVE_RESTRICT */
  159. #ifndef HAVE_INLINE
  160. # ifdef HAVE___INLINE
  161. # define inline __inline
  162. # else
  163. # define inline
  164. # endif
  165. #endif /* HAVE_INLINE */
  166. #cmakedefine WORDS_BIGENDIAN 1
  167. #cmakedefine HAVE_BYTESWAP_H 1
  168. #cmakedefine HAVE_BSWAP_16 1
  169. #cmakedefine HAVE_BSWAP_32 1
  170. #cmakedefine HAVE_BSWAP_64 1
  171. #define HAVE_CHECK_CRC32 1
  172. #define HAVE_CHECK_CRC64 1
  173. #define HAVE_CHECK_SHA256 1
  174. #define HAVE_DECODER_ARM 1
  175. #define HAVE_DECODER_ARMTHUMB 1
  176. #define HAVE_DECODER_DELTA 1
  177. #define HAVE_DECODER_IA64 1
  178. #define HAVE_DECODER_LZMA1 1
  179. #define HAVE_DECODER_LZMA2 1
  180. #define HAVE_DECODER_POWERPC 1
  181. #define HAVE_DECODER_SPARC 1
  182. #define HAVE_DECODER_X86 1
  183. #define HAVE_ENCODER_ARM 1
  184. #define HAVE_ENCODER_ARMTHUMB 1
  185. #define HAVE_ENCODER_DELTA 1
  186. #define HAVE_ENCODER_IA64 1
  187. #define HAVE_ENCODER_LZMA1 1
  188. #define HAVE_ENCODER_LZMA2 1
  189. #define HAVE_ENCODER_POWERPC 1
  190. #define HAVE_ENCODER_SPARC 1
  191. #define HAVE_ENCODER_X86 1
  192. #define HAVE_MF_BT2 1
  193. #define HAVE_MF_BT3 1
  194. #define HAVE_MF_BT4 1
  195. #define HAVE_MF_HC3 1
  196. #define HAVE_MF_HC4 1
  197. /* Define to 1 if you have the <inttypes.h> header file. */
  198. #cmakedefine HAVE_INTTYPES_H 1
  199. /* Define to 1 if you have the <limits.h> header file. */
  200. #cmakedefine HAVE_LIMITS_H 1
  201. /* Define to 1 if you have the <memory.h> header file. */
  202. #cmakedefine HAVE_MEMORY_H 1
  203. /* Define to 1 if stdbool.h conforms to C99. */
  204. #cmakedefine HAVE_STDBOOL_H 1
  205. /* Define to 1 if you have the <stdint.h> header file. */
  206. #cmakedefine HAVE_STDINT_H 1
  207. /* Define to 1 if you have the <strings.h> header file. */
  208. #cmakedefine HAVE_STRINGS_H 1
  209. /* Define to 1 if you have the <string.h> header file. */
  210. #cmakedefine HAVE_STRING_H 1
  211. /* Define to 1 if you have the <sys/byteorder.h> header file. */
  212. #cmakedefine HAVE_SYS_BYTEORDER_H 1
  213. /* Define to 1 if you have the <sys/endian.h> header file. */
  214. #cmakedefine HAVE_SYS_ENDIAN_H 1
  215. /* Define to 1 or 0, depending whether the compiler supports simple visibility
  216. declarations. */
  217. #cmakedefine HAVE_VISIBILITY 1
  218. /* Define to 1 if the system has the type `_Bool'. */
  219. #cmakedefine HAVE__BOOL 1
  220. /* The size of `size_t', as computed by sizeof. */
  221. #cmakedefine SIZEOF_SIZE_T @SIZEOF_SIZE_T@
  222. /* Define to 1 if the system supports fast unaligned access to 16-bit and
  223. 32-bit integers. */
  224. #define TUKLIB_FAST_UNALIGNED_ACCESS 1