[Zlib-devel] zlib 1.2.0 available for testing

Cosmin Truta cosmin at cs.toronto.edu
Wed Mar 12 09:50:00 EST 2003


On Sun, 9 Mar 2003, Mark Adler wrote:

> Faithful zlib guinea pigs,
>
> zlib 1.2.0 is available for testing:
>
>      http://www.alumni.caltech.edu/~madler/zlib-1.2.0.tar.gz

The name suggests it's a release candidate, not a beta.
But even for release candidates, isn't it better to choose a simple
"release candidate" naming scheme, just like for betas?
For instance:

zlib-1.2.0-rc1
  [some people contribute makefiles etc.]
zlib-1.2.0-rc2
  [oops a bug report]
zlib-1.2.0-beta8
  [fix bug]
zlib-1.2.0-beta9
  [fix other bug]
zlib-1.2.0-rc3
  [now everyone seems to be happy, so make the public release]
zlib-1.2.0
  [hurray!]

This scheme is used by libpng, for example. Of course, it's not
necessary (and not even desirable) to intertwine release candidates with
betas, but if something happens, there is a way out without getting
confused.


> Please give it a spin and let me know how it goes.  You can find the
> changes at the top of ChangeLog.

At
 http://www.cs.toronto.edu/~cosmin/pngtech/z_rle/zlib-120-patch-cos.zip
I am providing makefiles for the following platforms:

  win32/makefile.bor      # Borland C static lib
  win32/makefile.gcc      # GCC static lib (tested under Cygwin, MinGW)
  win32/makefile.msc      # Microsoft C static lib
  win32/makefile-dll.msc  # Microsoft C dll (zlib.def still incomplete)

Did Gilles provide a zlib.def already? If yes, that's great.
If Gilles' contribution is not acoompanied by a makefile, but only by a
MS Visual Studio project, I suggest adding the makefiles, too.
The MS compiler and make program are now available for free.

Gilles Vollant wrote:

> In Microsoft Visual Studio 7 (.net), there is no vsnprintf. There is
> only :
>
> _CRTIMP int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
>
> With a "_" before vsnprintf [...]

Well, it will appear whenever there will be C99 support in the Windows
libs. Borland C doesn't support it at all in some older version (5.2),
but it fully supports it in 5.5 ... etc.

I propose a more general approach:

- Add the following lines in zconf.h:

#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#  ifndef STDC
#    define STDC
#  endif
#  ifndef STDC99
#    define STDC99
#  endif
#endif

- Add the following lines in zutil.h:

/* vsnprintf setup */
#if !defined(STDC99) && !(defined(__TURBOC__) && __TURBOC__ >= 0x550)
#  ifdef MSDOS
     /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
        but for now we just assume it doesn't. */
#    define NO_vsnprintf
#  endif
#  ifdef WIN32
     /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf.
*/
#    if !defined(vsnprintf) && !defined(__TURBOC__)
#      define vsnprintf _vsnprintf
#    endif
#  endif
#  ifdef __TURBOC__
#    define NO_vsnprintf
#  endif
#endif

The lines above will become more and more fat, as soon as we will know
about more compilers.
This approach also works in non-MS environments that depend on MS libs,
such as MinGW.





More information about the Zlib-devel mailing list