Updating processor bindings to not use stdint.h.  Also added code to verify at compile time that data widths are correct.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10232 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 2a55dd2..98fdca3 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -28,6 +28,25 @@
 #include <ProcessorBind.h>

 

 //

+// Verify that ProcessorBind.h produced UEFI Data Types that are compliant with 

+// Section 2.3.1 of the UEFI 2.3 Specification.  Generates a divide by zero 

+// error or a zero size array declaration in the preprocessor if the size is 

+// incorrect.  These are declared as "extern" so the space for these arrays will 

+// not be in the modules.

+//

+extern UINT8 _VerifySizeOfBoolean [(sizeof(BOOLEAN) == 1) / (sizeof(BOOLEAN) == 1)];

+extern UINT8 _VerifySizeOfInt8    [(sizeof(INT8)    == 1) / (sizeof(INT8)    == 1)];

+extern UINT8 _VerifySizeOfUint8   [(sizeof(UINT8)   == 1) / (sizeof(UINT8)   == 1)];

+extern UINT8 _VerifySizeOfInt16   [(sizeof(INT16)   == 2) / (sizeof(INT16)   == 2)];

+extern UINT8 _VerifySizeOfUint16  [(sizeof(UINT16)  == 2) / (sizeof(UINT16)  == 2)];

+extern UINT8 _VerifySizeOfInt32   [(sizeof(INT32)   == 4) / (sizeof(INT32)   == 4)];

+extern UINT8 _VerifySizeOfUint32  [(sizeof(UINT32)  == 4) / (sizeof(UINT32)  == 4)];

+extern UINT8 _VerifySizeOfInt64   [(sizeof(INT64)   == 8) / (sizeof(INT64)   == 8)];

+extern UINT8 _VerifySizeOfUint64  [(sizeof(UINT64)  == 8) / (sizeof(UINT64)  == 8)];

+extern UINT8 _VerifySizeOfChar8   [(sizeof(CHAR8)   == 1) / (sizeof(CHAR8)   == 1)];

+extern UINT8 _VerifySizeOfChar16  [(sizeof(CHAR16)  == 2) / (sizeof(CHAR16)  == 2)];

+

+//

 // The Microsoft* C compiler can removed references to unreferenced data items

 //  if the /OPT:REF linker option is used. We defined a macro as this is a 

 //  a non standard extension

diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h
index 4e1d585..0ffb2ee 100644
--- a/MdePkg/Include/Ia32/ProcessorBind.h
+++ b/MdePkg/Include/Ia32/ProcessorBind.h
@@ -96,170 +96,105 @@
 #endif

 

 

-#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)

+#if defined(_MSC_EXTENSIONS)

+

   //

-  // No ANSI C 2000 stdint.h integer width declarations, so define equivalents

+  // use Microsoft C complier dependent integer width types 

   //

- 

-  #if defined(_MSC_EXTENSIONS)

 

-    //

-    // use Microsoft C complier dependent integer width types 

-    //

-

-    ///

-    /// 8-byte unsigned value

-    ///

-    typedef unsigned __int64    UINT64;

-    ///

-    /// 8-byte signed value

-    ///

-    typedef __int64             INT64;

-    ///

-    /// 4-byte unsigned value

-    ///

-    typedef unsigned __int32    UINT32;

-    ///

-    /// 4-byte signed value

-    ///

-    typedef __int32             INT32;

-    ///

-    /// 2-byte unsigned value

-    ///

-    typedef unsigned short      UINT16;

-    ///

-    /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-    /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-    ///

-    typedef unsigned short      CHAR16;

-    ///

-    /// 2-byte signed value

-    ///

-    typedef short               INT16;

-    ///

-    /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-    /// values are undefined.

-    ///

-    typedef unsigned char       BOOLEAN;

-    ///

-    /// 1-byte unsigned value

-    ///

-    typedef unsigned char       UINT8;

-    ///

-    /// 1-byte Character

-    ///

-    typedef char                CHAR8;

-    ///

-    /// 1-byte signed value

-    ///

