diff options
author | Ken Raeburn <raeburn@mit.edu> | 2009-09-15 06:17:17 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2009-09-15 06:17:17 +0000 |
commit | 66f4ea3db7a9c1eb278b035fdae8ebea7636edb9 (patch) | |
tree | 95fcc3ed28a3b1ed0c258013ecbe319851233f85 | |
parent | d0cf89ecb9a86ce422a6bdf33fb763aa0ad1154f (diff) | |
download | krb5-66f4ea3db7a9c1eb278b035fdae8ebea7636edb9.zip krb5-66f4ea3db7a9c1eb278b035fdae8ebea7636edb9.tar.gz krb5-66f4ea3db7a9c1eb278b035fdae8ebea7636edb9.tar.bz2 |
Check __BIG_ENDIAN__ and __LITTLE_ENDIAN__ to determine endianness.
In fallback code, check ia64 platforms for hpux vs everything else;
HP-UX uses big-endian mode.
ticket: 6565
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22761 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/include/k5-platform.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/k5-platform.h b/src/include/k5-platform.h index fd0bb21..8266b3b 100644 --- a/src/include/k5-platform.h +++ b/src/include/k5-platform.h @@ -466,6 +466,10 @@ typedef struct { int error; unsigned char did_run; } k5_init_t; # define K5_BE #elif defined(_LITTLE_ENDIAN) # define K5_LE +#elif defined(__BIG_ENDIAN__) || !defined(__LITTLE_ENDIAN__) +# define K5_BE +#elif defined(__LITTLE_ENDIAN__) || !defined(__BIG_ENDIAN__) +# define K5_LE #endif #if !defined(K5_BE) && !defined(K5_LE) /* Look for some architectures we know about. @@ -480,10 +484,10 @@ typedef struct { int error; unsigned char did_run; } k5_init_t; As far as I know, only PDP11 and ARM (which we don't handle here) have strange byte orders where an 8-byte value isn't laid out as either 12345678 or 87654321. */ -# if defined(__i386__) || defined(_MIPSEL) || defined(__alpha__) || defined(__ia64__) +# if defined(__i386__) || defined(_MIPSEL) || defined(__alpha__) || (defined(__ia64__) && !defined(__hpux)) # define K5_LE # endif -# if defined(__hppa__) || defined(__rs6000__) || defined(__sparc__) || defined(_MIPSEB) || defined(__m68k__) || defined(__sparc64__) || defined(__ppc__) || defined(__ppc64__) +# if defined(__hppa__) || defined(__rs6000__) || defined(__sparc__) || defined(_MIPSEB) || defined(__m68k__) || defined(__sparc64__) || defined(__ppc__) || defined(__ppc64__) || (defined(__hpux) && defined(__ia64__)) # define K5_BE # endif #endif |