Module Name: src
Committed By: pooka
Date: Wed Jul 17 15:50:59 UTC 2013
Modified Files:
src/sys/sys: queue.h
Log Message:
Include sys/null.h only on NetBSD because sys/null.h is not available
elsewhere. This conditional makes the header portable and it can simply
be dropped verbatim into any system.
Also, move the inclusion below the comment block describing the purpose
of queue.h so that people looking at the header first see information
about the functionality instead of about a portability detail.
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/sys/queue.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/queue.h
diff -u src/sys/sys/queue.h:1.54 src/sys/sys/queue.h:1.55
--- src/sys/sys/queue.h:1.54 Wed Apr 10 22:22:16 2013
+++ src/sys/sys/queue.h Wed Jul 17 15:50:59 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: queue.h,v 1.54 2013/04/10 22:22:16 christos Exp $ */
+/* $NetBSD: queue.h,v 1.55 2013/07/17 15:50:59 pooka Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -34,8 +34,6 @@
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_
-#include <sys/null.h>
-
/*
* This file defines five types of data structures: singly-linked lists,
* lists, simple queues, tail queues, and circular queues.
@@ -83,6 +81,17 @@
*/
/*
+ * Include the definition of NULL only on NetBSD because sys/null.h
+ * is not available elsewhere. This conditional makes the header
+ * portable and it can simply be dropped verbatim into any system.
+ * The caveat is that on other systems some other header
+ * must provide NULL before the macros can be used.
+ */
+#ifdef __NetBSD__
+#include <sys/null.h>
+#endif
+
+/*
* List definitions.
*/
#define LIST_HEAD(name, type) \