From 2f57ba31d554fff75cc7c1651c31e7efca65a6ff Mon Sep 17 00:00:00 2001 From: yanghaku <1961882079@qq.com> Date: Fri, 7 Jul 2023 19:27:01 +0800 Subject: [PATCH 1/2] Fix redefine warnining for NULL Signed-off-by: yanghaku <1961882079@qq.com> --- src/include/time.h | 2 ++ src/include/wchar.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/include/time.h b/src/include/time.h index e1c1317..dc7a860 100644 --- a/src/include/time.h +++ b/src/include/time.h @@ -7,11 +7,13 @@ extern "C" { #include +#ifndef NULL #ifdef __cplusplus #define NULL 0L #else #define NULL ((void*)0) #endif +#endif /* NULL */ typedef long time_t; typedef long clock_t; diff --git a/src/include/wchar.h b/src/include/wchar.h index 95e592e..e6c2923 100644 --- a/src/include/wchar.h +++ b/src/include/wchar.h @@ -18,11 +18,13 @@ typedef int mbstate_t; #define WCHAR_MIN (-1-0x7fffffff+L'\0') #endif +#ifndef NULL #ifdef __cplusplus #define NULL 0L #else #define NULL ((void*)0) #endif +#endif /* NULL */ #undef WEOF #define WEOF 0xFFFFU -- Gitee From f1567a62a54a082a898c1cad11f1518f5e994164 Mon Sep 17 00:00:00 2001 From: yanghaku <1961882079@qq.com> Date: Fri, 7 Jul 2023 19:32:49 +0800 Subject: [PATCH 2/2] Fix redefine warnining for NULL in locale.h Signed-off-by: yanghaku <1961882079@qq.com> --- src/include/locale.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/include/locale.h b/src/include/locale.h index d6f3b14..c522f0d 100644 --- a/src/include/locale.h +++ b/src/include/locale.h @@ -7,11 +7,13 @@ extern "C" { #include +#ifndef NULL #ifdef __cplusplus #define NULL 0L #else #define NULL ((void*)0) #endif +#endif /* NULL */ #define LC_CTYPE 0 #define LC_NUMERIC 1 -- Gitee