From 3409dda59362159fa4e7fbcc4921bf62710bc770 Mon Sep 17 00:00:00 2001 From: miod <> Date: Wed, 6 Apr 2011 11:39:42 +0000 Subject: [PATCH] Define NULL as a void * instead of a long integer, as required by Single Unix. Kernel and bootblocks still use the old 0L value until all the NULL abuses in the code are fixed. --- src/include/dirent.h | 4 ++-- src/include/locale.h | 4 ++-- src/include/stddef.h | 4 ++-- src/include/stdio.h | 4 ++-- src/include/stdlib.h | 4 ++-- src/include/string.h | 4 ++-- src/include/time.h | 4 ++-- src/include/unistd.h | 4 ++-- src/include/wchar.h | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/include/dirent.h b/src/include/dirent.h index 15d66797..ef1c1baf 100644 --- a/src/include/dirent.h +++ b/src/include/dirent.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dirent.h,v 1.20 2010/12/31 19:54:05 guenther Exp $ */ +/* $OpenBSD: dirent.h,v 1.21 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */ /*- @@ -85,7 +85,7 @@ typedef struct _dirdesc { #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif /* __GNUG__ */ #endif /* !NULL */ diff --git a/src/include/locale.h b/src/include/locale.h index 7eeffa37..dfff586a 100644 --- a/src/include/locale.h +++ b/src/include/locale.h @@ -1,4 +1,4 @@ -/* $OpenBSD: locale.h,v 1.6 2003/06/02 19:34:12 millert Exp $ */ +/* $OpenBSD: locale.h,v 1.7 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: locale.h,v 1.6 1994/10/26 00:56:02 cgd Exp $ */ /* @@ -60,7 +60,7 @@ struct lconv { #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/stddef.h b/src/include/stddef.h index 9eb1875e..97c8e951 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stddef.h,v 1.10 2009/09/22 21:40:02 jsg Exp $ */ +/* $OpenBSD: stddef.h,v 1.11 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ /*- @@ -68,7 +68,7 @@ typedef __mbstate_t mbstate_t; #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/stdio.h b/src/include/stdio.h index e23e7ad4..aeb48f15 100644 --- a/src/include/stdio.h +++ b/src/include/stdio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdio.h,v 1.38 2009/11/09 00:18:27 kurt Exp $ */ +/* $OpenBSD: stdio.h,v 1.39 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- @@ -59,7 +59,7 @@ typedef __off_t off_t; #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/stdlib.h b/src/include/stdlib.h index affc6b18..da29a50f 100644 --- a/src/include/stdlib.h +++ b/src/include/stdlib.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdlib.h,v 1.47 2010/05/18 22:24:55 tedu Exp $ */ +/* $OpenBSD: stdlib.h,v 1.48 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /*- @@ -81,7 +81,7 @@ typedef struct { #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/string.h b/src/include/string.h index 3a1494d1..f3ae14e1 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -1,4 +1,4 @@ -/* $OpenBSD: string.h,v 1.20 2010/09/24 13:33:00 matthew Exp $ */ +/* $OpenBSD: string.h,v 1.21 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ /*- @@ -47,7 +47,7 @@ typedef __size_t size_t; #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/time.h b/src/include/time.h index dfaffabe..eb6936d4 100644 --- a/src/include/time.h +++ b/src/include/time.h @@ -1,4 +1,4 @@ -/* $OpenBSD: time.h,v 1.18 2006/01/06 18:53:04 millert Exp $ */ +/* $OpenBSD: time.h,v 1.19 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ /* @@ -48,7 +48,7 @@ #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/unistd.h b/src/include/unistd.h index a28fb72d..4edcae76 100644 --- a/src/include/unistd.h +++ b/src/include/unistd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: unistd.h,v 1.62 2008/06/25 14:58:54 millert Exp $ */ +/* $OpenBSD: unistd.h,v 1.63 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /*- @@ -59,7 +59,7 @@ #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif diff --git a/src/include/wchar.h b/src/include/wchar.h index 15a630bb..ccc3cb8a 100644 --- a/src/include/wchar.h +++ b/src/include/wchar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wchar.h,v 1.11 2010/07/24 09:58:39 guenther Exp $ */ +/* $OpenBSD: wchar.h,v 1.12 2011/04/06 11:39:42 miod Exp $ */ /* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ /*- @@ -66,7 +66,7 @@ #ifdef __GNUG__ #define NULL __null #else -#define NULL 0L +#define NULL ((void *)0) #endif #endif