ustd.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* ustd.h common macros and includes */
  2. #ifndef LIBRHASH_USTD_H
  3. #define LIBRHASH_USTD_H
  4. /* Include KWSys Large File Support configuration. */
  5. #include <cmsys/Configure.h>
  6. #if defined(_MSC_VER)
  7. # pragma warning(push,1)
  8. #endif
  9. #include <cm3p/kwiml/int.h>
  10. #ifndef KWIML_INT_HAVE_INT64_T
  11. # define int64_t KWIML_INT_int64_t
  12. #endif
  13. #ifndef KWIML_INT_HAVE_INT32_T
  14. # define int32_t KWIML_INT_int32_t
  15. #endif
  16. #ifndef KWIML_INT_HAVE_INT16_T
  17. # define int16_t KWIML_INT_int16_t
  18. #endif
  19. #ifndef KWIML_INT_HAVE_INT8_T
  20. # define int8_t KWIML_INT_int8_t
  21. #endif
  22. #ifndef KWIML_INT_HAVE_UINT64_T
  23. # define uint64_t KWIML_INT_uint64_t
  24. #endif
  25. #ifndef KWIML_INT_HAVE_UINT32_T
  26. # define uint32_t KWIML_INT_uint32_t
  27. #endif
  28. #ifndef KWIML_INT_HAVE_UINT16_T
  29. # define uint16_t KWIML_INT_uint16_t
  30. #endif
  31. #ifndef KWIML_INT_HAVE_UINT8_T
  32. # define uint8_t KWIML_INT_uint8_t
  33. #endif
  34. #include <stddef.h>
  35. #if 0
  36. #if _MSC_VER > 1000
  37. # include <stddef.h> /* size_t for vc6.0 */
  38. # if _MSC_VER >= 1600
  39. /* Visual Studio >= 2010 has stdint.h */
  40. # include <stdint.h>
  41. # else
  42. /* vc6.0 has bug with __int8, so using char instead */
  43. typedef signed char int8_t;
  44. typedef signed __int16 int16_t;
  45. typedef signed __int32 int32_t;
  46. typedef signed __int64 int64_t;
  47. typedef unsigned char uint8_t;
  48. typedef unsigned __int16 uint16_t;
  49. typedef unsigned __int32 uint32_t;
  50. typedef unsigned __int64 uint64_t;
  51. # endif /* _MSC_VER >= 1600 */
  52. /* disable warnings: The POSIX name for this item is deprecated. Use the ISO C++ conformant name. */
  53. # pragma warning(disable : 4996)
  54. #else /* _MSC_VER > 1000 */
  55. # include <stdint.h>
  56. # include <unistd.h>
  57. #endif /* _MSC_VER > 1000 */
  58. #endif
  59. #endif /* LIBRHASH_USTD_H */