Skip to main content.
home | support | download

Back to List Archive

Re: Autoconf change for swish-e-2.1.8

From: <jmruiz(at)not-real.boe.es>
Date: Wed Nov 15 2000 - 11:59:01 GMT
Hi Bas

If I can, I will try to change them for ANSI ones.

vsnprintf is just used once and can be easily changed for snprintf.

cu
Jose

On 15 Nov 2000, at 3:02, Bas Meijer wrote:

> Hi,
> 
> snprintf and vsnprintf are not in the standard C library.
> 
> >
> >  >
> >>  However on IRIX 6.2 gcc that still leaves:
> >>
> >>      make
> >>      ... (everything goes until)
> >>      gcc -o swish-e -g -O2 swish.o libswish-e.a -lm
> >  > ld: ERROR 33: Unresolved text symbol "snprintf" -- 1st referenced
> >  > by
> >>  swish.o.
> >>           Use linker option -v to see when and which objects,
> >>           archives
> >  > and dsos ar e loaded. ld: ERROR 33: Unresolved text symbol
> >  > "vsnprintf"
> >>  -- 1st referenced by libswish-e .a(http.o).
> >>           Use linker option -v to see when and which objects,
> >>           archives
> >>  and dsos ar e loaded. ld: INFO 152: Output file removed because of
> >  > error. *** Error code 1 (bu21)
> >  >
> 
> 
> snprintf and vsnprintf are not in the standard C library, you could
> include the following line to configure.in to have the variables
> HAVE_VSNPRINTF and HAVE_SNPRINTF available. Since both functions would
> probably have GNU implementations, could you include them when they
> are not available?
> 
> 
> AC_CHECK_FUNCS( vsnprintf snprintf)
> 
> info autoconf:
> Macro: AC_CHECK_FUNCS (FUNCTION... [, ACTION-IF-FOUND [,
>            ACTION-IF-NOT-FOUND]])
>       For each given FUNCTION in the whitespace-separated argument
>       list that is available, define `HAVE_FUNCTION' (in all
>       capitals).  If ACTION-IF-FOUND is given, it is additional shell
>       code to execute when one of the functions is found.  You can
>       give it a value of `break' to break out of the loop on the first
>       match.  If ACTION-IF-NOT-FOUND is given, it is executed when one
>       of the functions is not found.
> 
> 
> regards,
> 
> 
> Bas
> 
Received on Wed Nov 15 12:00:33 2000