icl 64 bit platform rationalization
authorDerrick Brashear <shadow@dementia.org>
Tue, 2 Feb 2010 05:36:58 +0000 (00:36 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 2 Feb 2010 14:14:51 +0000 (06:14 -0800)
be consistent about how we apply 64 bit longness. right now we were
doing 3 different things. oops.

Change-Id: Ie48816852d5db916e3023ae6e3cd2f6298802668
Reviewed-on: http://gerrit.openafs.org/1200
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_icl.c

index 1f33bf7..435553d 100644 (file)
 struct afs_icl_set *afs_iclSetp = (struct afs_icl_set *)0;
 struct afs_icl_set *afs_iclLongTermSetp = (struct afs_icl_set *)0;
 
-#if defined(AFS_SGI61_ENV)
-/* For SGI 6.2, this can is changed to 1 if it's a 32 bit kernel. */
-#if defined(AFS_SGI62_ENV) && !defined(_K64U64)
-int afs_icl_sizeofLong = 1;
-#else
-int afs_icl_sizeofLong = 2;
-#endif /* SGI62 */
-#else
-#if defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)
-int afs_icl_sizeofLong = 2;
+/* Matches below where ICL_APPENDLONG is 2 INT32s */
+#if (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || defined(AFS_DARWIN_ENV) && defined(__amd64__)
+#define ICL_LONG 2
 #else
-int afs_icl_sizeofLong = 1;
-#endif
+#define ICL_LONG 1
 #endif
 
+int afs_icl_sizeofLong = ICL_LONG;
+
 int afs_icl_inited = 0;
 
 /* init function, called once, under afs_icl_lock */
@@ -540,7 +534,7 @@ afs_icl_AppendString(struct afs_icl_log *logp, char *astr)
         (lp)->logElements++; \
     MACRO_END
 
-#if (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) || defined(AFS_DARWIN_ENV) && defined(__amd64__)
+#if ICL_LONG == 2
 #define ICL_APPENDLONG(lp, x) \
     MACRO_BEGIN \
        ICL_APPENDINT32((lp), ((x) >> 32) & 0xffffffffL); \
@@ -600,7 +594,7 @@ afs_icl_AppendOne(struct afs_icl_log *logp, int type, long parm)
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) parm)[2]);
            ICL_APPENDINT32(logp, (afs_int32) ((afs_int32 *) parm)[3]);
        }
-#if (defined(AFS_SGI61_ENV) && (_MIPS_SZLONG==64)) || (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL))
+#if ICL_LONG == 2
        else if (type == ICL_TYPE_INT32)
            ICL_APPENDINT32(logp, (afs_int32) parm);
 #endif