api: Introduce the PNG_LIBPNG_VER_SHAREDLIB macro; update pngwin.rc

The version macros `PNG_LIBPNG_VER_SONUM` and `PNG_LIBPNG_VER_DLLNUM`
weren't always in sync, but they should be, going forward.

Or, better yet, we should keep them in, deprecated, and introduce
`PNG_LIBPNG_VER_SHAREDLIB` for all shared library builds of all kinds
on all platforms.

It is unknown how many user applications have been using these macros.
We have been using `PNG_LIBPNG_VER_DLLNUM` for pngwin.rc, for example.
Which, by the way, was last updated in 2009.
This commit is contained in:
Cosmin Truta
2024-02-05 21:54:19 +02:00
parent cc8006c48d
commit 920db2ecc0
3 changed files with 11 additions and 12 deletions

View File

@@ -52,10 +52,10 @@ typedef png_libpng_version_1_6_43_git Your_png_h_is_not_version_1_6_43_git;
#if (PNG_LIBPNG_VER != PNG_LIBPNG_VER_MAJOR * 10000 + \
PNG_LIBPNG_VER_MINOR * 100 + \
PNG_LIBPNG_VER_RELEASE) || \
(PNG_LIBPNG_VER_SONUM != PNG_LIBPNG_VER_MAJOR * 10 + \
PNG_LIBPNG_VER_MINOR) || \
(PNG_LIBPNG_VER_DLLNUM != PNG_LIBPNG_VER_MAJOR * 10 + \
PNG_LIBPNG_VER_MINOR)
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_MAJOR * 10 + \
PNG_LIBPNG_VER_MINOR) || \
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_SONUM) || \
(PNG_LIBPNG_VER_SHAREDLIB != PNG_LIBPNG_VER_DLLNUM)
# error "Inconsistent version numbers in png.h"
#endif