PERFORCE change 214751 for review
Robert Watson
rwatson at FreeBSD.org
Sun Jul 22 13:08:41 UTC 2012
http://p4web.freebsd.org/@@214751?ac=10
Change 214751 by rwatson at 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 <machine/endian.h> header file. */
+#undef HAVE_MACHINE_ENDIAN_H
+
/* Define to 1 if you have the <mach/mach.h> 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 <sys/endian.h>
#endif
+ #ifdef USE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+ #endif
int
main ()
@@ -13061,6 +13088,9 @@
#ifdef USE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
+ #ifdef USE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+ #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 at 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 <sys/endian.h>
#endif
+ #ifdef USE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+ #endif
], [
be32toh(0);
], [], [
@@ -183,6 +195,9 @@
#ifdef USE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
+ #ifdef USE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+ #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 <sys/types.h>
@@ -45,6 +45,9 @@
#ifdef USE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
+#ifdef USE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#endif
#ifdef USE_COMPAT_ENDIAN_H
#include <compat/endian.h>
#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 <sys/types.h>
@@ -43,6 +43,9 @@
#ifdef USE_SYS_ENDIAN_H
#include <sys/endian.h>
#endif
+#ifdef USE_MACHINE_ENDIAN_H
+#include <machine/endian.h>
+#endif
#ifdef USE_COMPAT_ENDIAN_H
#include <compat/endian.h>
#endif
More information about the p4-projects
mailing list