Return run-time zlib version from wxGetZlibVersionInfo().
Return the version really used instead of the version the code was compiled against. Incidentally, this avoids the use of ZLIB_VERNUM not available in old (1.1) versions of zlib, thus fixing compilation under Solaris 10. Closes #14158. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -47,10 +47,18 @@ enum {
|
|||||||
|
|
||||||
wxVersionInfo wxGetZlibVersionInfo()
|
wxVersionInfo wxGetZlibVersionInfo()
|
||||||
{
|
{
|
||||||
return wxVersionInfo("zlib",
|
int major,
|
||||||
ZLIB_VERNUM >> 12,
|
minor,
|
||||||
(ZLIB_VERNUM >> 8) & 0x0F,
|
build;
|
||||||
(ZLIB_VERNUM & 0xFF) / 0x10);
|
|
||||||
|
if ( sscanf(zlibVersion(), "%d.%d.%d", &major, &minor, &build) != 3 )
|
||||||
|
{
|
||||||
|
major =
|
||||||
|
minor =
|
||||||
|
build = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxVersionInfo("zlib", major, minor, build);
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user