]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-endian-fixes-20060802
authorDerrick Brashear <shadow@dementia.org>
Wed, 2 Aug 2006 20:06:56 +0000 (20:06 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 2 Aug 2006 20:06:56 +0000 (20:06 +0000)
macos needs us to do weird stuff so -arch i386 -arch ppc works

(cherry picked from commit fd099b3e763b6b2c5bfb87db0cae8a900f031ad3)

acconfig.h
configure.in
src/afs/afs_call.c
src/cf/bigendian.m4
src/rxkad/bg-fcrypt.c
src/rxkad/domestic/fcrypt.c
src/rxkad/md4.c
src/rxkad/md5.c
src/venus/kdump.c

index 2aa1daeb53038cfde018d345dde062e308f224ce..e1950309728f40f94e2407a1cae96aa748fe68d4 100644 (file)
@@ -8,15 +8,30 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #undef HAVE_RES_SEARCH
 #undef HAVE_SOCKET
 #undef STRUCT_SOCKADDR_HAS_SA_LEN
-#if ENDIANESS_IN_SYS_PARAM_H
-# ifndef KERNEL
-#  include <sys/types.h>
-#  include <sys/param.h>
-#  if BYTE_ORDER == BIG_ENDIAN
-#  define WORDS_BIGENDIAN 1
+#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
+# if ENDIANESS_IN_SYS_PARAM_H
+#  ifndef KERNEL
+#   include <sys/types.h>
+#   include <sys/param.h>
+#   if BYTE_ORDER == BIG_ENDIAN
+#   define WORDS_BIGENDIAN 1
+#   endif
+#  endif
+# else
+#  if defined(AUTOCONF_FOUND_BIGENDIAN)
+#   define WORDS_BIGENDIAN 1
+#  else
+#   undef WORDS_BIGENDIAN
 #  endif
 # endif
+#else
+#if defined(__BIG_ENDIAN__)
+#define WORDS_BIGENDIAN 1
+#else
+#undef WORDS_BIGENDIAN
+#endif
 #endif
+
 #undef AFS_AFSDB_ENV
 #undef AFS_LARGEFILE_ENV
 #undef AFS_NAMEI_ENV
index 57a19fa09e4e0288bd83f34e79c58272a32d59cb..c08a3b2a6ff81d5ccbf19c39b66aba359007a589 100644 (file)
@@ -53,8 +53,8 @@ src/kauth/Makefile \
 src/kauth/test/Makefile \
 src/libacl/Makefile \
 src/libacl/test/Makefile \
-src/libadmin/adminutil/Makefile \
 src/libadmin/Makefile \
+src/libadmin/adminutil/Makefile \
 src/libadmin/bos/Makefile \
 src/libadmin/cfg/Makefile \
 src/libadmin/cfg/test/Makefile \
@@ -113,8 +113,8 @@ src/tviced/Makefile \
 src/tvolser/Makefile \
 src/ubik/Makefile \
 src/update/Makefile \
-src/usd/test/Makefile \
 src/usd/Makefile \
+src/usd/test/Makefile \
 src/uss/Makefile \
 src/util/Makefile \
 src/util/test/Makefile \
index ed8f9708857db0d1d8a7efb4ef4d3938174f4e46..b2b90ed5c10d4610394c8005235f1b92ef0d3050 100644 (file)
@@ -2393,7 +2393,7 @@ afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
            ICL_APPENDINT32(logp,
                            (afs_int32) ((struct afs_hyper_t *)p1)->low);
        } else if (t1 == ICL_TYPE_INT64) {
-#ifdef AFSLITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
 #ifdef AFS_64BIT_CLIENT
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[1]);
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p1)[0]);
@@ -2433,7 +2433,7 @@ afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
            ICL_APPENDINT32(logp,
                            (afs_int32) ((struct afs_hyper_t *)p2)->low);
        } else if (t2 == ICL_TYPE_INT64) {
-#ifdef AFSLITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
 #ifdef AFS_64BIT_CLIENT
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[1]);
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p2)[0]);
@@ -2473,7 +2473,7 @@ afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
            ICL_APPENDINT32(logp,
                            (afs_int32) ((struct afs_hyper_t *)p3)->low);
        } else if (t3 == ICL_TYPE_INT64) {
-#ifdef AFSLITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
 #ifdef AFS_64BIT_CLIENT
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[1]);
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p3)[0]);
@@ -2513,7 +2513,7 @@ afs_icl_AppendRecord(register struct afs_icl_log *logp, afs_int32 op,
            ICL_APPENDINT32(logp,
                            (afs_int32) ((struct afs_hyper_t *)p4)->low);
        } else if (t4 == ICL_TYPE_INT64) {
-#ifdef AFSLITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
 #ifdef AFS_64BIT_CLIENT
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[1]);
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) p4)[0]);
index 4e92ff640fd2a6b879c5d772be4ee93aaa4565ea..f8250cf02a9f91242cbd60de294801ce98c2e309 100644 (file)
@@ -45,7 +45,7 @@ AC_CACHE_CHECK(whether byte ordering is bigendian, openafs_cv_c_bigendian,[
   fi
 ])
 if test "$openafs_cv_c_bigendian" = "yes"; then
