tif_config.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. #ifndef _TIF_CONFIG_H_
  2. #define _TIF_CONFIG_H_
  3. #ifdef _WIN32 // Windows
  4. #define PLATFORM(windows, unix) windows
  5. #else
  6. #define PLATFORM(windows, unix) unix
  7. #endif
  8. #if defined _WIN64 || defined __LP64__ // 64-bit platform
  9. #define X64 1
  10. #else
  11. #define X64 0
  12. #endif
  13. #ifndef _WIN32
  14. #include <stdint.h>
  15. #endif
  16. typedef PLATFORM( signed __int8 , int8_t) I8 , SByte; // Signed Int ( 8-bit) -128 .. 127
  17. typedef PLATFORM(unsigned __int8 , uint8_t) U8 , Byte; // Unsigned Int ( 8-bit) 0 .. 255
  18. typedef PLATFORM( signed __int16, int16_t) I16, Short; // Signed Int (16-bit) -32 768 .. 32 767
  19. typedef PLATFORM(unsigned __int16, uint16_t) U16, UShort; // Unsigned Int (16-bit) 0 .. 65 535
  20. typedef PLATFORM( signed __int32, int32_t) I32, Int; // Signed Int (32-bit) -2 147 483 648 .. 2 147 483 647
  21. typedef PLATFORM(unsigned __int32, uint32_t) U32, UInt; // Unsigned Int (32-bit) 0 .. 4 294 967 295
  22. typedef PLATFORM( signed __int64, int64_t) I64, Long; // Signed Int (64-bit) -9 223 372 036 854 775 808 .. 9 223 372 036 854 775 807
  23. typedef PLATFORM(unsigned __int64, uint64_t) U64, ULong; // Unsigned Int (64-bit) 0 .. 18 446 744 073 709 551 615
  24. #if X64
  25. typedef I64 IntPtr; // Signed Int capable of storing full memory address (needs to be 64-bit on 64-bit platforms)
  26. typedef U64 UIntPtr; // Unsigned Int capable of storing full memory address (needs to be 64-bit on 64-bit platforms)
  27. #else
  28. typedef I32 IntPtr; // Signed Int capable of storing full memory address (needs to be 32-bit on 32-bit platforms)
  29. typedef U32 UIntPtr; // Unsigned Int capable of storing full memory address (needs to be 32-bit on 32-bit platforms)
  30. #endif
  31. /* Define to 1 if you have the <assert.h> header file. */
  32. #define HAVE_ASSERT_H 1
  33. /* Define to 1 if you have the <fcntl.h> header file. */
  34. #define HAVE_FCNTL_H 1
  35. /* Define as 0 or 1 according to the floating point format suported by the
  36. machine */
  37. #define HAVE_IEEEFP 1
  38. /* Define to 1 if you have the `jbg_newlen' function. */
  39. #define HAVE_JBG_NEWLEN 1
  40. /* Define to 1 if you have the <string.h> header file. */
  41. #define HAVE_STRING_H 1
  42. /* Define to 1 if you have the <sys/types.h> header file. */
  43. #define HAVE_SYS_TYPES_H 1
  44. /* Define to 1 if you have the <io.h> header file. */
  45. //#define HAVE_IO_H 1 ESENTHEL CHANGED
  46. /* Define to 1 if you have the <search.h> header file. */
  47. #if !ANDROID // ESENTHEL CHANGED
  48. #define HAVE_SEARCH_H 1 // ESENTHEL CHANGED
  49. #endif
  50. /* Define to 1 if you have the `setmode' function. */
  51. #define HAVE_SETMODE 1
  52. /* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */
  53. #define HAVE_DECL_OPTARG 0
  54. /* The size of a `int', as computed by sizeof. */
  55. #define SIZEOF_INT sizeof(int)
  56. /* The size of a `long', as computed by sizeof. */
  57. #define SIZEOF_LONG sizeof(long)
  58. /* The size of `size_t', as computed by sizeof. */
  59. # define SIZEOF_SIZE_T sizeof(size_t)
  60. /* Signed 64-bit type formatter */
  61. #define TIFF_INT64_FORMAT "%I64d"
  62. /* Signed 64-bit type */
  63. #define TIFF_INT64_T I64
  64. /* Unsigned 64-bit type formatter */
  65. #define TIFF_UINT64_FORMAT "%I64u"
  66. /* Unsigned 64-bit type */
  67. #define TIFF_UINT64_T U64
  68. /* Pointer difference type */
  69. # define TIFF_PTRDIFF_T IntPtr
  70. /* Unsigned size type */
  71. # define TIFF_SIZE_T UIntPtr
  72. /* Signed size type */
  73. # define TIFF_SSIZE_T IntPtr
  74. #if X64
  75. /* Size type formatter */
  76. # define TIFF_SIZE_FORMAT TIFF_INT64_FORMAT
  77. /* Signed size type formatter */
  78. # define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT
  79. #else
  80. /* Size type formatter */
  81. # define TIFF_SIZE_FORMAT "%u"
  82. /* Signed size type formatter */
  83. # define TIFF_SSIZE_FORMAT "%d"
  84. #endif
  85. // ESENTHEL CHANGED
  86. #define HAVE_SNPRINTF
  87. #define HAVE__SNPRINTF
  88. #ifndef _WIN32
  89. #define HAVE_UNISTD_H 1
  90. #define HAVE_GETOPT 1
  91. #endif
  92. /* Set the native cpu bit order */
  93. #define HOST_FILLORDER FILLORDER_LSB2MSB
  94. /* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */
  95. #if defined(_MSC_VER) && _MSC_VER < 1900
  96. #define snprintf _snprintf
  97. #endif
  98. /* Define to 1 if your processor stores words with the most significant byte
  99. first (like Motorola and SPARC, unlike Intel and VAX). */
  100. /* #undef WORDS_BIGENDIAN */
  101. /* Define to `__inline__' or `__inline' if that's what the C compiler
  102. calls it, or to nothing if 'inline' is not supported under any name. */
  103. #ifndef __cplusplus
  104. # ifndef inline
  105. # define inline __inline
  106. # endif
  107. #endif
  108. #define lfind _lfind
  109. #pragma warning(disable : 4996) /* function deprecation warnings */
  110. #endif /* _TIF_CONFIG_H_ */
  111. /*
  112. * Local Variables:
  113. * mode: c
  114. * c-basic-offset: 8
  115. * fill-column: 78
  116. * End:
  117. */