diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 38acf8512eb..cff4549d376 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -41,6 +41,14 @@ # endif #endif +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + #ifndef __stdcall # ifdef __i386__ # ifdef __GNUC__ diff --git a/include/msvcrt/stddef.h b/include/msvcrt/stddef.h index 052132ed715..12025d53dc8 100644 --- a/include/msvcrt/stddef.h +++ b/include/msvcrt/stddef.h @@ -20,14 +20,6 @@ #include -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - #ifdef __GNUC__ #define offsetof(s,m) __builtin_offsetof(s,m) #elif defined(_WIN64) diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index ecaa7fe611a..8a31835bea2 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -19,14 +19,6 @@ #define _IOSTRG 0x0040 #define _IORW 0x0080 -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 91fcc2a672d..78fc5fba756 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -12,14 +12,6 @@ #include -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void*)0) -#endif -#endif - typedef struct { float f; diff --git a/include/msvcrt/string.h b/include/msvcrt/string.h index 96421cb491e..f8bc40fb2a6 100644 --- a/include/msvcrt/string.h +++ b/include/msvcrt/string.h @@ -15,14 +15,6 @@ #define _NLSCMP_DEFINED #endif -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index d55e8bbf81d..9ed27f5f9e5 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -29,14 +29,6 @@ typedef __msvcrt_long clock_t; #define _CLOCK_T_DEFINED #endif -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - #ifndef CLOCKS_PER_SEC #define CLOCKS_PER_SEC 1000 #endif diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h index 1fcbaa93994..119f8a2a410 100644 --- a/include/msvcrt/wchar.h +++ b/include/msvcrt/wchar.h @@ -17,14 +17,6 @@ extern "C" { #endif -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - #ifndef WCHAR_MIN /* also in stdint.h */ #define WCHAR_MIN 0U #define WCHAR_MAX 0xffffU