macro SMB_VFS_NEXT_REWINDDIR
Doug VanLeuven
roamdad at sonic.net
Thu Dec 16 01:30:37 GMT 2004
gcc 3.3.3
AIX 5.2
compiler error:
modules/vfs_full_audit.c:842:50: macro "rewinddir" passed 3 arguments,
but takes just 1
line 842: SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp);
The only macro rewinddir I can find from system files:
/usr/include/sys/dir.h:#define rewinddir(__dirp)
seekdir((__dirp), (long)0)
So enclosing the entire (handle)->vfs_next.handles.rewinddir in
parenthesis seems to fix this.
There are a lot of these SMB_VFS macro definitions and perhaps all of
them should be parenthesized? Or am I misdirected?
Regards, Doug
Index: include/vfs_macros.h
===================================================================
--- include/vfs_macros.h (revision 3776)
+++ include/vfs_macros.h (working copy)
@@ -242,7 +242,7 @@
#define SMB_VFS_NEXT_READDIR(handle, conn, dirp)
((handle)->vfs_next.ops.readdir((handle)->vfs_next.handles.readdir,
(conn), (dirp)))
#define SMB_VFS_NEXT_SEEKDIR(handle, conn, dirp, offset)
((handle)->vfs_next.ops.seekdir((handle)->vfs_next.handles.seekdir,
(conn), (dirp), (offset)))
#define SMB_VFS_NEXT_TELLDIR(handle, conn, dirp)
((handle)->vfs_next.ops.telldir((handle)->vfs_next.handles.telldir,
(conn), (dirp)))
-#define SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp)
((handle)->vfs_next.ops.rewinddir((handle)->vfs_next.handles.rewinddir,
(conn), (dirp)))
+#define SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp)
(((handle)->vfs_next.ops.rewinddir)(((handle)->vfs_next.handles.rewinddir),
(conn), (dirp)))
#define SMB_VFS_NEXT_DIR(handle, conn, dirp)
((handle)->vfs_next.ops.readdir((handle)->vfs_next.handles.readdir,
(conn), (dirp)))
#define SMB_VFS_NEXT_MKDIR(handle, conn, path, mode)
((handle)->vfs_next.ops.mkdir((handle)->vfs_next.handles.mkdir,(conn),
(path), (mode)))
#define SMB_VFS_NEXT_RMDIR(handle, conn, path)
((handle)->vfs_next.ops.rmdir((handle)->vfs_next.handles.rmdir, (conn),
(path)))
More information about the samba-technical
mailing list