-    typedef char                INT8;

-  #else

-

-    //

-    // Assume standard IA-32 alignment. 

-    // Need to check portability of long long

-    //

-

-    ///

-    /// 8-byte unsigned value

-    ///

-    typedef unsigned long long  UINT64;

-    ///

-    /// 8-byte signed value

-    ///

-    typedef long long           INT64;

-    ///

-    /// 4-byte unsigned value

-    ///

-    typedef unsigned int        UINT32;

-    ///

-    /// 4-byte signed value

-    ///

-    typedef int                 INT32;

-    ///

-    /// 2-byte unsigned value

-    ///

-    typedef unsigned short      UINT16;

-    ///

-    /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-    /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-    ///

-    typedef unsigned short      CHAR16;

-    ///

-    /// 2-byte signed value

-    ///

-    typedef short               INT16;

-    ///

-    /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-    /// values are undefined.

-    ///

-    typedef unsigned char       BOOLEAN;

-    ///

-    /// 1-byte unsigned value

-    ///

-    typedef unsigned char       UINT8;

-    ///

-    /// 1-byte Character

-    ///

-    typedef char                CHAR8;

-    ///

-    /// 1-byte signed value

-    ///

-    typedef char                INT8;

-  #endif

-#else

-  //

-  // Use ANSI C 2000 stdint.h integer width declarations

-  //

-  #include <stdint.h>

-

-  ///

-  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-  /// values are undefined.

-  ///

-  typedef uint8_t   BOOLEAN;

-  ///

-  /// 1-byte signed value

-  ///

-  typedef int8_t    INT8;

-  ///

-  /// 1-byte unsigned value

-  ///

-  typedef uint8_t   UINT8;

-  ///

-  /// 2-byte signed value

-  ///

-  typedef int16_t   INT16;

-  ///

-  /// 2-byte unsigned value

-  ///

-  typedef uint16_t  UINT16;

-  ///

-  /// 4-byte signed value

-  ///

-  typedef int32_t   INT32;

-  ///

-  /// 4-byte unsigned value

-  ///

-  typedef uint32_t  UINT32;

-  ///

-  /// 8-byte signed value

-  ///

-  typedef int64_t   INT64;

   ///

   /// 8-byte unsigned value

   ///

-  typedef uint64_t  UINT64;

+  typedef unsigned __int64    UINT64;

   ///

-  /// 1-byte Character

+  /// 8-byte signed value

   ///

-  typedef char      CHAR8;

+  typedef __int64             INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned __int32    UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef __int32             INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

   ///

   /// 2-byte Character.  Unless otherwise specified all strings are stored in the

   /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

   ///

-  typedef uint16_t  CHAR16;

-

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

+#else  

+  ///

+  /// 8-byte unsigned value

+  ///

+  typedef unsigned long long  UINT64;

+  ///

+  /// 8-byte signed value

+  ///

+  typedef long long           INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned int        UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef int                 INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

+  ///

+  /// 2-byte Character.  Unless otherwise specified all strings are stored in the

+  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

+  ///

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

 #endif

 

 ///

diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h
index e369b6e..c45df0d 100644
--- a/MdePkg/Include/Ipf/ProcessorBind.h
+++ b/MdePkg/Include/Ipf/ProcessorBind.h
@@ -106,221 +106,104 @@
 

 #endif

 

-

-#if !defined (__STDC_VERSION__) || (__STDC_VERSION__) < 199901L

+#if defined(_MSC_EXTENSIONS)

   //

-  // No ANSI C 2000 stdint.h integer width declarations, so define equivalents

+  // use Microsoft C compiler dependent integer width types

   //

 

-  #if defined(_MSC_EXTENSIONS)

-    //

-    // use Microsoft C compiler dependent integer width types

-    //

-

-    ///

-    /// 8-byte unsigned value

-    ///

-    typedef unsigned __int64    UINT64;

-    ///

-    /// 8-byte signed value

-    ///

-    typedef __int64             INT64;

-    ///

-    /// 4-byte unsigned value

-    ///

