The Samba-Bugzilla – Bug 478
vsnprintf overrides standard library function name
Last modified: 2005-08-24 10:26:10 UTC
It is a subtle defect with function:
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
which is defined in module lib/snprintf.c
If compiler is not compliant with C99, then this function is defined and
overrides standard implementation.
Defect happens when you try to link Samba library with any program which loads
standard libraries and uses standard vsnprintf. Solaris loads function only
once, so Samba appears to use _standard_ function, not which is defined in
Defect happens only if Samba library is loaded after program uses this
Simple workaround to this is to change the name of this function to something
int smb_vsnprintf (char *str, size_t count, const char *fmt, va_list args)
and then use
#define vsnprintf smb_vsnprintf
By the way, other "printf" functions are substituted in this (correct) way.
Fixed in SVN. Thanks for reporting!
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.