Subject: Re: zlib 1.1.4's check for vsnprintf
To: Georg Schwarz <geos@epost.de>
From: Adam <adam@albedo.art.pl>
List: tech-pkg
Date: 01/14/2004 18:32:48
How about zlib-1.2.1 (commited few days ago)?
Cheers,

- Adam


On Jan 14, 2004, at 17:54, Georg Schwarz wrote:

> Dear developers,
>
> zlib 1.1.4's configure on NetBSD pkgsrc checks for the presence of
> vsnprint by doing the following:
>
>
> cat > $test.c <<EOF
> #include <stdio.h>
> #include <stdarg.h>
> char *p;
> va_list ap;
> int main() { return vsnprintf(p, 10, "1234567890", ap); }
> EOF
> if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
>   echo "Checking for vsnprintf... Yes."
>   CFLAGS="$CFLAGS -DHAS_vsnprintf"
> else
>   echo "Checking for vsnprintf... No."
> fi
>
> Now on IRIX 5.3 the code *compiles* nicely, and only when linking does
> the system realize that there's no vsnprint:
>
> cc test.c
> ld:
> Unresolved:
> vsnprintf
>
> So it appears to be better to leave out the "-c" in zlib's configure
> here (and maybe elsewhere as well). BTW, the same happens when I use
> gcc, so it probably applies to any platform without vsnprintf.
> The test is introduced by pkgsrc/devel/zlib/patches/patch-ac, so it's a
> NetBSD pkgsrc specific issue.
>
> Georg
>
>
> -- 
> Georg Schwarz    http://home.pages.de/~schwarz/
>  geos@epost.de     +49 177 8811442
>