-    typedef unsigned __int32    UINT32;

-    ///

-    /// 4-byte signed value

-    ///

-    typedef __int32             INT32;

-    ///

-    /// 2-byte unsigned value

-    ///

-    typedef unsigned short      UINT16;

-    ///

-    /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-    /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-    ///

-    typedef unsigned short      CHAR16;

-    ///

-    /// 2-byte signed value

-    ///

-    typedef short               INT16;

-    ///

-    /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-    /// values are undefined.

-    ///

-    typedef unsigned char       BOOLEAN;

-    ///

-    /// 1-byte unsigned value

-    ///

-    typedef unsigned char       UINT8;

-    ///

-    /// 1-byte Character

-    ///

-    typedef char                CHAR8;

-    ///

-    /// 1-byte signed value

-    ///

-    typedef char                INT8;

-  #else

-    #if defined(_EFI_P64)

-      //

-      // P64 - pointers being 64-bit and longs and ints are 32-bits.

-      //

-

-      ///

-      /// 8-byte unsigned value

-      ///

-      typedef unsigned long long  UINT64;

-      ///

-      /// 8-byte signed value

-      ///

-      typedef long long           INT64;

-      ///

-      /// 4-byte unsigned value

-      ///

-      typedef unsigned int        UINT32;

-      ///

-      /// 4-byte signed value

-      ///

-      typedef int                 INT32;

-      ///

-      /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-      /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-      ///

-      typedef unsigned short      CHAR16;

-      ///

-      /// 2-byte unsigned value

-      ///

-      typedef unsigned short      UINT16;

-      ///

-      /// 2-byte signed value

-      ///

-      typedef short               INT16;

-      ///

-      /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-      /// values are undefined.

-      ///

-      typedef unsigned char       BOOLEAN;

-      ///

-      /// 1-byte unsigned value

-      ///

-      typedef unsigned char       UINT8;

-      ///

-      /// 1-byte Character

-      ///

-      typedef char                CHAR8;

-      ///

-      /// 1-byte signed value

-      ///

-      typedef char                INT8;

-    #else

-      //

-      // Assume LP64 - longs and pointers are 64-bit. Ints are 32-bit.

-      //

-

-      ///

-      /// 8-byte unsigned value

-      ///

-      typedef unsigned long   UINT64;

-      ///

-      /// 8-byte signed value

-      ///

-      typedef long            INT64;

-      ///

-      /// 4-byte unsigned value

-      ///

-      typedef unsigned int    UINT32;

-      ///

-      /// 4-byte signed value

-      ///

-      typedef int             INT32;

-      ///

-      /// 2-byte unsigned value

-      ///

-      typedef unsigned short  UINT16;

-      ///

-      /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-      /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-      ///

-      typedef unsigned short  CHAR16;

-      ///

-      /// 2-byte signed value

-      ///

-      typedef short           INT16;

-      ///

-      /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-      /// values are undefined.

-      ///

-      typedef unsigned char   BOOLEAN;

-      ///

-      /// 1-byte unsigned value

-      ///

-      typedef unsigned char   UINT8;

-      ///

-      /// 1-byte Character

-      ///

-      typedef char            CHAR8;

-      ///

-      /// 1-byte signed value

-      ///

-      typedef char            INT8;

-    #endif

-  #endif

-#else

-  //

-  // Use ANSI C 2000 stdint.h integer width declarations

-  //

-  #include <stdint.h>

-

-  ///

-  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-  /// values are undefined.

-  ///

-  typedef uint8_t   BOOLEAN;

-  ///

-  /// 1-byte signed value

-  ///

-  typedef int8_t    INT8;

-  ///

-  /// 1-byte unsigned value

-  ///

-  typedef uint8_t   UINT8;

-  ///

-  /// 2-byte signed value

-  ///

-  typedef int16_t   INT16;

-  ///

-  /// 2-byte unsigned value

-  ///

-  typedef uint16_t  UINT16;

-  ///

-  /// 4-byte signed value

-  ///

-  typedef int32_t   INT32;

