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

Alias ZEXTERN, ZEXPORT and ZEXPORTVA to Z_EXTERN, Z_EXPORT and Z_EXPORTVA respectively. #915

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

mtl1979
Copy link
Collaborator

@mtl1979 mtl1979 commented Mar 25, 2021

See #914.

I chained the defines so any changes to zlib-ng defines are mirrored to stock zlib defines if not overwritten.

@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #915 (36f3dd6) into develop (21b0e01) will decrease coverage by 0.76%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #915      +/-   ##
===========================================
- Coverage    75.56%   74.80%   -0.77%     
===========================================
  Files           72       74       +2     
  Lines         8172     7854     -318     
  Branches      1350     1368      +18     
===========================================
- Hits          6175     5875     -300     
+ Misses        1480     1432      -48     
- Partials       517      547      +30     
Flag Coverage Δ
macos_clang 68.65% <ø> (-0.20%) ⬇️
macos_gcc 67.64% <ø> (-0.28%) ⬇️
ubuntu_clang 68.96% <ø> (-0.07%) ⬇️
ubuntu_clang_debug 68.39% <ø> (-0.09%) ⬇️
ubuntu_clang_inflate_allow_invalid_dist 68.89% <ø> (-0.14%) ⬇️
ubuntu_clang_inflate_strict 69.15% <ø> (-0.14%) ⬇️
ubuntu_clang_mmap 68.87% <ø> (-0.17%) ⬇️
ubuntu_clang_msan 69.15% <ø> (-0.14%) ⬇️
ubuntu_gcc 67.15% <ø> (-2.81%) ⬇️
ubuntu_gcc_aarch64 70.13% <ø> (-0.11%) ⬇️
ubuntu_gcc_aarch64_compat_no_opt 67.83% <ø> (-0.15%) ⬇️
ubuntu_gcc_aarch64_no_acle 68.38% <ø> (-0.12%) ⬇️
ubuntu_gcc_aarch64_no_neon 68.07% <ø> (-0.11%) ⬇️
ubuntu_gcc_armhf 70.55% <ø> (-0.12%) ⬇️
ubuntu_gcc_armhf_compat_no_opt 67.79% <ø> (-0.18%) ⬇️
ubuntu_gcc_armhf_no_acle 69.67% <ø> (-0.05%) ⬇️
ubuntu_gcc_armhf_no_neon 69.98% <ø> (-0.06%) ⬇️
ubuntu_gcc_armsf 70.55% <ø> (-0.12%) ⬇️
ubuntu_gcc_armsf_compat_no_opt 67.79% <ø> (-0.18%) ⬇️
ubuntu_gcc_compat_no_opt 69.21% <ø> (-0.11%) ⬇️
ubuntu_gcc_mingw_i686 0.00% <ø> (ø)
ubuntu_gcc_mingw_x86_64 0.00% <ø> (ø)
ubuntu_gcc_no_avx2 69.51% <ø> (-0.10%) ⬇️
ubuntu_gcc_no_pclmulqdq 66.36% <ø> (-0.33%) ⬇️
ubuntu_gcc_no_sse2 67.60% <ø> (-0.35%) ⬇️
ubuntu_gcc_no_sse4 66.32% <ø> (-0.37%) ⬇️
ubuntu_gcc_o3 68.94% <ø> (-0.37%) ⬇️
ubuntu_gcc_osb ?
ubuntu_gcc_ppc 70.99% <ø> (-0.12%) ⬇️
ubuntu_gcc_ppc64 70.18% <ø> (-0.11%) ⬇️
ubuntu_gcc_ppc64le 69.17% <ø> (-0.08%) ⬇️
ubuntu_gcc_s390x 68.36% <ø> (-0.09%) ⬇️
ubuntu_gcc_sparc64 70.88% <ø> (-0.12%) ⬇️
win64_gcc 72.82% <ø> (-0.40%) ⬇️
win64_gcc_compat_no_opt 74.16% <ø> (-0.54%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gzwrite.c 48.75% <0.00%> (-4.19%) ⬇️
test/adler32_test.c 60.00% <0.00%> (-3.64%) ⬇️
test/fuzz/minigzip_fuzzer.c 58.33% <0.00%> (-2.66%) ⬇️
gzlib.c 54.47% <0.00%> (-2.52%) ⬇️
test/fuzz/checksum_fuzzer.c 92.00% <0.00%> (-2.24%) ⬇️
test/minideflate.c 57.30% <0.00%> (-2.14%) ⬇️
gzread.c 54.60% <0.00%> (-1.90%) ⬇️
inffast.c 86.52% <0.00%> (-1.75%) ⬇️
crc32_comb.c 80.48% <0.00%> (-1.74%) ⬇️
test/example.c 76.13% <0.00%> (-1.49%) ⬇️
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21b0e01...36f3dd6. Read the comment docs.

@nmoinvaz nmoinvaz added the Compatibility API/ABI Compatibility issue label Mar 26, 2021
Copy link
Member

@Dead2 Dead2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Dead2
Copy link
Member

Dead2 commented Mar 26, 2021

While I now kind of regret it, we do include the other backwards compatible types and defines in zconf-ng.h too, so I guess we should add these there too.
I think we will rather plan to deprecate and remove them again later, once more programs have converted.

@Dead2
Copy link
Member

Dead2 commented Mar 26, 2021

Maybe our porting document should contain a list of all the defines and types that are deprecated and going away, along with the replacement define/type for each of them. Makes it easier for people to do a search for them.

@nmoinvaz
Copy link
Member

The reason I don't think it should go in zconf-ng.h is because that API is not intended for it to be zlib-compatible. I think the purpose of the zlib-compat API should be to aid adoption, but not the zlib-ng API. I would be in favor of removing the deprecated types from zlib-ng API sooner rather than later.

@Dead2
Copy link
Member

Dead2 commented Mar 26, 2021

We could start by adding the (gcc) deprecated attribute to the typedefs, that would trigger a warning whenever someone uses one of them.
https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html

And we could add pragmas trigger warnings when someone uses the defines.
https://stackoverflow.com/questions/2681259/how-to-deprecate-a-macro-in-gcc

@Dead2
Copy link
Member

Dead2 commented Mar 26, 2021

Not having them does mean it would be harder for applications to implement support for both zlib and zlib-ng though.

@mtl1979
Copy link
Collaborator Author

mtl1979 commented Mar 26, 2021

The way this pull request implements the defines is that if someone tries to define using the old names on command-line, it will most likely fail. As such it only allows using the defines as they are defined using the new names in this same file... I was pondering possibility to default value of the new defines based on old defines possibly specified in command line, but that would have made the patch a lot more complex.

We currently don't have macro that hides the differences between compilers in how they declare deprecated macros, functions etc., so marking them as deprecated in non-compat mode would have to be separate pull request.

@Dead2 Dead2 merged commit dc39b36 into zlib-ng:develop Apr 8, 2021
Dead2 added a commit that referenced this pull request May 8, 2021
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #925 #937 #939 #940
Dead2 added a commit that referenced this pull request May 8, 2021
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940
@Dead2 Dead2 mentioned this pull request May 8, 2021
Dead2 added a commit that referenced this pull request May 8, 2021
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940
Dead2 added a commit that referenced this pull request May 9, 2021
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936 #952
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940
Dead2 added a commit that referenced this pull request May 13, 2021
- Include porting guide in release packages #917
- Documentation improvements #913 #949
- Added Windows ARM binaries in release packages #916
- Fix crash on ARMv7 #927
- Fix building on FreeBSD #921
- Fix building with musl on aarch64 #936 #952
- Fix ARM float-abi detection #918
- Fix cmake detection of risc-v architectures #942
- Minor buildsystem fixes #922 #924 #933 #938 #950
- Improve zlib-compat build #915 #944
- CI/Test improvements #926 #929 #927 #937 #939 #940
gsjaardema pushed a commit to gsjaardema/zlib-ng that referenced this pull request May 13, 2021
- Include porting guide in release packages zlib-ng#917
- Documentation improvements zlib-ng#913 zlib-ng#949
- Added Windows ARM binaries in release packages zlib-ng#916
- Fix crash on ARMv7 zlib-ng#927
- Fix building on FreeBSD zlib-ng#921
- Fix building with musl on aarch64 zlib-ng#936 zlib-ng#952
- Fix ARM float-abi detection zlib-ng#918
- Fix cmake detection of risc-v architectures zlib-ng#942
- Minor buildsystem fixes zlib-ng#922 zlib-ng#924 zlib-ng#933 zlib-ng#938 zlib-ng#950
- Improve zlib-compat build zlib-ng#915 zlib-ng#944
- CI/Test improvements zlib-ng#926 zlib-ng#929 zlib-ng#927 zlib-ng#937 zlib-ng#939 zlib-ng#940
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility API/ABI Compatibility issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants