svn rev #22761: trunk/src/include/

raeburn@MIT.EDU raeburn at MIT.EDU
Tue Sep 15 02:17:18 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22761
Commit By: raeburn
Log Message:
ticket: 6565

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.


Changed Files:
U   trunk/src/include/k5-platform.h
Modified: trunk/src/include/k5-platform.h
===================================================================
--- trunk/src/include/k5-platform.h	2009-09-15 06:14:54 UTC (rev 22760)
+++ trunk/src/include/k5-platform.h	2009-09-15 06:17:17 UTC (rev 22761)
@@ -466,6 +466,10 @@
 # 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 @@
    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




More information about the cvs-krb5 mailing list