summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2011-04-06 11:39:42 +0000
committermiod <miod@openbsd.org>2011-04-06 11:39:42 +0000
commit0c2a5da7f05365c149e31167afeb0bdaec9adde8 (patch)
treed73a0e1a88f806feae92c7031cd46a52a3b6c5be /include
parentAvoid using NULL in non-pointer contexts: use 0 for integer values and '\0' (diff)
downloadwireguard-openbsd-0c2a5da7f05365c149e31167afeb0bdaec9adde8.tar.xz
wireguard-openbsd-0c2a5da7f05365c149e31167afeb0bdaec9adde8.zip
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.
Diffstat (limited to 'include')
-rw-r--r--include/dirent.h4
-rw-r--r--include/locale.h4
-rw-r--r--include/stddef.h4
-rw-r--r--include/stdio.h4
-rw-r--r--include/stdlib.h4
-rw-r--r--include/string.h4
-rw-r--r--include/time.h4
-rw-r--r--include/unistd.h4
-rw-r--r--include/wchar.h4
9 files changed, 18 insertions, 18 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