Explicit 64-bit platform types
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2511 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+14
-16
@@ -38,15 +38,18 @@
|
|||||||
# include <inttypes.h>
|
# include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MACOS__)
|
#if defined(__arch64__) || defined(__alpha) || defined(__x86_64) \
|
||||||
|
|| defined(_M_IA64) || defined(_M_AMD64)
|
||||||
|
/* 64-bit platforms */
|
||||||
|
# define UQM_INT16 short
|
||||||
|
# define UQM_INT32 int
|
||||||
|
# define UQM_INT64 long
|
||||||
|
|
||||||
|
#elif defined(__MACOS__)
|
||||||
|
|
||||||
# define UQM_INT16 short
|
# define UQM_INT16 short
|
||||||
# define UQM_INT32 long
|
# define UQM_INT32 long
|
||||||
|
|
||||||
#elif defined (_WIN64) || defined(WIN64)
|
|
||||||
|
|
||||||
# error No Win64 support yet (see types.h)
|
|
||||||
|
|
||||||
/* Add your OS support here */
|
/* Add your OS support here */
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@@ -58,12 +61,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Figure out how to support 64-bit datatypes */
|
/* Figure out how to support 64-bit datatypes */
|
||||||
#if !defined(__STRICT_ANSI__)
|
#if !defined(UQM_INT64) && !defined(__STRICT_ANSI__)
|
||||||
#if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C)
|
# if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C)
|
||||||
# define UQM_INT64 long long
|
# define UQM_INT64 long long
|
||||||
#elif defined(_MSC_VER) || defined(__BORLANDC__)
|
# elif defined(_MSC_VER) || defined(__BORLANDC__)
|
||||||
# define UQM_INT64 __int64
|
# define UQM_INT64 __int64
|
||||||
#endif
|
# endif
|
||||||
#endif /* !__STRICT_ANSI__ */
|
#endif /* !__STRICT_ANSI__ */
|
||||||
|
|
||||||
/* The 64-bit type isn't available on EPOC/Symbian OS */
|
/* The 64-bit type isn't available on EPOC/Symbian OS */
|
||||||
@@ -106,11 +109,6 @@ typedef struct
|
|||||||
sint32 hi;
|
sint32 hi;
|
||||||
uint32 lo;
|
uint32 lo;
|
||||||
} sint64;
|
} sint64;
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int32 hi;
|
|
||||||
uint32 lo;
|
|
||||||
} int64;
|
|
||||||
|
|
||||||
#endif /* UQM_INT64 */
|
#endif /* UQM_INT64 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user