From: Derrick Brashear Date: Tue, 2 Feb 2010 05:36:58 +0000 (-0500) Subject: icl 64 bit platform rationalization X-Git-Tag: openafs-devel-1_5_72~68 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=248da50aa56f19bdc8b2b322f5e17b3d2a363dce icl 64 bit platform rationalization 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 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c index 1f33bf7..435553d 100644 --- a/src/afs/afs_icl.c +++ b/src/afs/afs_icl.c @@ -32,21 +32,15 @@ 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