Fixed MSVC internal additional typedefs
This commit is contained in:
parent
b10f525ba9
commit
b11d880f41
@ -34,6 +34,7 @@
|
||||
#include <gcmpall.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include <limits.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
@ -107,12 +108,24 @@
|
||||
// Supplements for the built-in types
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if (UCHAR_MAX == 0xFF)
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
#else
|
||||
#error Don't know how to define 8 bit integers
|
||||
#endif
|
||||
#if (USHRT_MAX == 0xFFFF)
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 16 bit integers
|
||||
#endif
|
||||
#if (UINT_MAX == 0xFFFFFFFF)
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 32 bit integers
|
||||
#endif
|
||||
|
||||
typedef int8_t sbyte;
|
||||
typedef uint8_t byte;
|
||||
@ -128,7 +141,7 @@ typedef int32_t sdword;
|
||||
typedef uint32_t dword;
|
||||
typedef int32_t slong;
|
||||
typedef uint32_t ulong;
|
||||
#endif
|
||||
#endif //#ifdef _MSC_VER
|
||||
|
||||
typedef uint8_t bit;
|
||||
|
||||
|
@ -6,13 +6,26 @@
|
||||
#ifndef __goldall_h
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if (UCHAR_MAX == 0xFF)
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
#else
|
||||
#error Don't know how to define 8 bit integers
|
||||
#endif
|
||||
#if (USHRT_MAX == 0xFFFF)
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 16 bit integers
|
||||
#endif
|
||||
#if (UINT_MAX == 0xFFFFFFFF)
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 32 bit integers
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include <stdint.h>
|
||||
|
@ -43,13 +43,26 @@
|
||||
#ifndef __goldall_h
|
||||
#ifdef _MSC_VER
|
||||
#include <windows.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if (UCHAR_MAX == 0xFF)
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
#else
|
||||
#error Don't know how to define 8 bit integers
|
||||
#endif
|
||||
#if (USHRT_MAX == 0xFFFF)
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed long int32_t;
|
||||
typedef unsigned long uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 16 bit integers
|
||||
#endif
|
||||
#if (UINT_MAX == 0xFFFFFFFF)
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
#else
|
||||
#error Don't know how to define 32 bit integers
|
||||
#endif
|
||||
|
||||
#else
|
||||
#include <stdint.h>
|
||||
|
Reference in New Issue
Block a user