macro SMB_VFS_NEXT_REWINDDIR

Alexander Bokovoy ab at samba.org
Thu Dec 16 09:40:55 GMT 2004


On Wed, Dec 15, 2004 at 07:48:25PM -0800, Doug VanLeuven wrote:
> Doug VanLeuven wrote:
> 
> >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?
> 
> I was working from svn 3776 and missed 3844, but depending on the CFLAGS 
> in force during compiles, I could still have macros for readdir, 
> seekdir, and telldir.  So the question still stands - Shouldn't the 
> SMB_VFS macros parenthesize the handle field name to avoid any conflict?
I would parenthesize them, too. This is part of defensive programming and
always a good way to go.

Willing to produce a patch?
-- 
/ Alexander Bokovoy
Samba Team                      http://www.samba.org/
ALT Linux Team                  http://www.altlinux.org/
Midgard Project Ry              http://www.midgard-project.org/


More information about the samba-technical mailing list