* configure.in: Check for endian.h and machine/endian.h.
authorKen Raeburn <raeburn@mit.edu>
Fri, 7 May 2004 23:29:38 +0000 (23:29 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 7 May 2004 23:29:38 +0000 (23:29 +0000)
* aes/aesopt.h (PLATFORM_BYTE_ORDER): Check for _MIPSEB, _MIPSEL.  If endian.h
or machine/endian.h is available, include it instead of sys/param.h.  Don't
mess around with multibyte character constants.

ticket: 2551
status: open

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

src/lib/crypto/ChangeLog
src/lib/crypto/aes/ChangeLog
src/lib/crypto/aes/aesopt.h
src/lib/crypto/configure.in

index 53f926e191bdc941e712b4432313608932d50bef..da01ad96cf1c3267ed41374ac800eba82d4c4571 100644 (file)
@@ -1,3 +1,7 @@
+2004-05-07  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Check for endian.h and machine/endian.h.
+
 2004-04-30  Ken Raeburn  <raeburn@mit.edu>
 
        * crypto_libinit.c (initialized): Variable deleted.
index 24f31a5db846a8de882a029f4091ab9be6ca882c..9e91cafd0387af2a92df39f184ff95a20151e6fd 100644 (file)
@@ -1,3 +1,10 @@
+2004-05-07  Ken Raeburn  <raeburn@mit.edu>
+
+       * aesopt.h (PLATFORM_BYTE_ORDER): Check for _MIPSEB, _MIPSEL.  If
+       endian.h or machine/endian.h is available, include it instead of
+       sys/param.h.  Don't mess around with multibyte character
+       constants.
+
 2003-07-17  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LIBNAME) [##WIN16##]: Don't define.
index 53fa4d56db1e4c1ce4ce46cd88b4cd8eadbfa198..da5c83be2aa46a894cc7ea44499892cded327943 100644 (file)
 #  endif
 #elif defined(_MSC_VER)
 #  include <stdlib.h>
+#elif defined(_MIPSEB)
+#  define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN
+#elif defined(_MIPSEL)
+#  define PLATFORM_BYTE_ORDER AES_LITTLE_ENDIAN
 #elif !defined(WIN32)
 #  include <stdlib.h>
-#undef _ENDIAN_H /* XXX */
-#  if !defined (_ENDIAN_H)
-#    include <sys/param.h>
+#  if defined(HAVE_ENDIAN_H)
+#    include <endian.h>
+#  elif defined(HAVE_MACHINE_ENDIAN_H)
+#    include <machine/endian.h>
 #  else
-#    include _ENDIAN_H
+#    include <sys/param.h>
 #  endif
 #endif
 
 #define PLATFORM_BYTE_ORDER AES_LITTLE_ENDIAN
 #elif 0     /* **** EDIT HERE IF NECESSARY **** */
 #define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN
-#elif (('1234' >> 24) == '1')
+#else
+# error "barf"
+/*#elif (('1234' >> 24) == '1')
 #  define PLATFORM_BYTE_ORDER AES_LITTLE_ENDIAN
 #elif (('4321' >> 24) == '1')
-#  define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN
+#  define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN*/
 #endif
 #endif
 
index 8e144fa1c7ff1baa8dbffdc97bb2d6e1a2e212cc..2f590b00df9217175e5a8b0b9f28e2d4ce1b2024 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT(configure.in)
 CONFIG_RULES
 
-AC_CHECK_HEADERS(memory.h unistd.h)
+AC_CHECK_HEADERS(memory.h unistd.h endian.h machine/endian.h)
 
 KRB5_RUN_FLAGS
 KRB5_BUILD_PROGRAM