From owner-p4-projects@FreeBSD.ORG Mon Feb 27 23:39:47 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 9E26F16A423; Mon, 27 Feb 2006 23:39:46 +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 47F5916A420 for ; Mon, 27 Feb 2006 23:39:46 +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 0686E43D46 for ; Mon, 27 Feb 2006 23:39:46 +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 k1RNdji3061990 for ; Mon, 27 Feb 2006 23:39:45 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 k1RNdjXi061987 for perforce@freebsd.org; Mon, 27 Feb 2006 23:39:45 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 27 Feb 2006 23:39:45 GMT Message-Id: <200602272339.k1RNdjXi061987@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 92494 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: Mon, 27 Feb 2006 23:39:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=92494 Change 92494 by rwatson@rwatson_peppercorn on 2006/02/27 23:38:56 Use configure to decide what endian includes are available, and how to use them. Prefer the local sys/endian.h if we've got one or building without configure (i.e., BSD make in FreeBSD); otherwise use compat/endian.h. To do that, we need the local endian.h, which on some systems is machine/endian.h (Darwin, *BSD), or in plain old endian.h (Linux). Affected files ... .. //depot/projects/trustedbsd/openbsm/compat/endian.h#7 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#31 edit .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#36 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/compat/endian.h#7 (text+ko) ==== @@ -25,22 +25,13 @@ * SUCH DAMAGE. * * Derived from FreeBSD src/sys/sys/endian.h:1.6. - * $P4: //depot/projects/trustedbsd/openbsm/compat/endian.h#6 $ + * $P4: //depot/projects/trustedbsd/openbsm/compat/endian.h#7 $ */ #ifndef _COMPAT_ENDIAN_H_ #define _COMPAT_ENDIAN_H_ /* - * Pick up value of BYTE_ORDER/_BYTE_ORDER if not yet included. - */ -#ifdef __linux__ -#include -#else -#include -#endif - -/* * Some systems will have the uint/int types defined here already, others * will need stdint.h. */ ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#31 (text+ko) ==== @@ -31,15 +31,31 @@ * 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#30 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#31 $ */ #include + +#ifdef HAVE_CONFIG_H +#include #ifdef HAVE_SYS_ENDIAN_H #include -#else +#else /* !HAVE_SYS_ENDIAN_H */ +#ifdef HAVE_MACHINE_ENDIAN_H +#include +#else /* !HAVE_MACHINE_ENDIAN_H */ +#ifdef HAVE_ENDIAN_H +#include +#else /* !HAVE_ENDIAN_H */ +#error "No supported endian.h" +#endif /* !HAVE_ENDIAN_H */ +#endif /* !HAVE_MACHINE_ENDIAN_H */ #include -#endif +#endif /* !HAVE_SYS_ENDIANG_H */ +#else /* !HAVE_CONFIG_H */ +#include +#endif /* !HAVE_CONFIG_H */ + #include #include ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#36 (text+ko) ==== @@ -30,15 +30,31 @@ * 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#35 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#36 $ */ #include + +#ifdef HAVE_CONFIG_H +#include #ifdef HAVE_SYS_ENDIAN_H #include -#else +#else /* !HAVE_SYS_ENDIAN_H */ +#ifdef HAVE_MACHINE_ENDIAN_H +#include +#else /* !HAVE_MACHINE_ENDIAN_H */ +#ifdef HAVE_ENDIAN_H +#include +#else /* !HAVE_ENDIAN_H */ +#error "No supported endian.h" +#endif /* !HAVE_ENDIAN_H */ +#endif /* !HAVE_MACHINE_ENDIAN_H */ #include -#endif +#endif /* !HAVE_SYS_ENDIANG_H */ +#else /* !HAVE_CONFIG_H */ +#include +#endif /* !HAVE_CONFIG_H */ + #include #include #include