F2I-Consulting / Minizip

Copy of the minizip source code included in zlib "contrib/minizip" folder
http://www.winimage.com/zLibDll/minizip.html
0 stars 4 forks source link

Trouble compiling iowin32.c #1

Closed cgodkin closed 1 year ago

cgodkin commented 6 years ago

I upgraded to this minizip for fesapi and encountered this compiler warning

.\iowin32.c(31): warning C4067: unexpected tokens following preprocessor directive - expected a newline

I think the problem is due to lines 30-31: `

if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))

if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)

but I think that line 30 ought to read

if defined(WINAPI_FAMILY_ONE_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))

` to match the macro it's trying to use.

I am using VS2015 on Windows 10 Pro.

Am I missing something?

philippeVerney commented 6 years ago

Hi Carl,

I don't think you are missing anything. I have the same warning with VS2013. And other people face this warning : https://github.com/madler/zlib/pull/233

I think you can do like in the PR above and change the check on line 30. This repo is purely a copy of minizip 1.1 and I don't want to modify the source code. Indeed, Fesapi is now only maintained with this official source code (actually the same source which is delivered with official zlib).

I may create an "unofficial" branch to this repo and include this fix if you think it is a good idea (or just create your own fork). But I won't maintain a minizip library. This repository is just for convenience.

The longer term approach for fesapi is to replace minizip by another library such as libarchive. But I unfortunately really miss time for that. Mainly because minizip does not look to be maintained....

Anyway, this issue is very good to keep opened if some other people use this repo to build official minizip. Thank you!

I added a note on the README.md.

philippeVerney commented 1 year ago

See https://github.com/madler/zlib/commit/ce12773790517034317274f5c65ba70cfeea29f7 for the upstream fix