diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-06 11:39:45 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-06 11:39:45 +0000 |
commit | 40f6222b51341dcb8308e73c42816d8c2368890c (patch) | |
tree | 98a0fb5dcc2c5a61dc68795989b9083e88e42dc5 | |
parent | e2ddf551fe54f5fd63dbb0131d6835d07f172753 (diff) |
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.
-rw-r--r-- | include/dirent.h | 4 | ||||
-rw-r--r-- | include/locale.h | 4 | ||||
-rw-r--r-- | include/stddef.h | 4 | ||||
-rw-r--r-- | include/stdio.h | 4 | ||||
-rw-r--r-- | include/stdlib.h | 4 | ||||
-rw-r--r-- | include/string.h | 4 | ||||
-rw-r--r-- | include/time.h | 4 | ||||
-rw-r--r-- | include/unistd.h | 4 | ||||
-rw-r--r-- | include/wchar.h | 4 | ||||
-rw-r--r-- | sys/sys/param.h | 6 |
10 files changed, 23 insertions, 19 deletions
diff --git a/include/dirent.h b/include/dirent.h index 15d66797b6e..ef1c1bafc95 100644 --- a/include/dirent.h +++ b/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/include/locale.h b/include/locale.h index 7eeffa37410..dfff586aca5 100644 --- a/include/locale.h +++ b/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/include/stddef.h b/include/stddef.h index 9eb1875eb04..97c8e9510de 100644 --- a/include/stddef.h +++ b/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/include/stdio.h b/include/stdio.h index e23e7ad4667..aeb48f1535c 100644 --- a/include/stdio.h +++ b/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/include/stdlib.h b/include/stdlib.h index affc6b18010..da29a50fc2d 100644 --- a/include/stdlib.h +++ b/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/include/string.h b/include/string.h index 3a1494d16d7..f3ae14e15c2 100644 --- a/include/string.h +++ b/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/include/time.h b/include/time.h index dfaffabe1d7..eb6936d4448 100644 --- a/include/time.h +++ b/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/include/unistd.h b/include/unistd.h index a28fb72d146..4edcae76007 100644 --- a/include/unistd.h +++ b/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/include/wchar.h b/include/wchar.h index 15a630bb3e0..ccc3cb8a729 100644 --- a/include/wchar.h +++ b/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 diff --git a/sys/sys/param.h b/sys/sys/param.h index 3319db07517..df9cd405dbf 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -1,4 +1,4 @@ -/* $OpenBSD: param.h,v 1.89 2011/01/14 00:04:16 deraadt Exp $ */ +/* $OpenBSD: param.h,v 1.90 2011/04/06 11:39:44 miod Exp $ */ /* $NetBSD: param.h,v 1.23 1996/03/17 01:02:29 thorpej Exp $ */ /*- @@ -48,7 +48,11 @@ #ifdef __GNUG__ #define NULL __null #else +#if defined(_KERNEL) || defined(_STANDALONE) #define NULL 0L +#else +#define NULL ((void *)0) +#endif #endif #endif |