[Zlib-devel] zlib's Windows interface

Gilles Vollant info at winimage.com
Mon May 12 03:24:00 EDT 2003


In the beta 1.2.0.1, I've introducted in zconf.h, line 175-177 the three
line:

#if defined(WIN32) && (!defined(ZLIB_WIN32_NODLL)) && (!defined(ZLIB_DLL))
#  define ZLIB_DLL
#endif


I admit this was a big mistake (I'm sorry): now a compilation for a Win32
platform uses by default the ZLIB_DLL, which mean WINAPI, which mean
__stdcall function calling convention for export function of zLib

On zlib 1.14 (and previous), a compilation for a Win32 platform uses by
default __cdecl calling convention, a compilation for a Win32 platform which
define the  ZLIB_DLL macro uses _stdcall function calling convention.
For not break source compatibility, we must revert to this.

There were several suggestion for the final version of zconf.h.
The more easy modification is only remove these line 175-177 I've introduced
in zconf.h
This zconf.h will not be perfect, but zconf.h will be compatible with old
zLib.

But, of course, other source code modification are possible, we only need
not broke compatibility with zLib 1.14

-----Message d'origine-----
De : Zlib-devel-admin at zlib.net [mailto:Zlib-devel-admin at zlib.net] De la part
de Mark Adler
Envoyé : lundi 12 mai 2003 08:53
À : zlib-devel at zlib.net
Cc : Christian Spieler

Window washers,

I was just beginning to go through a long series of emails on win32 and
cdecl, etc.  Instead of trying to comprehend all of that (which might take a
while since thankfully I have never done any development on a Windows
system), could Cosmin, Dimitriy, Christian, and any other interested parties
please let me know if you guys reached consensus on this, and if so, in what
past or future email I could find the blessed patches?

I apologize for my laziness on this topic, but I have two Mars launches
coming up in a few weeks that are occupying my time.

mark


_______________________________________________
Zlib-devel mailing list
Zlib-devel at zlib.net
http://zlib.net/mailman/listinfo/zlib-devel_madler.net






More information about the Zlib-devel mailing list