PERFORCE change 92501 for review

Robert Watson rwatson at FreeBSD.org
Mon Feb 27 16:46:43 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=92501

Change 92501 by rwatson at rwatson_peppercorn on 2006/02/28 00:46:14

	Test for a fully-featured queue.h, which is not present on all
	platforms that have queue.h.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/config/config.h.in#4 edit
.. //depot/projects/trustedbsd/openbsm/configure#5 edit
.. //depot/projects/trustedbsd/openbsm/configure.ac#8 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/config/config.h.in#4 (text+ko) ====

@@ -21,6 +21,9 @@
 /* Define to 1 if you have the `ftruncate' function. */
 #undef HAVE_FTRUNCATE
 
+/* Define if queue.h includes LIST_FIRST */
+#undef HAVE_FULL_QUEUE_H
+
 /* Define to 1 if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 

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

@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#6 .
+# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#7 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59 for OpenBSM 1.0a5.
 #
@@ -22516,6 +22516,70 @@
 done
 
 
+# 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.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+	#include <sys/queue.h>
+
+int
+main ()
+{
+
+	struct foo {
+		LIST_ENTRY(foo) foo_entries;
+	};
+	LIST_HEAD(, foo) foo_list;
+	struct foo *foo;
+
+	foo = LIST_FIRST(&foo_list);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FULL_QUEUE_H
+_ACEOF
+
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
                                                                                                     ac_config_files="$ac_config_files Makefile bin/Makefile bin/audit/Makefile bin/auditd/Makefile bin/auditreduce/Makefile bin/praudit/Makefile bsm/Makefile libbsm/Makefile man/Makefile tools/Makefile"
 
 

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

@@ -3,7 +3,7 @@
 
 AC_PREREQ(2.59)
 AC_INIT([OpenBSM], [1.0a5], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#7 $])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#8 $])
 AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_HEADER([config/config.h])
@@ -44,6 +44,23 @@
 AC_FUNC_STRFTIME
 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.
+AC_TRY_COMPILE([
+	#include <sys/queue.h>
+], [
+	struct foo {
+		LIST_ENTRY(foo) foo_entries;
+	};
+	LIST_HEAD(, foo) foo_list;
+	struct foo *foo;
+
+	foo = LIST_FIRST(&foo_list);
+], [
+AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST)
+])
+
 AC_CONFIG_FILES([Makefile
                  bin/Makefile
                  bin/audit/Makefile


More information about the trustedbsd-cvs mailing list