[CRT] Define NULL in crtdefs.h

This commit is contained in:
Timo Kreuzer 2021-07-27 15:08:26 +02:00
parent ce65553eaa
commit 486a4d93ed
10 changed files with 8 additions and 77 deletions

View file

@ -10,14 +10,6 @@
#pragma pack(push,_CRT_PACKING)
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -9,6 +9,14 @@
#ifndef _INC_CRTDEFS
#define _INC_CRTDEFS
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifdef _USE_32BIT_TIME_T
#ifdef _WIN64
#error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64

View file

@ -14,14 +14,6 @@
extern "C" {
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2

View file

@ -365,15 +365,6 @@ typedef __WCHAR_TYPE__ wchar_t;
#endif /* __sys_stdtypes_h */
/* A null pointer constant. */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void*)0)
#endif
#endif
#ifndef offsetof
/* Offset of member MEMBER in a struct of type TYPE. */

View file

@ -66,14 +66,6 @@ extern "C" {
#define _SYS_OPEN 20
#define TMP_MAX 32767
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _OFF_T_DEFINED
#define _OFF_T_DEFINED
#ifndef _OFF_T_

View file

@ -15,18 +15,6 @@
extern "C" {
#endif
#ifndef NULL
#ifdef __cplusplus
#ifndef _WIN64
#define NULL 0
#else
#define NULL 0LL
#endif /* W64 */
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 5
#endif

View file

@ -17,14 +17,6 @@ extern "C" {
#define _NLSCMPERROR 2147483647
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _CRT_MEMORY_DEFINED
#define _CRT_MEMORY_DEFINED

View file

@ -1513,14 +1513,6 @@ extern "C" {
#define _istlegal(_c) (1)
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#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))

View file

@ -63,14 +63,6 @@ extern "C" {
#endif
#endif
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _TM_DEFINED
#define _TM_DEFINED
struct tm {

View file

@ -128,14 +128,6 @@ extern "C" {
#define _WFINDDATA_T_DEFINED
#endif /* !_WFINDDATA_T_DEFINED */
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef _CRT_CTYPEDATA_DEFINED
# define _CRT_CTYPEDATA_DEFINED
# ifndef _CTYPE_DISABLE_MACROS