[Zlib-devel] zlib 1.2.0.1 available for testing
Cosmin Truta
cosmin at cs.toronto.edu
Tue Apr 8 01:04:09 EDT 2003
On Mon, 7 Apr 2003, Dmitriy Anisimkov wrote:
> Cosmin Truta wrote:
>
> >So, Mark, you don't have to apply Christian's patches separately.
> >They are already included in my update (the newer makefiles, and the
> >WIN32_LEAN_AND_MEAN thing).
> >
> WIN32_LEAN_AND_MEAN is not used at all at zlib-1.2.0.1-cos2, only defined.
It is used in <windows.h>, and it indicates that only the critical
Windows stuff should be included. Including the entire Windows API is
way too much, and it's unnecessary. After all, we only need STDCALL, FAR
and a few others.
> Is it possible to support CDECL calling convention for build zlib under
> Win32 ?
I think you are right, and we should reintroduce ZAPI. Even if I
proposed WINAPI all over the place, I then realized that:
- It doesn't work with the ASM pieces of code from contrib/
(N.B. The zlib.dll documentation must state that the dll should not
be compiled using the ASM sources, unless the source code is properly
adjusted!)
- It doesn't work with the current Delphi bindings as supplied by
Borland in the already-standard zlib unit (and that's serious!)
- (as Dmitriy pointed out) It doesn't work with the Ada (and possibly
with other foreign language) bindings, without cluttering the code in a
*non-portable* manner.
> I see too much *WINDOWS* and *WIN32* words in the zcong.h. I feel that
> it is too much attension to MS.
> And it is hard to understand for me, what should I propose to make zlib
> CDECL in Windows, i mazed between
> *WIN32* and *WINDOWS* like defines ;-).
WINDOWS is for the 16-bit Windows (3.0, 3.1, 3.11). WIN32 is for the
32-bit Windows (9x/NT/XP).
> I would prefer to do not have it at all.
It's not a problem that zconf has much Windows-specific code inside
(after all, it should be a black box, not supposed to be viewed by
regular users), but it *is* a problem that the Windows+VB -specifics
are incomodating normal users of zlib.
The damage is already done and binary compatibility has to be preserved,
but we still have to fix this one way or another.
> The CDECL is a default calling convention for C, and I think it is
> strange, that we have to use so complex logic to do simple think, to
> keep all routines in the default calling convension.
I agree with you.
> Maybe we should have configuration parameter for define the calling
> convention for Win32 ?
Again, Win32 works fine with CDECL. The special configuration parameters
should be necessary only for the old Visual Basic (pre-7.0) and for the
old zlib.dll.
So we do need to reintroduce ZAPI as a way of switching WINAPI on and
off.
Cosmin
More information about the Zlib-devel
mailing list