1 /* 2 * This file is created to guarantee compatibility with MS Compiler 3 * 4 * Under GNU gcc, data types are defined based on their lenght, but under 5 * MSC, they don't exist, so here they are defined 6 * 7 * pt_stdint.h */ 8 #ifndef PT_STDINT__H 9 #define PT_STDINT__H 10 11 // define some int 12 #if defined _MSC_VER && _MSC_VER<1600 /* Microsoft Visual C++ */ 13 typedef signed char int8_t; 14 typedef short int int16_t; 15 typedef int int32_t; 16 typedef __int64 int64_t; 17 18 typedef unsigned char uint8_t; 19 typedef unsigned short int uint16_t; 20 typedef unsigned int uint32_t; 21 /* no uint64_t */ 22 23 #define INT32_MAX _I32_MAX 24 # else /* #ifdef _MSC_VER */ 25 #include <stdint.h> 26 #endif /* #ifdef _MSC_VER */ 27 28 #ifdef _MSC_VER 29 #if _MSC_VER < 1900 30 #define vsnprintf _vsnprintf 31 #define snprintf _snprintf 32 #endif 33 #ifdef _CPLUSPLUS 34 /* define if your compiler understands inline commands */ 35 #define INLINE _inline 36 #else 37 #define INLINE 38 #endif 39 # else /* #ifdef _MSC_VER */ 40 #ifndef INLINE 41 #define INLINE inline 42 #endif 43 #endif /* #ifdef _MSC_VER */ 44 45 #endif 46 47