A small patch for C++ VFS modules.

Ben Martin monkeyiq at users.sourceforge.net
Sat Jun 25 07:12:04 GMT 2005

On Fri, 2005-06-24 at 13:26 -0700, Jeremy Allison wrote:
> On Fri, Jun 24, 2005 at 11:23:40AM +1000, Ben Martin wrote:
> > 
> > OK, I had started doing it this way and reverted to header only. I'm
> > happy to resubmit with the more intrusive versions. 
> You shouldn't need to. In order to make it easier for people to write
> modules in C++ I've fixed our headers and code to make it C++ friendly.
> Checkout SAMBA_3_0 svn and please let me know it I missed anything.
> Jeremy.

Excellent stuff! 

One minor thing: include/smb_acls.h 

.../source/include/smb_acls.h:262: error: conflicting declaration 'typedef struct SMB_ACL_T* SMB_ACL_T'
.../source/include/smb_acls.h:260: error: 'struct SMB_ACL_T' has a previous declaration as 'struct SMB_ACL_T'
.../source/include/smb_acls.h:266: error: conflicting declaration 'typedef struct SMB_ACL_ENTRY_T* SMB_ACL_ENTRY_T'
.../source/include/smb_acls.h:264: error: 'struct SMB_ACL_ENTRY_T' has a previous declaration as 'struct SMB_ACL_ENTRY 

C++ seems to think that you are typedef'ing a pointer to the struct to
be the same as the struct itself. Once these are guarded like the below
then all is well, though there is probably a much cleaner way to do
this. For my C++ eyes it does appear the typedef as it stands is rather
self referential.

#ifdef __cplusplus
typedef struct {
typedef struct SMB_ACL_T {
	int dummy;

#ifdef __cplusplus
    typedef struct {
    typedef struct SMB_ACL_ENTRY_T {
	int dummy;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20050625/3707cb73/attachment.bin

More information about the samba-technical mailing list