summaryrefslogtreecommitdiff
path: root/source3/include/includes.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-09-18 03:00:20 +0000
committerAndrew Tridgell <tridge@samba.org>1998-09-18 03:00:20 +0000
commitc7da9992cb39fc84a6a915dd2158beaf5e616617 (patch)
tree73f84eb8340e52b0362b3c7f84710062114194e4 /source3/include/includes.h
parentfdc07d1417274d10038da83cee2ea718e6a7abec (diff)
downloadsamba-c7da9992cb39fc84a6a915dd2158beaf5e616617.tar.gz
samba-c7da9992cb39fc84a6a915dd2158beaf5e616617.tar.bz2
samba-c7da9992cb39fc84a6a915dd2158beaf5e616617.zip
gto ri of a bunch more #ifdef LARGE_SMB_OFF_T checks by introducing a
SOFF_T() macro for setting an SMB_OFF_T variable also limited mmap based reads to MAX_MMAP_SIZE. We really can't mmap 2^50 bytes due to virtual address space problems. (This used to be commit 4e784b18899eddd2399a51fa7d8c219560432922)
Diffstat (limited to 'source3/include/includes.h')
-rw-r--r--source3/include/includes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 0f0bbdd89b..9b6e6266dc 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -353,6 +353,14 @@
#define SMB_OFF_T_BITS (sizeof(SMB_OFF_T)*8)
+
+#ifdef LARGE_SMB_OFF_T
+#define SOFF_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
+#else
+#define SOFF_T(p, ofs, v) SIVAL(p,ofs,v)
+#endif
+
+
/*
* Set the define that tells us if we can do 64 bit
* NT SMB calls.