diff --git a/include/geos/gconst.h b/include/geos/gconst.h index e70eb9304..3e42feed7 100644 --- a/include/geos/gconst.h +++ b/include/geos/gconst.h @@ -4,13 +4,15 @@ reassembled by Maciej 'YTM/Elysium' Witkowiak */ -/* Here are constants which didn't fit into any other cathegory... */ +/* Here are constants which didn't fit into any other category... */ #ifndef _GCONST_H #define _GCONST_H -#define NULL 0 -#define FALSE NULL +#ifndef NULL +#define NULL ((void *) 0) +#endif +#define FALSE 0 #define TRUE 0xff #define MOUSE_SPRNUM 0 #define DISK_DRV_LGH 0x0d80 diff --git a/include/locale.h b/include/locale.h index 3f23e01d2..f408e1ef3 100644 --- a/include/locale.h +++ b/include/locale.h @@ -39,9 +39,8 @@ /* NULL pointer */ -#ifndef _HAVE_NULL -#define NULL 0 -#define _HAVE_NULL +#ifndef NULL +#define NULL ((void *) 0) #endif /* Locale information constants */ @@ -82,6 +81,3 @@ char* __fastcall__ setlocale (int category, const char* locale); /* End of locale.h */ #endif - - - diff --git a/include/stddef.h b/include/stddef.h index ca93edf62..d2bfd6138 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -53,9 +53,8 @@ typedef unsigned size_t; #endif /* NULL pointer */ -#ifndef _HAVE_NULL -#define NULL ((void *) 0) -#define _HAVE_NULL +#ifndef NULL +#define NULL ((void *) 0) #endif /* offsetof macro */ @@ -65,6 +64,3 @@ typedef unsigned size_t; /* End of stddef.h */ #endif - - - diff --git a/include/stdio.h b/include/stdio.h index 858dd5059..012b8e2ba 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -38,9 +38,8 @@ /* NULL pointer */ -#ifndef _HAVE_NULL -#define NULL 0 -#define _HAVE_NULL +#ifndef NULL +#define NULL ((void *) 0) #endif /* size_t is needed */ diff --git a/include/stdlib.h b/include/stdlib.h index 4e7ffbd6a..e789f732b 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -44,6 +44,11 @@ typedef unsigned size_t; #define _HAVE_size_t #endif +/* NULL pointer */ +#ifndef NULL +#define NULL ((void *) 0) +#endif + /* Standard exit codes */ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 @@ -167,6 +172,3 @@ int __fastcall__ putenv (char* s); /* End of stdlib.h */ #endif - - - diff --git a/include/string.h b/include/string.h index 854359dad..abaf80e7d 100644 --- a/include/string.h +++ b/include/string.h @@ -37,9 +37,8 @@ #define _STRING_H /* NULL pointer */ -#ifndef _HAVE_NULL -#define NULL 0 -#define _HAVE_NULL +#ifndef NULL +#define NULL ((void *) 0) #endif /* size_t is needed */ diff --git a/include/time.h b/include/time.h index 642d68c4e..bfc2ac435 100644 --- a/include/time.h +++ b/include/time.h @@ -39,9 +39,8 @@ /* NULL pointer */ -#ifndef _HAVE_NULL -#define NULL 0 -#define _HAVE_NULL +#ifndef NULL +#define NULL ((void *) 0) #endif /* size_t is needed */ diff --git a/test/val/add4.c b/test/val/add4.c index f02a7fb9c..2371aea69 100644 --- a/test/val/add4.c +++ b/test/val/add4.c @@ -22,7 +22,6 @@ long long0 = 0; long long1 = 0; unsigned long ulong0 = 0; unsigned long ulong1 = 0; -#define NULL 0 char *cP0=NULL; char *cP1=NULL; int *iP0=NULL;