Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zLib 1.2.12 fails to build in VC++/Win32 due to mismatched declarations #660

Closed
gh-andre opened this issue Jun 5, 2022 · 1 comment
Closed

Comments

@gh-andre
Copy link

gh-andre commented Jun 5, 2022

There are several errors in crc32.c, mostly due to mismatched argument size in a few calls. For example, crc32_combine_gen64 was seen first taking a 64-bit argument and then called here with a 32-bit one.

 uLong ZEXPORT crc32_combine_gen(len2)
     z_off_t len2;
 {
-    return crc32_combine_gen64(len2);
+    return crc32_combine_gen64((z_off64_t) len2);
 }

One more is due to crc32_combine_op being declared as an exported function in a header and then defined without the export declaration.

-uLong crc32_combine_op(crc1, crc2, op)
+uLong ZEXPORT crc32_combine_op(crc1, crc2, op)

You can see example failures here:

https://github.com/StoneStepsInc/zlib-nuget/runs/6747245701?check_suite_focus=true

Patches for these and Makefile.msc, which mixes up release/debug CRT, are available here.

https://github.com/StoneStepsInc/zlib-nuget/tree/master/patches

@tbeu
Copy link
Contributor

tbeu commented Sep 5, 2022

Resolved by 7ecf7c7 and 6c532a8.

@madler madler closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants