Add a micro version parameter to wxGetOsVersion

In addition to getting a major and minor OS version allow a micro
version to be retrieved. In case of running on e.g. OS X 10.10.3 this
allows the "3" to be retrieved again.
This commit is contained in:
Dimitri Schoolwerth
2015-06-24 06:22:33 +04:00
committed by Tobias Taschner
parent 5983274af6
commit b1a9c6e79e
5 changed files with 30 additions and 11 deletions

View File

@@ -1114,7 +1114,7 @@ wxLinuxDistributionInfo wxGetLinuxDistributionInfo()
// these functions are in src/osx/utilsexc_base.cpp for wxMac
#ifndef __DARWIN__
wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin, int *verMicro)
{
// get OS version
int major, minor;
@@ -1131,6 +1131,8 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
*verMaj = major;
if ( verMin )
*verMin = minor;
if ( verMicro )
*verMicro = (major == -1) ? -1 : 0;
// try to understand which OS are we running
wxString kernel = wxGetCommandOutput(wxT("uname -s"));