From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 27 Aug 2019 13:44:15 -0400 Subject: [PATCH] Make CHAR8 and similar be defined the same way edk2 does it. Signed-off-by: Peter Jones --- inc/aa64/efibind.h | 7 +++++++ inc/arm/efibind.h | 7 +++++++ inc/efidef.h | 7 +++---- inc/ia32/efibind.h | 7 +++++++ inc/ia64/efibind.h | 11 +++++++++-- inc/mips64el/efibind.h | 7 +++++++ inc/x64/efibind.h | 4 ++++ 7 files changed, 44 insertions(+), 6 deletions(-) diff --git a/inc/aa64/efibind.h b/inc/aa64/efibind.h index c4eafa0d8a8..00c7cead486 100644 --- a/inc/aa64/efibind.h +++ b/inc/aa64/efibind.h @@ -43,6 +43,9 @@ typedef int64_t intptr_t; #ifndef __WCHAR_TYPE__ # define __WCHAR_TYPE__ short #endif +#ifndef __CHAR16_TYPE__ +# define __CHAR16_TYPE__ unsigned short +#endif typedef uint64_t UINT64; typedef int64_t INT64; @@ -51,9 +54,13 @@ typedef uint32_t UINT32; typedef int32_t INT32; typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; #undef VOID diff --git a/inc/arm/efibind.h b/inc/arm/efibind.h index 012d3d2f8c9..42de542257c 100644 --- a/inc/arm/efibind.h +++ b/inc/arm/efibind.h @@ -49,6 +49,9 @@ typedef int32_t intptr_t; #ifndef __WCHAR_TYPE__ # define __WCHAR_TYPE__ short #endif +#ifndef __CHAR16_TYPE__ +# define __CHAR16_TYPE__ unsigned short +#endif typedef uint64_t UINT64; typedef int64_t INT64; @@ -57,9 +60,13 @@ typedef uint32_t UINT32; typedef int32_t INT32; typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; #undef VOID diff --git a/inc/efidef.h b/inc/efidef.h index 8b70051f43a..a552c7d91c3 100644 --- a/inc/efidef.h +++ b/inc/efidef.h @@ -20,9 +20,8 @@ Revision History --*/ -typedef UINT16 CHAR16; -typedef UINT8 CHAR8; -typedef UINT8 BOOLEAN; +typedef unsigned char BOOLEAN; + #ifndef CONST #define CONST const #endif @@ -194,7 +193,7 @@ typedef struct { // International Language // -typedef UINT8 ISO_639_2; +typedef CHAR8 ISO_639_2; #define ISO_639_2_ENTRY_SIZE 3 // diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h index 27459e454d1..b0b0d76151f 100644 --- a/inc/ia32/efibind.h +++ b/inc/ia32/efibind.h @@ -88,6 +88,9 @@ Revision History #ifndef __WCHAR_TYPE__ # define __WCHAR_TYPE__ short #endif +#ifndef __CHAR16_TYPE__ +# define __CHAR16_TYPE__ unsigned short +#endif typedef uint64_t UINT64; typedef int64_t INT64; @@ -98,9 +101,13 @@ typedef int64_t INT64; #endif typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; #undef VOID diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h index 3ace8d59190..ebe8cac3e94 100644 --- a/inc/ia64/efibind.h +++ b/inc/ia64/efibind.h @@ -74,19 +74,26 @@ Revision History #ifndef __WCHAR_TYPE__ # define __WCHAR_TYPE__ short #endif - +#ifndef __CHAR16_TYPE__ +# define __CHAR16_TYPE__ unsigned short +#endif typedef uint64_t UINT64; typedef int64_t INT64; + typedef uint32_t UINT32; typedef int32_t INT32; + typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; - #undef VOID #define VOID void diff --git a/inc/mips64el/efibind.h b/inc/mips64el/efibind.h index 1f08cd346d0..e26c51904ee 100644 --- a/inc/mips64el/efibind.h +++ b/inc/mips64el/efibind.h @@ -43,6 +43,9 @@ typedef int64_t intptr_t; #ifndef __WCHAR_TYPE__ # define __WCHAR_TYPE__ short #endif +#ifndef __CHAR16_TYPE__ +# define __CHAR16_TYPE__ unsigned short +#endif typedef uint64_t UINT64; typedef int64_t INT64; @@ -51,9 +54,13 @@ typedef uint32_t UINT32; typedef int32_t INT32; typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; #undef VOID diff --git a/inc/x64/efibind.h b/inc/x64/efibind.h index 2750ab9be7d..e7feed9dbe4 100644 --- a/inc/x64/efibind.h +++ b/inc/x64/efibind.h @@ -107,9 +107,13 @@ typedef int64_t INT64; #endif typedef uint16_t UINT16; +typedef __CHAR16_TYPE__ CHAR16; typedef int16_t INT16; + typedef uint8_t UINT8; +typedef char CHAR8; typedef int8_t INT8; + typedef __WCHAR_TYPE__ WCHAR; #undef VOID