summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCallum Farmer <gmbr3@opensuse.org>2023-04-08 19:43:42 +0100
committerCallum Farmer <gmbr3@opensuse.org>2023-04-08 20:07:13 +0100
commit189200d0b0f6fff473d302880d9569f45d4d8c4d (patch)
tree821cf0530605bc2570e6dd0c320a878f616f51dc
parent4f8b339facb471192e021fffd5db545a0fbddbc3 (diff)
downloadgnu-efi-189200d0b0f6fff473d302880d9569f45d4d8c4d.tar.gz
Make WCHAR and CHAR16 identical
And actually use wchar_t gnu-efi already uses L string literals which are of type wchar_t Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
-rw-r--r--inc/aarch64/efibind.h13
-rw-r--r--inc/arm/efibind.h13
-rw-r--r--inc/ia32/efibind.h14
-rw-r--r--inc/ia64/efibind.h14
-rw-r--r--inc/mips64el/efibind.h13
-rw-r--r--inc/riscv64/efibind.h8
-rw-r--r--inc/x86_64/efibind.h10
7 files changed, 29 insertions, 56 deletions
diff --git a/inc/aarch64/efibind.h b/inc/aarch64/efibind.h
index da94c3b..1454422 100644
--- a/inc/aarch64/efibind.h
+++ b/inc/aarch64/efibind.h
@@ -38,12 +38,10 @@ typedef int64_t intptr_t;
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-#ifndef __CHAR16_TYPE__
-# define __CHAR16_TYPE__ unsigned short
-#endif
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -52,15 +50,12 @@ 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/arm/efibind.h b/inc/arm/efibind.h
index b4753a1..d391b14 100644
--- a/inc/arm/efibind.h
+++ b/inc/arm/efibind.h
@@ -46,12 +46,10 @@ typedef int32_t intptr_t;
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-#ifndef __CHAR16_TYPE__
-# define __CHAR16_TYPE__ unsigned short
-#endif
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -60,15 +58,12 @@ 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/ia32/efibind.h b/inc/ia32/efibind.h
index b0b0d76..6b0e6b4 100644
--- a/inc/ia32/efibind.h
+++ b/inc/ia32/efibind.h
@@ -85,12 +85,11 @@ Revision History
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-#ifndef __CHAR16_TYPE__
-# define __CHAR16_TYPE__ unsigned short
-#endif
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
+
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -101,15 +100,12 @@ 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
#define VOID void
diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h
index ebe8cac..254afd6 100644
--- a/inc/ia64/efibind.h
+++ b/inc/ia64/efibind.h
@@ -71,12 +71,11 @@ Revision History
//
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-#ifndef __CHAR16_TYPE__
-# define __CHAR16_TYPE__ unsigned short
-#endif
+
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -85,15 +84,12 @@ 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 e26c519..4f7430f 100644
--- a/inc/mips64el/efibind.h
+++ b/inc/mips64el/efibind.h
@@ -40,12 +40,10 @@ typedef int64_t intptr_t;
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
-#ifndef __CHAR16_TYPE__
-# define __CHAR16_TYPE__ unsigned short
-#endif
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -54,15 +52,12 @@ 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/riscv64/efibind.h b/inc/riscv64/efibind.h
index dfec652..22a12d4 100644
--- a/inc/riscv64/efibind.h
+++ b/inc/riscv64/efibind.h
@@ -22,7 +22,7 @@
// Basic EFI types of various widths
//
-
+#include <stddef.h>
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -32,10 +32,8 @@ typedef uint16_t UINT16;
typedef int16_t INT16;
typedef uint8_t UINT8;
typedef int8_t INT8;
-#ifndef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ short
-#endif
-typedef __WCHAR_TYPE__ WCHAR;
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
#ifndef BOOLEAN
typedef uint8_t BOOLEAN;
#endif
diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h
index 835e0b9..152e0ca 100644
--- a/inc/x86_64/efibind.h
+++ b/inc/x86_64/efibind.h
@@ -96,9 +96,10 @@ Revision History
// Basic EFI types of various widths
//
-#ifndef __WCHAR_TYPE__
-# define __WCHAR_TYPE__ short
-#endif
+#include <stddef.h>
+
+typedef wchar_t CHAR16;
+#define WCHAR CHAR16
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -109,15 +110,12 @@ 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
#define VOID void