Proposed change to the vfs.h to simplify call_xxx routines

Stefan (metze) Metzmacher metze at samba.org
Sun Dec 11 10:44:10 MST 2011


Hi Richard,

> here is a change I am proposing:
> 
> diff --git a/source3/include/vfs.h b/source3/include/vfs.h
> index d32aafd..7a7030a 100644
> --- a/source3/include/vfs.h
> +++ b/source3/include/vfs.h
> @@ -164,6 +164,11 @@ struct dfs_GetDFSReferral;
>                                 handle = handle->next; \
>                          }
> 
> +#define VFS_FIND_CALL(__fn__, ...) while (handle->fns->__fn__##_fn==NULL) {\
> +                                       handle=handle->next; \
> +                                  } \
> +                                  return handle->fns->__fn__##_fn(__VA_ARGS__);
> +

Not all compilers (with basic c99 support, also) support var args.
We need to think about that and decide that we don't want to drop
for such compilers.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111211/44178b35/attachment.pgp>


More information about the samba-technical mailing list