summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-23 15:51:28 +0000
committerJeremy Allison <jra@samba.org>2002-08-23 15:51:28 +0000
commit9c31d189875c3d95e46df6210d70c48f202e3c4a (patch)
treead87720dc104d3e8d2aa21531afa871f70e8f1a9 /source3/include
parentd5dd9dcc3f2f7ca9c6ccbb0b2d193b165b3c0c76 (diff)
downloadsamba-9c31d189875c3d95e46df6210d70c48f202e3c4a.tar.gz
samba-9c31d189875c3d95e46df6210d70c48f202e3c4a.tar.bz2
samba-9c31d189875c3d95e46df6210d70c48f202e3c4a.zip
Merged initial allocation code for IFSTEST fix.
Jeremy. (This used to be commit 095e2bf9469a4c26814fb049f2870983c090ed81)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/config.h.in1
-rw-r--r--source3/include/smb.h1
-rw-r--r--source3/include/smb_macros.h3
3 files changed, 3 insertions, 2 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 4a138b6db6..8c06e25396 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -252,6 +252,7 @@
#undef HAVE_LDAP
#undef HAVE_STAT_ST_BLOCKS
#undef STAT_ST_BLOCKSIZE
+#undef HAVE_STAT_ST_BLKSIZE
#undef HAVE_DEVICE_MAJOR_FN
#undef HAVE_DEVICE_MINOR_FN
#undef HAVE_PASSWD_PW_COMMENT
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 9101e947a7..958a563642 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -391,6 +391,7 @@ typedef struct files_struct
BOOL delete_on_close;
SMB_OFF_T pos;
SMB_OFF_T size;
+ SMB_OFF_T initial_allocation_size; /* Faked up initial allocation on disk. */
mode_t mode;
uint16 vuid;
write_bmpx_struct *wbmpx_ptr;
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index a2351c705e..ccf151fab2 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -165,8 +165,7 @@
/* this is how errors are generated */
#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) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 )
+#define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x))
/* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2)