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 | 8d6b713c5d51bf9367c785239dea4ba8d11ae958 (patch) | |
tree | 8f7aa9131645b37949171b2a4be79dcd67862def /source3/lib | |
parent | 6dfbe2fa1a1d6eb5de05c8f5516c891abe7bdb74 (diff) | |
download | samba-8d6b713c5d51bf9367c785239dea4ba8d11ae958.tar.gz samba-8d6b713c5d51bf9367c785239dea4ba8d11ae958.tar.bz2 samba-8d6b713c5d51bf9367c785239dea4ba8d11ae958.zip |
got rid of some #ifdef LARGE_XXXX stuff and got rid of non-portable LL
suffix from some constants.
(This used to be commit 84956eddf32aa66c787ec76bdb60d2843fa7a025)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 886b6e4ac9..7c37d15bb9 100644 --- a/source3/lib/util.c +++ b/source3/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 */ |