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