summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/aes
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2004-05-07 23:29:38 +0000
committerKen Raeburn <raeburn@mit.edu>2004-05-07 23:29:38 +0000
commit679265dc844ca7d460c6d0bc455c929cf9ddac5e (patch)
tree0c070b56f53c7a4b8cd36ebfc94f177a37a81edc /src/lib/crypto/aes
parenta077c3dc5257347e7a50b1761943876da4604318 (diff)
downloadkrb5-679265dc844ca7d460c6d0bc455c929cf9ddac5e.tar.gz
krb5-679265dc844ca7d460c6d0bc455c929cf9ddac5e.tar.xz
krb5-679265dc844ca7d460c6d0bc455c929cf9ddac5e.zip
* configure.in: Check for endian.h and machine/endian.h.
* 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
Diffstat (limited to 'src/lib/crypto/aes')
-rw-r--r--src/lib/crypto/aes/ChangeLog7
-rw-r--r--src/lib/crypto/aes/aesopt.h19
2 files changed, 20 insertions, 6 deletions
diff --git a/src/lib/crypto/aes/ChangeLog b/src/lib/crypto/aes/ChangeLog
index 24f31a5db..9e91cafd0 100644
--- a/src/lib/crypto/aes/ChangeLog
+++ b/src/lib/crypto/aes/ChangeLog
@@ -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.
diff --git a/src/lib/crypto/aes/aesopt.h b/src/lib/crypto/aes/aesopt.h
index 53fa4d56d..da5c83be2 100644
--- a/src/lib/crypto/aes/aesopt.h
+++ b/src/lib/crypto/aes/aesopt.h
@@ -176,13 +176,18 @@
# 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
@@ -231,10 +236,12 @@
#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