#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,
register struct AFS_FLOCK *af,
#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 >> 32) == 0x7fffffff)
+ if (af->l_len == OFFSET_MAX-1)
af->l_len = 0;
/* next line makes byte range locks always succeed,
* even when they should block */