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()
|
||||
{
|
||||
return wxVersionInfo("zlib",
|
||||
ZLIB_VERNUM >> 12,
|
||||
(ZLIB_VERNUM >> 8) & 0x0F,
|
||||
(ZLIB_VERNUM & 0xFF) / 0x10);
|
||||
int major,
|
||||
minor,
|
||||
build;
|
||||
|
||||
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