50 lines
1.2 KiB
Diff
50 lines
1.2 KiB
Diff
|
|
From b9c62d6b03e3bd343334a47618eee164fee93b86 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Xiaotian Wu <wuxiaotian@loongson.cn>
|
||
|
|
Date: Wed, 17 May 2023 17:22:49 +0800
|
||
|
|
Subject: [PATCH 1/3] Add some definitions for LoongArch
|
||
|
|
|
||
|
|
Added CHAR8, CHAR16, WCHAR and VOID type definitions for LoongArch
|
||
|
|
Signed-off-by: yueyuankun <yueyuankun@kylinos.cn>
|
||
|
|
---
|
||
|
|
inc/loongarch64/efibind.h | 11 ++++++-----
|
||
|
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/inc/loongarch64/efibind.h b/inc/loongarch64/efibind.h
|
||
|
|
index 23178a0..2287be1 100644
|
||
|
|
--- a/inc/loongarch64/efibind.h
|
||
|
|
+++ b/inc/loongarch64/efibind.h
|
||
|
|
@@ -42,9 +42,10 @@ typedef int64_t intptr_t;
|
||
|
|
// Basic EFI types of various widths
|
||
|
|
//
|
||
|
|
|
||
|
|
-#ifndef __WCHAR_TYPE__
|
||
|
|
-# define __WCHAR_TYPE__ short
|
||
|
|
-#endif
|
||
|
|
+#include <stddef.h>
|
||
|
|
+
|
||
|
|
+typedef wchar_t CHAR16;
|
||
|
|
+#define WCHAR CHAR16
|
||
|
|
|
||
|
|
#ifndef __CHAR16_TYPE__
|
||
|
|
# define __CHAR16_TYPE__ unsigned short
|
||
|
|
@@ -58,14 +59,14 @@ typedef int32_t INT32;
|
||
|
|
|
||
|
|
typedef uint16_t UINT16;
|
||
|
|
typedef int16_t INT16;
|
||
|
|
+
|
||
|
|
typedef __CHAR16_TYPE__ CHAR16;
|
||
|
|
typedef uint8_t UINT8;
|
||
|
|
typedef int8_t INT8;
|
||
|
|
typedef char CHAR8;
|
||
|
|
-typedef __WCHAR_TYPE__ WCHAR;
|
||
|
|
|
||
|
|
#undef VOID
|
||
|
|
-#define VOID void
|
||
|
|
+typedef void VOID;
|
||
|
|
|
||
|
|
typedef int64_t INTN;
|
||
|
|
typedef uint64_t UINTN;
|
||
|
|
--
|
||
|
|
2.43.0
|
||
|
|
|