summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/local.h3
-rw-r--r--source3/include/smb_macros.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index 53ef564610..84f5a3d1df 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -189,4 +189,7 @@
/* the maximum age in seconds of a password. Should be a lp_ parameter */
#define MAX_PASSWORD_AGE (21*24*60*60)
+/* Allocation roundup. */
+#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
+
#endif
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 42d66b676a..44b8c26da9 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -159,6 +159,7 @@
#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__)
#define SMB_ROUNDUP(x,g) (((x)+((g)-1))&~((g)-1))
+#define SMB_ROUNDUP_ALLOCATION(s) (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE)))
/* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
#define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2)