From 5bb24173fef1ff44103107b658d0557caab3d8e4 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Sat, 10 Mar 2007 16:08:08 +0000 Subject: [PATCH] STABLE14-java-lock-fix-200702310 make it portable. ugh. (cherry picked from commit 226c1ee8f9e24e199b2e2cf1ecc11dd072634450) --- src/afs/VNOPS/afs_vnop_flock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/afs/VNOPS/afs_vnop_flock.c b/src/afs/VNOPS/afs_vnop_flock.c index 77f91039c2..414f45593e 100644 --- a/src/afs/VNOPS/afs_vnop_flock.c +++ b/src/afs/VNOPS/afs_vnop_flock.c @@ -26,9 +26,9 @@ RCSID #include "afs/afs_osidnlc.h" #include "afs/unified_afs.h" -#ifndef OFFSET_MAX -#define OFFSET_MAX 0x7fffffffffffffff -#endif + + + /* Static prototypes */ static int HandleGetLock(register struct vcache *avc, @@ -553,7 +553,7 @@ int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd, #endif /* Java VMs ask for l_len=(long)-1 regardless of OS/CPU; bottom 32 bits * sometimes get masked off by OS */ - if (af->l_len == OFFSET_MAX-1) + if ((sizeof(af->l_len) == 8) && (af->l_len == 0x7ffffffffffffffe)) af->l_len = 0; /* next line makes byte range locks always succeed, * even when they should block */