-  ///

-  /// 4-byte unsigned value

-  ///

-  typedef uint32_t  UINT32;

-  ///

-  /// 8-byte signed value

-  ///

-  typedef int64_t   INT64;

   ///

   /// 8-byte unsigned value

   ///

-  typedef uint64_t  UINT64;

+  typedef unsigned __int64    UINT64;

   ///

-  /// 1-byte Character

+  /// 8-byte signed value

   ///

-  typedef char      CHAR8;

+  typedef __int64             INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned __int32    UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef __int32             INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

   ///

   /// 2-byte Character.  Unless otherwise specified all strings are stored in the

   /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

   ///

-  typedef uint16_t  CHAR16;

-

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

+#else

+  ///

+  /// 8-byte unsigned value

+  ///

+  typedef unsigned long long  UINT64;

+  ///

+  /// 8-byte signed value

+  ///

+  typedef long long           INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned int        UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef int                 INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

+  ///

+  /// 2-byte Character.  Unless otherwise specified all strings are stored in the

+  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

+  ///

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

 #endif

 

 ///

diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h
index 2512ff1..b22d654 100644
--- a/MdePkg/Include/X64/ProcessorBind.h
+++ b/MdePkg/Include/X64/ProcessorBind.h
@@ -97,220 +97,104 @@
 #endif

 

 

-#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)

+#if defined(_MSC_EXTENSIONS)

   //

-  // No ANSI C 2000 stdint.h integer width declarations, so define equivalents

+  // use Microsoft C complier dependent integer width types 

   //

- 

-  #if defined(_MSC_EXTENSIONS)

-    //

-    // use Microsoft C complier dependent integer width types 

-    //

 

-    ///

-    /// 8-byte unsigned value

-    ///

-    typedef unsigned __int64    UINT64;

-    ///

-    /// 8-byte signed value

-    ///

-    typedef __int64             INT64;

-    ///

-    /// 4-byte unsigned value

-    ///

-    typedef unsigned __int32    UINT32;

-    ///

-    /// 4-byte signed value

-    ///

-    typedef __int32             INT32;

-    ///

-    /// 2-byte unsigned value

-    ///

-    typedef unsigned short      UINT16;

-    ///

-    /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-    /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-    ///

-    typedef unsigned short      CHAR16;

-    ///

-    /// 2-byte signed value

-    ///

-    typedef short               INT16;

-    ///

-    /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-    /// values are undefined.

-    ///

-    typedef unsigned char       BOOLEAN;

-    ///

-    /// 1-byte unsigned value

-    ///

-    typedef unsigned char       UINT8;

-    ///

-    /// 1-byte Character

-    ///

-    typedef char                CHAR8;

-    ///

-    /// 1-byte signed value

-    ///

-    typedef char                INT8;

-  #else

-    #if defined(_EFI_P64)

-      //

-      // P64 - pointers being 64-bit and longs and ints are 32-bits.

-      //

-

-      ///

-      /// 8-byte unsigned value

-      ///

-      typedef unsigned long long  UINT64;

-      ///

-      /// 8-byte signed value

-      ///

-      typedef long long           INT64;

-      ///

-      /// 4-byte unsigned value

-      ///

-      typedef unsigned int        UINT32;

-      ///

-      /// 4-byte signed value

-      ///

-      typedef int                 INT32;

-      ///

-      /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-      /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-      ///

-      typedef unsigned short      CHAR16;

-      ///

-      /// 2-byte unsigned value

-      ///

-      typedef unsigned short      UINT16;

-      ///

-      /// 2-byte signed value

-      ///

-      typedef short               INT16;

-      ///

-      /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-      /// values are undefined.

-      ///

-      typedef unsigned char       BOOLEAN;

-      ///

-      /// 1-byte unsigned value

-      ///

-      typedef unsigned char       UINT8;

-      ///

-      /// 1-byte Character

-      ///

-      typedef char                CHAR8;

-      ///

-      /// 1-byte signed value

-      ///

-      typedef char                INT8;

-    #else

-      //

