Changes to allow compilation using MSVC 2010#5
Merged
vkrasnov merged 3 commits intocloudflare:gcc.amd64from Feb 27, 2017
Merged
Changes to allow compilation using MSVC 2010#5vkrasnov merged 3 commits intocloudflare:gcc.amd64from
vkrasnov merged 3 commits intocloudflare:gcc.amd64from
Conversation
added 3 commits
February 27, 2017 13:45
1) MSVC doesn't have __builtin_expect. Just ignore likely/unlikely and hope the compiler optimizes for the best. 2) MSVC also doesn't have __builtin_ctzl. Implement using _BitScanForward().
-MSVC (2010) only supports C89 for c files. All variable declarations need to be moved to the top of blocks. -MSVC also doesn't support GCC's typeof. No real need to call it in deflate.c anyway, so I removed it.
fhanau
pushed a commit
to fhanau/zlib
that referenced
this pull request
Feb 27, 2023
Fix typo in spec: QuicTransportBase -> QuicTransport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ZLib can be compiled with Microsoft Visual Studio 2010, but there are a few minor changes in cloudflare's fork that prevent compilation. This pull request moves around some variable declarations to top of block to allow C89 compatibility. It also ifdef's in definitions for likely/unlikely and _builtin_ctzl if _MSC_VER is set.
Please let me know if these changes look ok, or if you think I should make any changes to them. I'd love to have the ability to use MSVC pulled back into your branch.
Thanks,
--Barry