From owner-p4-projects@FreeBSD.ORG Tue Feb 28 00:46:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98AD016A45E; Tue, 28 Feb 2006 00:46:39 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46A6416A440 for ; Tue, 28 Feb 2006 00:46:39 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0060543D45 for ; Tue, 28 Feb 2006 00:46:38 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1S0kcI1064657 for ; Tue, 28 Feb 2006 00:46:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1S0kcSt064653 for perforce@freebsd.org; Tue, 28 Feb 2006 00:46:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 28 Feb 2006 00:46:38 GMT Message-Id: <200602280046.k1S0kcSt064653@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 92501 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Feb 2006 00:46:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=92501 Change 92501 by rwatson@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 + +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@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 +], [ + 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