[Zlib-devel] zlib version 1.2.3.8 available for testing
Philip Lowman
philip at yhbt.com
Mon Feb 15 01:52:38 EST 2010
On Mon, Feb 15, 2010 at 1:43 AM, Mark Adler <madler at alumni.caltech.edu> wrote:
> On Feb 14, 2010, at 8:33 PM, Philip Lowman wrote:
>> The build fails on MSVC due to snprintf() usage. Here's a patch.
>
> Philip,
>
> Thanks for the report. There is something wrong here. STDC should be defined, and so configure should try to use vsnprintf(), not snprintf(). MSVC has that function, so that should succeed, and the build should work using vsnprintf(). Can you check to see why that isn't happening?
MSVC apparantly has vsnprintf() but not snprintf(). Since the code is
calling snprintf() explicitly that's why it's failing. No other
source file in zlib has yet called snprintf() except for those that
are not STDC.
Instead of my patch, I suppose you could modify gzlib.c to call
vsnprintf instead. That's probably better actually. Forgive me, I
don't use C that often... don't think I've ever used vsnprintf in my
life. :)
--
Philip Lowman
More information about the Zlib-devel
mailing list