summaryrefslogtreecommitdiffhomepage
path: root/contrib/Opcode/Ice/IceTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/Opcode/Ice/IceTypes.h')
-rw-r--r--contrib/Opcode/Ice/IceTypes.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/contrib/Opcode/Ice/IceTypes.h b/contrib/Opcode/Ice/IceTypes.h
index 543be11..75104fa 100644
--- a/contrib/Opcode/Ice/IceTypes.h
+++ b/contrib/Opcode/Ice/IceTypes.h
@@ -12,6 +12,8 @@
#ifndef __ICETYPES_H__
#define __ICETYPES_H__
+#include <cstdint>
+
#define USE_HANDLE_MANAGER
// Constants
@@ -43,16 +45,16 @@
#define null 0 //!< our own NULL pointer
// Custom types used in ICE
- typedef signed char sbyte; //!< sizeof(sbyte) must be 1
- typedef unsigned char ubyte; //!< sizeof(ubyte) must be 1
- typedef signed short sword; //!< sizeof(sword) must be 2
- typedef unsigned short uword; //!< sizeof(uword) must be 2
- typedef signed int sdword; //!< sizeof(sdword) must be 4
- typedef unsigned int udword; //!< sizeof(udword) must be 4
- typedef signed __int64 sqword; //!< sizeof(sqword) must be 8
- typedef unsigned __int64 uqword; //!< sizeof(uqword) must be 8
- typedef float float32; //!< sizeof(float32) must be 4
- typedef double float64; //!< sizeof(float64) must be 4
+ typedef std::int8_t sbyte;
+ typedef std::uint8_t ubyte;
+ typedef std::int16_t sword;
+ typedef std::uint16_t uword;
+ typedef std::int32_t sdword;
+ typedef std::uint32_t udword;
+ typedef std::int64_t sqword;
+ typedef std::uint64_t uqword;
+ typedef float float32;
+ typedef double float64;
ICE_COMPILE_TIME_ASSERT(sizeof(bool)==1); // ...otherwise things might fail with VC++ 4.2 !
ICE_COMPILE_TIME_ASSERT(sizeof(ubyte)==1);
@@ -63,6 +65,8 @@
ICE_COMPILE_TIME_ASSERT(sizeof(sdword)==4);
ICE_COMPILE_TIME_ASSERT(sizeof(uqword)==8);
ICE_COMPILE_TIME_ASSERT(sizeof(sqword)==8);
+ ICE_COMPILE_TIME_ASSERT(sizeof(float32)==4);
+ ICE_COMPILE_TIME_ASSERT(sizeof(float64)==8);
//! TO BE DOCUMENTED
#define DECLARE_ICE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
@@ -122,6 +126,9 @@
#define IEEE_UNDERFLOW_LIMIT 0x1a000000
#define ONE_OVER_RAND_MAX (1.0f / float(RAND_MAX)) //!< Inverse of the max possible value returned by rand()
+ #ifndef WIN32
+ #define __stdcall
+ #endif
typedef int (__stdcall* PROC)(); //!< A standard procedure call.
typedef bool (*ENUMERATION)(udword value, udword param, udword context); //!< ICE standard enumeration call