summaryrefslogtreecommitdiff
path: root/0033-Make-CHAR8-and-similar-be-defined-the-same-way-edk2-.patch
blob: 87687873e1b5e7de952b4c5b7913f1e6a065a2ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
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           |  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