-  AC_DEFINE(WORDS_BIGENDIAN, 1, [define if target is big endian])dnl
+  AC_DEFINE(AUTOCONF_FOUND_BIGENDIAN, 1, [define if target is big endian])dnl
 fi
 if test "$openafs_cv_c_bigendian_compile" = "yes"; then
   AC_DEFINE(ENDIANESS_IN_SYS_PARAM_H, 1, [define if sys/param.h defines the endiness])dnl
index 0c3cabc8f58d07a60b280e85b2c312799acbbf53..35a8380cb6320555b147b20ffea466a7c849166e 100644 (file)
@@ -76,11 +76,6 @@ RCSID
 #include "private_data.h"
 #include <des/stats.h>
 
-#undef WORDS_BIGENDIAN
-#ifdef AFSBIG_ENDIAN
-#define WORDS_BIGENDIAN 1
-#endif
-
 /*
  * Unrolling of the inner loops helps the most on pentium chips
  * (ca 18%). On risc machines only expect a modest improvement (ca 5%).
index 35e69371f6b855babc697da24edca10bbf7b3bbc..8d1884da6314936cc69c081cd6ff9a270be4665a 100644 (file)
@@ -120,7 +120,7 @@ fc_ecb_encrypt(void * clear, void * cipher,
     volatile unsigned char *Schar = (unsigned char *)&S;
     int i;
 
-#if defined(vax) || (defined(mips) && defined(MIPSEL)) || defined(AFSLITTLE_ENDIAN)
+#ifndef WORDS_BIGENDIAN
 #define Byte0 3
 #define Byte1 2
 #define Byte2 1
index 7bc3cee3836042cd70781c112e084a498a12b35a..6844caf78132483638e99bd0c61a1cff7e6b5378 100644 (file)
 
 RCSID("$Id$");
 
-#undef WORDS_BIGENDIAN
-#ifdef AFSBIG_ENDIAN
-#define WORDS_BIGENDIAN 1
-#endif
+
+
+
+
 
 #include "md4.h"
 #include "hash.h"
index 7b3b4b79fc58bff3651d47e55f541b962d989d73..397023bb42c1c9286725fd9c2f202e63e6ff3b72 100644 (file)
 
 RCSID("$Id$");
 
-#undef WORDS_BIGENDIAN
-#ifdef AFSBIG_ENDIAN
-#define WORDS_BIGENDIAN 1
-#endif
+
+
+
+
 
 #include "md5.h"
 #include "hash.h"
index ceeb8ce3811ded45724c553168117927335e7407..67c689aafe69953ae568d7a9a967dfe36e326791 100644 (file)
@@ -288,7 +288,7 @@ typedef struct timeval {
     int tv_usec;
 } timeval_t;                   /* Needed here since KERNEL defined. */
 #endif /*AFS_ALPHA_LINUX20_ENV */
-#if defined(AFSBIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
 #define _LINUX_BYTEORDER_BIG_ENDIAN_H
 #else
 #define _LINUX_BYTEORDER_LITTLE_ENDIAN_H