summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-09-05 12:53:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:30 -0500
commit274e35f36e55ff215cef26d44d35627cb9c97924 (patch)
tree53756643c4b614f0fc50ddfacb05a9e25f41cc27 /source3
parent3edc4c6f660105a979b8ba0876e68bba0d49fa4e (diff)
downloadsamba-274e35f36e55ff215cef26d44d35627cb9c97924.tar.gz
samba-274e35f36e55ff215cef26d44d35627cb9c97924.tar.bz2
samba-274e35f36e55ff215cef26d44d35627cb9c97924.zip
r24969: Fwd port "open" patch
(This used to be commit 113d62682ae8b045ff0132a743a32f3bc4856d54)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/vfs_macros.h6
-rw-r--r--source3/libsmb/libsmb_compat.c2
-rw-r--r--source3/libsmb/libsmbclient.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index ac22ff5204..7e161c3c9b 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -46,7 +46,7 @@
#define SMB_VFS_CLOSEDIR(conn, dir) ((conn)->vfs.ops.closedir((conn)->vfs.handles.closedir, dir))
/* File operations */
-#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs.ops.open((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs.ops.open)((conn)->vfs.handles.open, (fname), (fsp), (flags), (mode)))
#define SMB_VFS_CLOSE(fsp, fd) ((fsp)->conn->vfs.ops.close_fn((fsp)->conn->vfs.handles.close_hnd, (fsp), (fd)))
#define SMB_VFS_READ(fsp, fd, data, n) ((fsp)->conn->vfs.ops.read((fsp)->conn->vfs.handles.read, (fsp), (fd), (data), (n)))
#define SMB_VFS_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs.ops.pread((fsp)->conn->vfs.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -164,7 +164,7 @@
#define SMB_VFS_OPAQUE_CLOSEDIR(conn, dir) ((conn)->vfs_opaque.ops.closedir((conn)->vfs_opaque.handles.closedir, dir))
/* File operations */
-#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) ((conn)->vfs_opaque.ops.open((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_OPAQUE_OPEN(conn, fname, fsp, flags, mode) (((conn)->vfs_opaque.ops.open)((conn)->vfs_opaque.handles.open, (fname), (fsp), (flags), (mode)))
#define SMB_VFS_OPAQUE_CLOSE(fsp, fd) ((fsp)->conn->vfs_opaque.ops.close_fn((fsp)->conn->vfs_opaque.handles.close_hnd, (fsp), (fd)))
#define SMB_VFS_OPAQUE_READ(fsp, fd, data, n) ((fsp)->conn->vfs_opaque.ops.read((fsp)->conn->vfs_opaque.handles.read, (fsp), (fd), (data), (n)))
#define SMB_VFS_OPAQUE_PREAD(fsp, fd, data, n, off) ((fsp)->conn->vfs_opaque.ops.pread((fsp)->conn->vfs_opaque.handles.pread, (fsp), (fd), (data), (n), (off)))
@@ -283,7 +283,7 @@
#define SMB_VFS_NEXT_CLOSEDIR(handle, dir) ((handle)->vfs_next.ops.closedir((handle)->vfs_next.handles.closedir, dir))
/* File operations */
-#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) ((handle)->vfs_next.ops.open((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
+#define SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode) (((handle)->vfs_next.ops.open)((handle)->vfs_next.handles.open, (fname), (fsp), (flags), (mode)))
#define SMB_VFS_NEXT_CLOSE(handle, fsp, fd) ((handle)->vfs_next.ops.close_fn((handle)->vfs_next.handles.close_hnd, (fsp), (fd)))
#define SMB_VFS_NEXT_READ(handle, fsp, fd, data, n) ((handle)->vfs_next.ops.read((handle)->vfs_next.handles.read, (fsp), (fd), (data), (n)))
#define SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, n, off) ((handle)->vfs_next.ops.pread((handle)->vfs_next.handles.pread, (fsp), (fd), (data), (n), (off)))
diff --git a/source3/libsmb/libsmb_compat.c b/source3/libsmb/libsmb_compat.c
index e0f2a90bd6..d6c2fe2109 100644
--- a/source3/libsmb/libsmb_compat.c
+++ b/source3/libsmb/libsmb_compat.c
@@ -156,7 +156,7 @@ int smbc_open(const char *furl, int flags, mode_t mode)
SMBCFILE * file;
int fd;
- file = statcont->open(statcont, furl, flags, mode);
+ file = (statcont->open)(statcont, furl, flags, mode);
if (!file)
return -1;
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index f903f37d14..b6b4119ff4 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -5971,7 +5971,7 @@ smbc_open_print_job_ctx(SMBCCTX *context,
/* What if the path is empty, or the file exists? */
- return context->open(context, fname, O_WRONLY, 666);
+ return (context->open)(context, fname, O_WRONLY, 666);
}
@@ -6012,7 +6012,7 @@ smbc_print_file_ctx(SMBCCTX *c_file,
/* Try to open the file for reading ... */
- if ((long)(fid1 = c_file->open(c_file, fname, O_RDONLY, 0666)) < 0) {
+ if ((long)(fid1 = (c_file->open)(c_file, fname, O_RDONLY, 0666)) < 0) {
DEBUG(3, ("Error, fname=%s, errno=%i\n", fname, errno));
return -1; /* smbc_open sets errno */