libsmbclient.h change breaks API

tridge at samba.org tridge at samba.org
Wed Oct 5 06:26:10 GMT 2005


Andrew,

 > Your change in -r 8093 to libsmbclient.h in SAMBA_3_0 had an unwanted
 > side-effect.  While 'close' is a poor name for a structure member, it is
 > part of the public API for libsmbclient.  

note that this change should not have broken binary compatibility, as
the shape of the structure didn't change.

 > I noticed this because I wanted to recompile the perl module
 > FileSys::SmbClient 3.0 against the new Samba I just installed.  

yes, it will break source compatibility. There is a good reason for it
tho, as 'close' can be a macro on some systems.

How about this as a workaround - add the following into
libsmbclient.h:

#ifndef close
#define close close_fn
#endif

that will retain both source and binary compatibility on systems where
libsmbclient worked before, and will allow systems that define close
as a macro to work as well.

Cheers, Tridge


More information about the samba-technical mailing list