- #if defined(_MSC_VER)
- /*
- * Compiler is MSVC.
- */
- #if _MSC_VER >= 1800
- /*
- * VS 2013 or newer; we have <inttypes.h>.
- */
- #include <inttypes.h>
- #else
- /*
- * Earlier VS; we have to define this stuff ourselves.
- */
- typedef unsigned char uint8_t;
- typedef signed char int8_t;
- typedef unsigned short uint16_t;
- typedef signed short int16_t;
- typedef unsigned int uint32_t;
- typedef signed int int32_t;
- #ifdef _MSC_EXTENSIONS
- typedef unsigned _int64 uint64_t;
- typedef _int64 int64_t;
- #else /* _MSC_EXTENSIONS */
- typedef unsigned long long uint64_t;
- typedef long long int64_t;
- #endif