}
#ifdef AFS_LINUX20_ENV
+
struct afs_md5 {
unsigned int sz[2];
afs_int32 counter[4];
* From `Performance analysis of MD5' by Joseph D. Touch <touch@isi.edu>
*/
-#if defined(AFSBIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
static inline afs_uint32
swap_u_int32_t (afs_uint32 t)
{
p += l;
len -= l;
if(offset == 64){
-#if defined(AFSBIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN)
int i;
- afs_uint32 current[16];
- struct x32 *u = (struct x32*)m->save;
+ afs_uint32 temp[16];
+ struct x32 *us = (struct x32*)m->save;
for(i = 0; i < 8; i++){
- current[2*i+0] = swap_u_int32_t(u[i].a);
- current[2*i+1] = swap_u_int32_t(u[i].b);
+ temp[2*i+0] = swap_u_int32_t(us[i].a);
+ temp[2*i+1] = swap_u_int32_t(us[i].b);
}
- calc(m, current);
+ calc(m, temp);
#else
calc(m, (afs_uint32*)m->save);
#endif
struct afs_md5 ct;
if (afs_new_inum) {
- MD5_Init(&ct);
- MD5_Update(&ct, &volume, 4);
- MD5_Update(&ct, &vnode, 4);
- MD5_Final(digest, &ct);
+ AFS_MD5_Init(&ct);
+ AFS_MD5_Update(&ct, &volume, 4);
+ AFS_MD5_Update(&ct, &vnode, 4);
+ AFS_MD5_Final(digest, &ct);
memcpy(&ino, digest, sizeof(ino_t));
} else {
ino = (volume << 16) + vnode;
}
return ino;
}
+
#else
+
afs_int32 afs_calc_inum (afs_int32 volume, afs_int32 vnode)
{
return (volume << 16) + vnode;
}
+
#endif