* configure.in: Check for machine/endian.h too.
authorKen Raeburn <raeburn@mit.edu>
Fri, 7 May 2004 23:26:43 +0000 (23:26 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 7 May 2004 23:26:43 +0000 (23:26 +0000)
* include/db-int.h: Include machine/endian.h if available.  Check for
__LITTLE_ENDIAN__ and __BIG_ENDIAN__, _MIPSEB and _MIPSEL.

ticket: 2551
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16322 dc483132-0cff-0310-8789-dd5450dbe970

src/util/db2/ChangeLog
src/util/db2/configure.in
src/util/db2/include/ChangeLog
src/util/db2/include/db-int.h

index 0591d6cd6151a6e6869b8b0787280081a2474cf9..55c393fc14d5125067d1b53b35b77286b4691de3 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-07  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Check for machine/endian.h too.
+
 2004-05-05  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (all-prerecurse): Make sure headers generated by
index b64a126d2e219c363500521041b1399ba573bc10..dc1fb1a14ddc02c5b935cc005c1a943a9eaec07d 100644 (file)
@@ -63,8 +63,10 @@ AC_COMPILE_TYPE(u_int32_t, unsigned int)
 
 dnl checks for structures
 dnl checks for compiler characteristics
-dnl AC_C_BIGENDIAN
-AC_CHECK_HEADERS(endian.h)
+dnl AC_C_BIGENDIAN - No, check at compile time; Darwin can build for multiple
+dnl                  targets in one tree.
+AC_CHECK_HEADERS(endian.h machine/endian.h)
+dnl There's also sys/endian.h on IRIX, but we already check _MIPSE{L,B}.
 AC_C_CONST
 AC_CHECK_SIZEOF(int)
 
index 3ca9befe5b2eaad40049f48e8abc4269e996c35d..1ad22005c78990850c64daf6e104c7dd86f0af3f 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-07  Ken Raeburn  <raeburn@mit.edu>
+
+       * db-int.h: Include machine/endian.h if available.  Check for
+       __LITTLE_ENDIAN__ and __BIG_ENDIAN__, _MIPSEB and _MIPSEL.
+
 2004-05-05  Ken Raeburn  <raeburn@mit.edu>
 
        * db-int.h: Include stdlib.h, and endian.h if available.
index ddc2d47642dd921e8d9d6a3859789e9160655017..f50f6d0488852f524ca13d935fcfe78583af03d7 100644 (file)
 #ifdef HAVE_ENDIAN_H
 # include <endian.h>
 #endif
+#ifdef HAVE_MACHINE_ENDIAN_H
+# include <machine/endian.h>
+#endif
 /* Handle both BIG and LITTLE defined and BYTE_ORDER matches one, or
    just one defined; both with and without leading underscores.
 
    Ignore "PDP endian" machines, this code doesn't support them
    anyways.  */
 #if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && !defined(BYTE_ORDER)
+# ifdef __LITTLE_ENDIAN__
+#  define LITTLE_ENDIAN __LITTLE_ENDIAN__
+# endif
+# ifdef __BIG_ENDIAN__
+#  define BIG_ENDIAN __BIG_ENDIAN__
+# endif
+#endif
+#if !defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN) && !defined(BYTE_ORDER)
 # ifdef _LITTLE_ENDIAN
 #  define LITTLE_ENDIAN _LITTLE_ENDIAN
 # endif
 #  define BYTE_ORDER __BYTE_ORDER
 # endif
 #endif
+
+#if defined(_MIPSEL) && !defined(LITTLE_ENDIAN)
+# define LITTLE_ENDIAN
+#endif
+#if defined(_MIPSEB) && !defined(BIG_ENDIAN)
+# define BIG_ENDIAN
+#endif
+
 #if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) && defined(BYTE_ORDER)
 # if LITTLE_ENDIAN == BYTE_ORDER
 #  define DB_BYTE_ORDER DB_LITTLE_ENDIAN