[Zlib-devel] [PATCH] 1.2.3 makefile.msc usability & rc fix (too late)

Andrei Polushin a-polushin at mail.ru
Wed May 3 12:43:50 EDT 2006


William A. Rowe, Jr. wrote:
> Andrei Polushin wrote:
>> William A. Rowe, Jr. wrote:
>>> Cosmin Truta wrote:
>>>> The right way to do it is by inserting the following lines in
>>>> zconf.h.
>>>> #    define _CRT_SECURE_NO_DEPRECATE
>>>
>>> +1 to that alternative to -wd4996 - I was deliberately avoiding any
>>> source file pollution in this patch.  For the next release your
>>> suggestion is quite sound and prefereable, actually.
>>
>> There should be -D_CRT_SECURE_NO_DEPRECATE instead of -wd4996
>
> Not with Cosmin's suggestion; his patch makes it unnecessary, which is why
> I +1'ed (agreed with) his alternative.  SECURE is only half the battle, the
> other half is NONSTDC (the utter bullshit of deprecating POSIX).

Those changes in zconf.h will disable the "deprecation warning" even in
non-zlib code, and that looks like a side effect.

So, either zconf.h #defines should be surrounded by #ifdef ZLIB_BUILD
and -DZLIB_BUILD is passed on the command line, or there should be both
-D_CRT_SECURE_NO_DEPRECATE and -D_CRT_NONSTDC_NO_DEPRECATE on the
command line.

--
Andrei Polushin





More information about the Zlib-devel mailing list