summaryrefslogtreecommitdiffstats
path: root/src/util/db2/include
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-05-07 23:26:43 +0000
committerKen Raeburn <raeburn@mit.edu>2004-05-07 23:26:43 +0000
commita077c3dc5257347e7a50b1761943876da4604318 (patch)
treea0fc366cb577992661981d97a2c810ac923774a8 /src/util/db2/include
parentd913447cbdfe73bf3155376807fe3f106ab2ddde (diff)
* configure.in: Check for machine/endian.h too.
* 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
Diffstat (limited to 'src/util/db2/include')
-rw-r--r--src/util/db2/include/ChangeLog5
-rw-r--r--src/util/db2/include/db-int.h19
2 files changed, 24 insertions, 0 deletions
diff --git a/src/util/db2/include/ChangeLog b/src/util/db2/include/ChangeLog
index 3ca9befe5..1ad22005c 100644
--- a/src/util/db2/include/ChangeLog
+++ b/src/util/db2/include/ChangeLog
@@ -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.
diff --git a/src/util/db2/include/db-int.h b/src/util/db2/include/db-int.h
index ddc2d4764..f50f6d048 100644
--- a/src/util/db2/include/db-int.h
+++ b/src/util/db2/include/db-int.h
@@ -48,12 +48,23 @@
#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
@@ -75,6 +86,14 @@
# 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