-      // Assume LP64 - longs and pointers are 64-bit. Ints are 32-bit.

-      //

-

-      ///

-      /// 8-byte unsigned value

-      ///

-      typedef unsigned long   UINT64;

-      ///

-      /// 8-byte signed value

-      ///

-      typedef long            INT64;

-      ///

-      /// 4-byte unsigned value

-      ///

-      typedef unsigned int    UINT32;

-      ///

-      /// 4-byte signed value

-      ///

-      typedef int             INT32;

-      ///

-      /// 2-byte unsigned value

-      ///

-      typedef unsigned short  UINT16;

-      ///

-      /// 2-byte Character.  Unless otherwise specified all strings are stored in the

-      /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

-      ///

-      typedef unsigned short  CHAR16;

-      ///

-      /// 2-byte signed value

-      ///

-      typedef short           INT16;

-      ///

-      /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-      /// values are undefined.

-      ///

-      typedef unsigned char   BOOLEAN;

-      ///

-      /// 1-byte unsigned value

-      ///

-      typedef unsigned char   UINT8;

-      ///

-      /// 1-byte Character

-      ///

-      typedef char            CHAR8;

-      ///

-      /// 1-byte signed value

-      ///

-      typedef char            INT8;

-    #endif

-  #endif

-#else

-  //

-  // Use ANSI C 2000 stdint.h integer width declarations

-  //

-  #include <stdint.h>

-

-  ///

-  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

-  /// values are undefined.

-  ///

-  typedef uint8_t   BOOLEAN;

-  ///

-  /// 1-byte signed value

-  ///

-  typedef int8_t    INT8;

-  ///

-  /// 1-byte unsigned value

-  ///

-  typedef uint8_t   UINT8;

-  ///

-  /// 2-byte signed value

-  ///

-  typedef int16_t   INT16;

-  ///

-  /// 2-byte unsigned value

-  ///

-  typedef uint16_t  UINT16;

-  ///

-  /// 4-byte signed value

-  ///

-  typedef int32_t   INT32;

-  ///

-  /// 4-byte unsigned value

-  ///

-  typedef uint32_t  UINT32;

-  ///

-  /// 8-byte signed value

-  ///

-  typedef int64_t   INT64;

   ///

   /// 8-byte unsigned value

   ///

-  typedef uint64_t  UINT64;

+  typedef unsigned __int64    UINT64;

   ///

-  /// 1-byte Character

+  /// 8-byte signed value

   ///

-  typedef char      CHAR8;

+  typedef __int64             INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned __int32    UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef __int32             INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

   ///

   /// 2-byte Character.  Unless otherwise specified all strings are stored in the

   /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

   ///

-  typedef uint16_t  CHAR16;

-

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

+#else

+  ///

+  /// 8-byte unsigned value

+  ///

+  typedef unsigned long long  UINT64;

+  ///

+  /// 8-byte signed value

+  ///

+  typedef long long           INT64;

+  ///

+  /// 4-byte unsigned value

+  ///

+  typedef unsigned int        UINT32;

+  ///

+  /// 4-byte signed value

+  ///

+  typedef int                 INT32;

+  ///

+  /// 2-byte unsigned value

+  ///

+  typedef unsigned short      UINT16;

+  ///

+  /// 2-byte Character.  Unless otherwise specified all strings are stored in the

+  /// UTF-16 encoding format as defined by Unicode 2.1 and ISO/IEC 10646 standards.

+  ///

+  typedef unsigned short      CHAR16;

+  ///

+  /// 2-byte signed value

+  ///

+  typedef short               INT16;

+  ///

+  /// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for TRUE.  Other

+  /// values are undefined.

+  ///

+  typedef unsigned char       BOOLEAN;

+  ///

+  /// 1-byte unsigned value

+  ///

+  typedef unsigned char       UINT8;

+  ///

+  /// 1-byte Character

+  ///

+  typedef char                CHAR8;

+  ///

+  /// 1-byte signed value

+  ///

+  typedef char                INT8;

 #endif

 

 ///