Commit 1c43d27c authored by hybrid's avatar hybrid

Copy s64 type to unsigned u64 counterpart. Add borland checks as suggested by Ethon

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4137 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ef6296a5
...@@ -12,7 +12,7 @@ namespace irr ...@@ -12,7 +12,7 @@ namespace irr
//! 8 bit unsigned variable. //! 8 bit unsigned variable.
/** This is a typedef for unsigned char, it ensures portability of the engine. */ /** This is a typedef for unsigned char, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef unsigned __int8 u8; typedef unsigned __int8 u8;
#else #else
typedef unsigned char u8; typedef unsigned char u8;
...@@ -20,7 +20,7 @@ typedef unsigned char u8; ...@@ -20,7 +20,7 @@ typedef unsigned char u8;
//! 8 bit signed variable. //! 8 bit signed variable.
/** This is a typedef for signed char, it ensures portability of the engine. */ /** This is a typedef for signed char, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef __int8 s8; typedef __int8 s8;
#else #else
typedef signed char s8; typedef signed char s8;
...@@ -34,7 +34,7 @@ typedef char c8; ...@@ -34,7 +34,7 @@ typedef char c8;
//! 16 bit unsigned variable. //! 16 bit unsigned variable.
/** This is a typedef for unsigned short, it ensures portability of the engine. */ /** This is a typedef for unsigned short, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef unsigned __int16 u16; typedef unsigned __int16 u16;
#else #else
typedef unsigned short u16; typedef unsigned short u16;
...@@ -42,7 +42,7 @@ typedef unsigned short u16; ...@@ -42,7 +42,7 @@ typedef unsigned short u16;
//! 16 bit signed variable. //! 16 bit signed variable.
/** This is a typedef for signed short, it ensures portability of the engine. */ /** This is a typedef for signed short, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef __int16 s16; typedef __int16 s16;
#else #else
typedef signed short s16; typedef signed short s16;
...@@ -52,7 +52,7 @@ typedef signed short s16; ...@@ -52,7 +52,7 @@ typedef signed short s16;
//! 32 bit unsigned variable. //! 32 bit unsigned variable.
/** This is a typedef for unsigned int, it ensures portability of the engine. */ /** This is a typedef for unsigned int, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef unsigned __int32 u32; typedef unsigned __int32 u32;
#else #else
typedef unsigned int u32; typedef unsigned int u32;
...@@ -60,7 +60,7 @@ typedef unsigned int u32; ...@@ -60,7 +60,7 @@ typedef unsigned int u32;
//! 32 bit signed variable. //! 32 bit signed variable.
/** This is a typedef for signed int, it ensures portability of the engine. */ /** This is a typedef for signed int, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef __int32 s32; typedef __int32 s32;
#else #else
typedef signed int s32; typedef signed int s32;
...@@ -68,15 +68,29 @@ typedef signed int s32; ...@@ -68,15 +68,29 @@ typedef signed int s32;
#ifdef __IRR_HAS_S64 #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 __GNUC__
#if __WORDSIZE == 64
typedef unsigned long int u64;
#else
__extension__ typedef unsigned long long u64;
#endif
#else
typedef unsigned long long u64;
#endif
//! 64 bit signed variable. //! 64 bit signed variable.
/** This is a typedef for __int64, it ensures portability of the engine. */ /** This is a typedef for 64bit int, it ensures portability of the engine. */
#ifdef _MSC_VER #if defined(_MSC_VER) || ((__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__))
typedef __int64 s64; typedef __int64 s64;
#elif __GNUC__ #elif __GNUC__
#if __WORDSIZE == 64 #if __WORDSIZE == 64
typedef long int s64; typedef long int s64;
#else #else
__extension__ typedef long long s64; __extension__ typedef long long s64;
#endif #endif
#else #else
typedef long long s64; typedef long long s64;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment