forked from Mirrorlandia_minetest/irrlicht
irrTypes.h: use standard header for number types
This commit is contained in:
parent
c4503eaf17
commit
32a45f8239
@ -6,29 +6,16 @@
|
||||
#define __IRR_TYPES_H_INCLUDED__
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#include <limits.h> // for __WORDSIZE
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
//! 8 bit unsigned variable.
|
||||
/** This is a typedef for unsigned char, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef unsigned __int8 u8;
|
||||
#else
|
||||
typedef unsigned char u8;
|
||||
#endif
|
||||
typedef uint8_t u8;
|
||||
|
||||
//! 8 bit signed variable.
|
||||
/** This is a typedef for signed char, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef __int8 s8;
|
||||
#else
|
||||
typedef signed char s8;
|
||||
#endif
|
||||
typedef int8_t s8;
|
||||
|
||||
//! 8 bit character variable.
|
||||
/** This is a typedef for char, it ensures portability of the engine. */
|
||||
@ -37,68 +24,26 @@ typedef char c8;
|
||||
|
||||
|
||||
//! 16 bit unsigned variable.
|
||||
/** This is a typedef for unsigned short, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef unsigned __int16 u16;
|
||||
#else
|
||||
typedef unsigned short u16;
|
||||
#endif
|
||||
typedef uint16_t u16;
|
||||
|
||||
//! 16 bit signed variable.
|
||||
/** This is a typedef for signed short, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef __int16 s16;
|
||||
#else
|
||||
typedef signed short s16;
|
||||
#endif
|
||||
typedef int16_t s16;
|
||||
|
||||
|
||||
|
||||
//! 32 bit unsigned variable.
|
||||
/** This is a typedef for unsigned int, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef unsigned __int32 u32;
|
||||
#else
|
||||
typedef unsigned int u32;
|
||||
#endif
|
||||
typedef uint32_t u32;
|
||||
|
||||
//! 32 bit signed variable.
|
||||
/** This is a typedef for signed int, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef __int32 s32;
|
||||
#else
|
||||
typedef signed int s32;
|
||||
#endif
|
||||
typedef int32_t s32;
|
||||
|
||||
|
||||
#ifdef __IRR_HAS_S64
|
||||
//! 64 bit unsigned variable.
|
||||
/** This is a typedef for 64bit uint, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef unsigned __int64 u64;
|
||||
#elif defined(__GNUC__)
|
||||
#if defined(__WORDSIZE) && __WORDSIZE == 64
|
||||
typedef unsigned long int u64;
|
||||
#else
|
||||
__extension__ typedef unsigned long long u64;
|
||||
#endif
|
||||
#else
|
||||
typedef unsigned long long u64;
|
||||
#endif
|
||||
typedef uint64_t u64;
|
||||
|
||||
//! 64 bit signed variable.
|
||||
/** This is a typedef for 64bit int, it ensures portability of the engine. */
|
||||
#if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
|
||||
typedef __int64 s64;
|
||||
#elif defined(__GNUC__)
|
||||
#if defined(__WORDSIZE) && __WORDSIZE == 64
|
||||
typedef long int s64;
|
||||
#else
|
||||
__extension__ typedef long long s64;
|
||||
#endif
|
||||
#else
|
||||
typedef long long s64;
|
||||
#endif
|
||||
typedef int64_t s64;
|
||||
#endif // __IRR_HAS_S64
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user