zlib 1.2.2.1

This commit is contained in:
Mark Adler
2011-09-09 23:24:24 -07:00
parent 79fbcdc939
commit 9811b53dd9
36 changed files with 1334 additions and 429 deletions

View File

@@ -175,7 +175,7 @@ in the zlib distribution, or at the following location:
zlib in other programming languages. Some of them, like Ada
(GNAT) and Fortran (GNU G77), have C bindings implemented
initially on Unix, and relying on the C calling convention.
On the other hand, the pre- .Net versions of Microsoft Visual
On the other hand, the pre- .NET versions of Microsoft Visual
Basic require STDCALL, while Borland Delphi prefers, although
it does not require, FASTCALL.
@@ -203,10 +203,10 @@ in the zlib distribution, or at the following location:
zlib distribution.
8. I need to use zlib in my Microsoft .Net project. What can I
8. I need to use zlib in my Microsoft .NET project. What can I
do?
- Henrik Ravn has contributed a .Net wrapper around zlib. Look
- Henrik Ravn has contributed a .NET wrapper around zlib. Look
into contrib/dotzlib/, inside the zlib distribution.
@@ -225,8 +225,8 @@ in the zlib distribution, or at the following location:
depend on it should also be linked to MSVCRT.DLL.
10. Why are you saying that ZLIB1.DLL and my application must be
linked to the same C run-time (CRT) library? I linked my
10. Why are you saying that ZLIB1.DLL and my application should
be linked to the same C run-time (CRT) library? I linked my
application and my DLLs to different C libraries (e.g. my
application to a static library, and my DLLs to MSVCRT.DLL),
and everything works fine.
@@ -277,12 +277,6 @@ in the zlib distribution, or at the following location:
even run on it. Furthermore, no serious user should run
Windows 95 without a proper update installed.
There is also the fact that the mainstream C compilers for
Windows are Microsoft Visual C++ 6.0, and gcc/MinGW. Both
are producing executables that link to MSVCRT.DLL by default,
without offering other dynamic CRTs as alternatives easy to
select by users.
12. Why are you not linking ZLIB1.DLL to
<<my favorite C run-time library>> ?
@@ -295,27 +289,60 @@ in the zlib distribution, or at the following location:
to a static C library, you may as well consider linking zlib
in statically, too.
* Linking ZLIB1.DLL to CRTDLL.DLL looks very appealing,
because CRTDLL.DLL is present on every Win32 installation.
Unfortunately, it has a series of problems: it raises
difficulties when using it with C++ code, it does not work
with 64-bit file offsets, (and so on...), and Microsoft
discontinued its support a long time ago.
* Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because
CRTDLL.DLL is present on every Win32 installation.
Unfortunately, it has a series of problems: it does not
work properly with Microsoft's C++ libraries, it does not
provide support for 64-bit file offsets, (and so on...),
and Microsoft discontinued its support a long time ago.
* Linking ZLIB1.DLL to MSVCR70.DLL, supplied with the
Microsoft .NET platform and Visual C++ 7.0 or newer, is not
a good option. Although it is available for free download
and distribution, its presence is scarce on today's Win32
installations. If it will ever become more popular than
MSVCRT.DLL and will be pre-installed on the future Win32
systems, we will probably think again about it.
* Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied
with the Microsoft .NET platform, and Visual C++ 7.0/7.1,
raises problems related to the status of ZLIB1.DLL as a
system component. According to the Microsoft Knowledge Base
article KB326922 "INFO: Redistribution of the Shared C
Runtime Component in Visual C++ .NET", MSVCR70.DLL and
MSVCR71.DLL are not supposed to function as system DLLs,
because they may clash with MSVCRT.DLL. Instead, the
application's installer is supposed to put these DLLs
(if needed) in the application's private directory.
If ZLIB1.DLL depends on a non-system runtime, it cannot
function as a redistributable system component.
* Linking ZLIB1.DLL to NTDLL.DLL is not possible.
NTDLL.DLL exports only a part of the C library, and only on
Windows NT systems.
* Linking ZLIB1.DLL to non-Microsoft runtimes, such as
Borland's, or Cygwin's, raises problems related to the
reliable presence of these runtimes on Win32 systems.
It's easier to let the DLL build of zlib up to the people
who distribute these runtimes, and who may proceed as
explained in the answer to Question 14.
13. I need to link my own DLL build to a CRT different than
13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL,
how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0
(Visual Studio .NET) or newer?
- Due to the problems explained in the Microsoft Knowledge Base
article KB326922 (see the previous answer), the C runtime that
comes with the VC7 environment is no longer considered a
system component. That is, it should not be assumed that this
runtime exists, or may be installed in a system directory.
Since ZLIB1.DLL is supposed to be a system component, it may
not depend on a non-system component.
In order to link ZLIB1.DLL and your application to MSVCRT.DLL
in VC7, you need the library of Visual C++ 6.0 or older. If
you don't have this library at hand, it's probably best not to
use ZLIB1.DLL.
We are hoping that, in the future, Microsoft will provide a
way to build applications linked to a proper system runtime,
from the Visual C++ environment. Until then, you have a
couple of alternatives, such as linking zlib in statically.
If your application requires dynamic linking, you may proceed
as explained in the answer to Question 14.
14. I need to link my own DLL build to a CRT different than
MSVCRT.DLL. What can I do?
- Feel free to rebuild the DLL from the zlib sources, and link
@@ -331,7 +358,7 @@ in the zlib distribution, or at the following location:
CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
14. May I include additional pieces of code that I find useful,
15. May I include additional pieces of code that I find useful,
link them in ZLIB1.DLL, and export them?
- No. A legitimate build of ZLIB1.DLL must not include code
@@ -344,7 +371,7 @@ in the zlib distribution, or at the following location:
is a redistributable file, named VCLxx.DLL.
15. May I remove some functionality out of ZLIB1.DLL, by enabling
16. May I remove some functionality out of ZLIB1.DLL, by enabling
macros like NO_GZCOMPRESS or NO_GZIP at compile time?
- No. A legitimate build of ZLIB1.DLL must provide the complete
@@ -353,7 +380,7 @@ in the zlib distribution, or at the following location:
different file name, as suggested in the previous answer.
16. I made my own ZLIB1.DLL build. Can I test it for compliance?
17. I made my own ZLIB1.DLL build. Can I test it for compliance?
- We prefer that you download the official DLL from the zlib
web site. If you need something peculiar from this DLL, you