vsnprintf and snprintf not detected ...

Richard Sharpe rsharpe at ns.aus.com
Thu Jul 11 11:03:03 GMT 2002


On Fri, 12 Jul 2002, Richard Sharpe wrote:

> On Thu, 11 Jul 2002, Ernst Cozijnsen wrote:
> 
> > It also happens without the --with-fhs option
> 
> It sounds like a general failure to detect the presence of those two 
> routines in the configure script.
> 
> > If its a failure to who should i turn for a fix?
> 
> Well, if you feel comfortable hacking configure.in, you could look at it 
> yourself.
> 
> The next thing to do is to look at those source files and find if the 
> definitions of snprintf and vsnprintf are protected by an ifdef, ie:
> 
> #ifdef NEED_SNPRINTF

Ok, lib/snprintf.c has:

#if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && \
defined(HAVE_C99_VSNPRINTF)
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
#include <stdio.h>
 /* make the compiler happy with an empty file */
 void dummy_snprintf(void) {} 
#else

Which suggests that configure did not set those variables for some reason. 
You need all of them.

You should look in includes/config.h to see what they are set to.

Then check your config.cache for similar symbols. You should find one of 
them set to no, I suspect. Then you might want to delete config.cache and 
rerun runfigure and check config.log for snprintf and see which one of 
those tests failed. 
 
> or something like that, and if so, modify config.h to change the 
> definition of that macro. However, you might also have to run 'make 
> proto'.
> 
> This is off the top of my head, so I make no guarantees that it will 
> work. 
> 
> If no one else suggests anything better by the time I get to work, I might 
> look at it further :-)
> 
> Regards
> -----
> Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org, 
> sharpe at ethereal.com
> 
> 

-- 
Regards
-----
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org, 
sharpe at ethereal.com





More information about the samba-technical mailing list