diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-09-18 02:21:07 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-09-18 02:21:07 +0000 |
commit | 84956eddf32aa66c787ec76bdb60d2843fa7a025 (patch) | |
tree | 8551d7a652a409df80f9d0bf62799bb4f2cb8a56 /source/lib | |
parent | 14c134e8316687aa5a4ee089c2acfa6428faceae (diff) | |
download | samba-84956eddf32aa66c787ec76bdb60d2843fa7a025.tar.gz samba-84956eddf32aa66c787ec76bdb60d2843fa7a025.tar.xz samba-84956eddf32aa66c787ec76bdb60d2843fa7a025.zip |
got rid of some #ifdef LARGE_XXXX stuff and got rid of non-portable LL
suffix from some constants.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 886b6e4ac91..7c37d15bb99 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -4471,11 +4471,8 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) int ret; if(lp_ole_locking_compat()) { -#ifdef LARGE_SMB_OFF_T - SMB_OFF_T mask = 0xC000000000000000LL; -#else - SMB_OFF_T mask = 0xC0000000; -#endif + SMB_OFF_T mask = ((SMB_OFF_T)0xC) << (SMB_OFF_T_BITS-4); + SMB_OFF_T mask2= ((SMB_OFF_T)0x3) << (SMB_OFF_T_BITS-4); /* make sure the count is reasonable, we might kill the lockd otherwise */ count &= ~mask; @@ -4485,17 +4482,9 @@ BOOL fcntl_lock(int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type) still allows OLE2 apps to operate, but should stop lockd from dieing */ if ((offset & mask) != 0) -#ifdef LARGE_SMB_OFF_T - offset = (offset & ~mask) | (((offset & mask) >> 2) & 0x3000000000000000LL); -#else - offset = (offset & ~mask) | (((offset & mask) >> 2) & 0x30000000); -#endif + offset = (offset & ~mask) | (((offset & mask) >> 2) & mask2); } else { -#ifdef LARGE_SMB_OFF_T - SMB_OFF_T mask = 0x8000000000000000LL; -#else - SMB_OFF_T mask = 0x80000000; -#endif + SMB_OFF_T mask = ((SMB_OFF_T)0x8) << (SMB_OFF_T_BITS-4); SMB_OFF_T neg_mask = ~mask; /* interpret negative counts as large numbers */ |