From owner-p4-projects@FreeBSD.ORG Sun Jul 22 13:08:41 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EA121065676; Sun, 22 Jul 2012 13:08:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B976B1065674 for ; Sun, 22 Jul 2012 13:08:39 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id A16388FC17 for ; Sun, 22 Jul 2012 13:08:39 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q6MD8dbs061776 for ; Sun, 22 Jul 2012 13:08:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q6MD8dJ4061773 for perforce@freebsd.org; Sun, 22 Jul 2012 13:08:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 22 Jul 2012 13:08:39 GMT Message-Id: <201207221308.q6MD8dJ4061773@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 214751 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 13:08:41 -0000 http://p4web.freebsd.org/@@214751?ac=10 Change 214751 by rwatson@rwatson_cinnamon on 2012/07/22 13:08:05 Re-add support for machine/endian.h, required by Mac OS X, into OpenBSM autotools foo. Affected files ... .. //depot/projects/trustedbsd/openbsm/config/config.h.in#21 edit .. //depot/projects/trustedbsd/openbsm/configure#61 edit .. //depot/projects/trustedbsd/openbsm/configure.ac#59 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#71 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#99 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/config/config.h.in#21 (text+ko) ==== @@ -51,6 +51,9 @@ /* Define if ipc_perm.__seq instead of seq */ #undef HAVE_IPC_PERM___SEQ +/* Define to 1 if you have the header file. */ +#undef HAVE_MACHINE_ENDIAN_H + /* Define to 1 if you have the header file. */ #undef HAVE_MACH_MACH_H @@ -193,6 +196,9 @@ /* Define if endian.h should be included */ #undef USE_ENDIAN_H +/* Define if machine/endian.h should be included */ +#undef USE_MACHINE_ENDIAN_H + /* Define if uses Mach IPC for Triggers messages */ #undef USE_MACH_IPC ==== //depot/projects/trustedbsd/openbsm/configure#61 (xtext) ==== @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#57 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#58 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for OpenBSM 1.2alpha1. # @@ -12953,13 +12953,14 @@ # # We rely on the BSD be32toh() and be32enc()-style endian macros to perform # byte order conversions. Availability of these varies considerably -- in -# general, a system might have neither, be32toh(), or be32toh() and be32enc(). +# general, a system might have neither, be32toh(), or be32toh() and be32enc(). # There is also variation in which headers are even present, and whether they # are macros or functions. Try to organise the world into some simpler cases. # The following macros may be set at the end: # # USE_ENDIAN_H # USE_SYS_ENDIAN_H +# USE_MACHINE_ENDIAN_H # USE_COMPAT_ENDIAN_H # USE_COMPAT_ENDIAN_ENC_H # @@ -13003,6 +13004,25 @@ done +for ac_header in machine/endian.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" +if test "x$ac_cv_header_machine_endian_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MACHINE_ENDIAN_H 1 +_ACEOF + + have_machine_endian_h=yes + +else + + have_machine_endian_h=no + +fi + +done + + if test $have_endian_h = yes; then $as_echo "#define USE_ENDIAN_H /**/" >>confdefs.h @@ -13011,6 +13031,10 @@ $as_echo "#define USE_SYS_ENDIAN_H /**/" >>confdefs.h +elif test $have_machine_endian_h = yes; then + +$as_echo "#define USE_MACHINE_ENDIAN_H /**/" >>confdefs.h + else as_fn_error $? "no endian.h" "$LINENO" 5 fi @@ -13027,6 +13051,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif + #ifdef USE_MACHINE_ENDIAN_H + #include + #endif int main () @@ -13061,6 +13088,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif + #ifdef USE_MACHINE_ENDIAN_H + #include + #endif #ifdef USE_COMPAT_ENDIAN_H #include "compat/endian.h" #endif ==== //depot/projects/trustedbsd/openbsm/configure.ac#59 (text+ko) ==== @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([OpenBSM], [1.2alpha1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#58 $]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#59 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([m4]) @@ -127,13 +127,14 @@ # # We rely on the BSD be32toh() and be32enc()-style endian macros to perform # byte order conversions. Availability of these varies considerably -- in -# general, a system might have neither, be32toh(), or be32toh() and be32enc(). +# general, a system might have neither, be32toh(), or be32toh() and be32enc(). # There is also variation in which headers are even present, and whether they # are macros or functions. Try to organise the world into some simpler cases. # The following macros may be set at the end: # # USE_ENDIAN_H # USE_SYS_ENDIAN_H +# USE_MACHINE_ENDIAN_H # USE_COMPAT_ENDIAN_H # USE_COMPAT_ENDIAN_ENC_H # @@ -151,10 +152,18 @@ have_sys_endian_h=no ]) +AC_CHECK_HEADERS([machine/endian.h], [ + have_machine_endian_h=yes +], [ + have_machine_endian_h=no +]) + if test $have_endian_h = yes; then AC_DEFINE(USE_ENDIAN_H,, Define if endian.h should be included) elif test $have_sys_endian_h = yes; then AC_DEFINE(USE_SYS_ENDIAN_H,, Define if sys/endian.h should be included) +elif test $have_machine_endian_h = yes; then + AC_DEFINE(USE_MACHINE_ENDIAN_H,, Define if machine/endian.h should be included) else AC_MSG_ERROR([no endian.h]) fi @@ -169,6 +178,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif + #ifdef USE_MACHINE_ENDIAN_H + #include + #endif ], [ be32toh(0); ], [], [ @@ -183,6 +195,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif + #ifdef USE_MACHINE_ENDIAN_H + #include + #endif #ifdef USE_COMPAT_ENDIAN_H #include "compat/endian.h" #endif ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#71 (text+ko) ==== @@ -32,7 +32,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#70 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#71 $ */ #include @@ -45,6 +45,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif +#ifdef USE_MACHINE_ENDIAN_H +#include +#endif #ifdef USE_COMPAT_ENDIAN_H #include #endif ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#99 (text+ko) ==== @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#98 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#99 $ */ #include @@ -43,6 +43,9 @@ #ifdef USE_SYS_ENDIAN_H #include #endif +#ifdef USE_MACHINE_ENDIAN_H +#include +#endif #ifdef USE_COMPAT_ENDIAN_H #include #endif