Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jun 2006 19:24:04 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 99450 for review
Message-ID:  <200606171924.k5HJO47P095254@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=99450

Change 99450 by rwatson@rwatson_sesame on 2006/06/17 19:23:58

	Test for LIST_FIRST and TAILQ_FOREACH_SAFE in queue.h; FreeBSD
	4.x offers the former but not latter, so we must use the compat
	queue.h on FreeBSD 4.x.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/configure#21 edit
.. //depot/projects/trustedbsd/openbsm/configure.ac#23 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/configure#21 (xtext) ====

@@ -22936,8 +22936,8 @@
 
 
 # sys/queue.h exists on most systems, but its capabilities vary a great deal.
-# test for LIST_FIRST, which appears to not exist in all of them, and is
-# necessary for OpenBSM.
+# test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in
+# all of them, and are necessary for OpenBSM.
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -22951,13 +22951,13 @@
 main ()
 {
 
-	struct foo {
-		LIST_ENTRY(foo) foo_entries;
-	};
-	LIST_HEAD(, foo) foo_list;
-	struct foo *foo;
 
-	foo = LIST_FIRST(&foo_list);
+	#ifndef LIST_FIRST
+	#error LIST_FIRST missing
+	#endif
+	#ifndef TAILQ_FOREACH_SAFE
+	#error TAILQ_FOREACH_SAFE
+	#endif
 
   ;
   return 0;

==== //depot/projects/trustedbsd/openbsm/configure.ac#23 (text+ko) ====

@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.59)
 AC_INIT([OpenBSM], [1.0a6], [trustedbsd-audit@TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#22 $])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#23 $])
 AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_HEADER([config/config.h])
@@ -59,18 +59,18 @@
 AC_CHECK_FUNCS([bzero ftruncate gettimeofday inet_ntoa memset strchr strerror strrchr strstr strtol strtoul])
 
 # sys/queue.h exists on most systems, but its capabilities vary a great deal.
-# test for LIST_FIRST, which appears to not exist in all of them, and is
-# necessary for OpenBSM.
+# test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in
+# all of them, and are necessary for OpenBSM.
 AC_TRY_LINK([
 	#include <sys/queue.h>
 ], [
-	struct foo {
-		LIST_ENTRY(foo) foo_entries;
-	};
-	LIST_HEAD(, foo) foo_list;
-	struct foo *foo;
 
-	foo = LIST_FIRST(&foo_list);
+	#ifndef LIST_FIRST
+	#error LIST_FIRST missing
+	#endif
+	#ifndef TAILQ_FOREACH_SAFE
+	#error TAILQ_FOREACH_SAFE
+	#endif
 ], [
 AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST)
 ])



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606171924.k5HJO47P095254>