Deduplicate and follow UCRT headers. Signed-off-by: Zhongteng Gui <[email protected]> --- mingw-w64-headers/crt/corecrt.h | 12 ++++++++++++ mingw-w64-headers/crt/corecrt_wstdio.h | 12 ------------ mingw-w64-headers/crt/crtdbg.h | 12 ------------ mingw-w64-headers/crt/locale.h | 12 ------------ mingw-w64-headers/crt/setjmp.h | 12 ------------ mingw-w64-headers/crt/stdlib.h | 12 ------------ mingw-w64-headers/crt/string.h | 12 ------------ mingw-w64-headers/crt/tchar.h | 12 ------------ mingw-w64-headers/crt/time.h | 12 ------------ 9 files changed, 12 insertions(+), 96 deletions(-)
diff --git a/mingw-w64-headers/crt/corecrt.h b/mingw-w64-headers/crt/corecrt.h index 2dd360f61..c3f3a8208 100644 --- a/mingw-w64-headers/crt/corecrt.h +++ b/mingw-w64-headers/crt/corecrt.h @@ -188,6 +188,18 @@ typedef __time64_t time_t; #endif #endif +#ifndef NULL +#ifdef __cplusplus +#ifndef _WIN64 +#define NULL 0 +#else +#define NULL 0LL +#endif /* W64 */ +#else +#define NULL ((void *)0) +#endif +#endif + #if defined(__LIBMSVCRT__) /* When building mingw-w64, this should be blank. */ #define _SECIMP diff --git a/mingw-w64-headers/crt/corecrt_wstdio.h b/mingw-w64-headers/crt/corecrt_wstdio.h index ffc808a60..2779981fa 100644 --- a/mingw-w64-headers/crt/corecrt_wstdio.h +++ b/mingw-w64-headers/crt/corecrt_wstdio.h @@ -42,18 +42,6 @@ _CRT_BEGIN_C_HEADER #define stdout (__acrt_iob_func(1)) #define stderr (__acrt_iob_func(2)) -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - #if __MINGW_FORTIFY_LEVEL > 0 __mingw_bos_declare; #endif diff --git a/mingw-w64-headers/crt/crtdbg.h b/mingw-w64-headers/crt/crtdbg.h index 1e9136ead..f25fcba6d 100644 --- a/mingw-w64-headers/crt/crtdbg.h +++ b/mingw-w64-headers/crt/crtdbg.h @@ -11,18 +11,6 @@ _CRT_BEGIN_C_HEADER -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - typedef void *_HFILE; #define _CRT_WARN 0 diff --git a/mingw-w64-headers/crt/locale.h b/mingw-w64-headers/crt/locale.h index e767e2888..c7a6d3077 100644 --- a/mingw-w64-headers/crt/locale.h +++ b/mingw-w64-headers/crt/locale.h @@ -14,18 +14,6 @@ _CRT_BEGIN_C_HEADER -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - /** * Internal CRT stuff. */ diff --git a/mingw-w64-headers/crt/setjmp.h b/mingw-w64-headers/crt/setjmp.h index a7255726f..49e29a0e0 100644 --- a/mingw-w64-headers/crt/setjmp.h +++ b/mingw-w64-headers/crt/setjmp.h @@ -10,18 +10,6 @@ _CRT_BEGIN_C_HEADER -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - #if defined(__i386__) #define _JBLEN 16 diff --git a/mingw-w64-headers/crt/stdlib.h b/mingw-w64-headers/crt/stdlib.h index 45ee016a9..f750e155d 100644 --- a/mingw-w64-headers/crt/stdlib.h +++ b/mingw-w64-headers/crt/stdlib.h @@ -12,18 +12,6 @@ _CRT_BEGIN_C_HEADER -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 diff --git a/mingw-w64-headers/crt/string.h b/mingw-w64-headers/crt/string.h index b629da231..7aece723f 100644 --- a/mingw-w64-headers/crt/string.h +++ b/mingw-w64-headers/crt/string.h @@ -19,18 +19,6 @@ _CRT_BEGIN_C_HEADER #define _NLSCMPERROR 2147483647 -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - char * __cdecl _strset(char *_Str,int _Val) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; char * __cdecl _strset_l(char *_Str,int _Val,_locale_t _Locale) __MINGW_ATTRIB_DEPRECATED_SEC_WARN; char * __cdecl strcpy(char * __restrict__ _Dest,const char * __restrict__ _Source); diff --git a/mingw-w64-headers/crt/tchar.h b/mingw-w64-headers/crt/tchar.h index e3a7a87d7..09f520599 100644 --- a/mingw-w64-headers/crt/tchar.h +++ b/mingw-w64-headers/crt/tchar.h @@ -1352,18 +1352,6 @@ _CRT_END_C_HEADER #define _istlegal(_c) (1) -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - #define _strdec(_cpc1,_cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1) #define _strinc(_pc) ((_pc)+1) #define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc)) diff --git a/mingw-w64-headers/crt/time.h b/mingw-w64-headers/crt/time.h index b0e8cee49..2a8e39223 100644 --- a/mingw-w64-headers/crt/time.h +++ b/mingw-w64-headers/crt/time.h @@ -23,18 +23,6 @@ _CRT_BEGIN_C_HEADER typedef long clock_t; #endif -#ifndef NULL -#ifdef __cplusplus -#ifndef _WIN64 -#define NULL 0 -#else -#define NULL 0LL -#endif /* W64 */ -#else -#define NULL ((void *)0) -#endif -#endif - #define CLOCKS_PER_SEC 1000 #ifdef _UCRT -- 2.55.0.windows.5 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
