From: Ken Raeburn Date: Fri, 7 May 2004 23:29:38 +0000 (+0000) Subject: * configure.in: Check for endian.h and machine/endian.h. X-Git-Tag: krb5-1.4-beta1~422 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=679265dc844ca7d460c6d0bc455c929cf9ddac5e;p=krb5.git * 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 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 53f926e19..da01ad96c 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,7 @@ +2004-05-07 Ken Raeburn + + * configure.in: Check for endian.h and machine/endian.h. + 2004-04-30 Ken Raeburn * crypto_libinit.c (initialized): Variable deleted. 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 + + * 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 * 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 +#elif defined(_MIPSEB) +# define PLATFORM_BYTE_ORDER AES_BIG_ENDIAN +#elif defined(_MIPSEL) +# define PLATFORM_BYTE_ORDER AES_LITTLE_ENDIAN #elif !defined(WIN32) # include -#undef _ENDIAN_H /* XXX */ -# if !defined (_ENDIAN_H) -# include +# if defined(HAVE_ENDIAN_H) +# include +# elif defined(HAVE_MACHINE_ENDIAN_H) +# include # else -# include _ENDIAN_H +# include # 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 diff --git a/src/lib/crypto/configure.in b/src/lib/crypto/configure.in index 8e144fa1c..2f590b00d 100644 --- a/src/lib/crypto/configure.in +++ b/src/lib/crypto/configure.in @@ -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