gnu-efi/0017-Make-CHAR8-and-similar-be-defined-the-same-way-edk2-.patch
Peter Jones 828855b374 Use gnu-efi.patches instead of manually patching.
Signed-off-by: Peter Jones <pjones@redhat.com>
2019-10-25 12:42:21 -04:00

195 lines
4.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
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 <pjones@redhat.com>
---
inc/aa64/efibind.h | 7 +++++++
inc/arm/efibind.h | 7 +++++++
inc/efidef.h | 5 ++---
inc/ia32/efibind.h | 7 +++++++
inc/ia64/efibind.h | 11 +++++++++--
inc/mips64el/efibind.h | 6 ++++++
inc/x64/efibind.h | 4 ++++
7 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/inc/aa64/efibind.h b/inc/aa64/efibind.h
index a58b0e1cbef..276e507c212 100644
--- a/inc/aa64/efibind.h
+++ b/inc/aa64/efibind.h
@@ -42,6 +42,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;
@@ -50,9 +53,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 7a22b9c8458..ece0e805181 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..8158d3d0949 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
diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h
index dd0138573d9..fe6ee2278cf 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 b9b2e624657..367eae4c8fd 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 32241e5ad46..ba7ed4067d1 100644
--- a/inc/mips64el/efibind.h
+++ b/inc/mips64el/efibind.h
@@ -43,6 +43,8 @@ typedef int64_t intptr_t;
#ifndef __WCHAR_TYPE__
# define __WCHAR_TYPE__ short
#endif
+#ifndef __CHAR16_TYPE__
+#define __CHAR16_TYPE__ unsigned short
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -51,9 +53,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 986a73b7775..5a62176fae4 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