mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
STABLE14-java-lock-fix-200702310
make it portable. ugh. (cherry picked from commit 226c1ee8f9e24e199b2e2cf1ecc11dd072634450)
This commit is contained in:
parent
be0b74e0ce
commit
5bb24173fe
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user