X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bb6b2c057edbcc5b87f00a8af6ac70f6fd69727..3f4a2351e4c677c88c18ea812b609477adee7380:/src/mac/classic/utils.cpp diff --git a/src/mac/classic/utils.cpp b/src/mac/classic/utils.cpp index f28c2042f6..a14b39d556 100644 --- a/src/mac/classic/utils.cpp +++ b/src/mac/classic/utils.cpp @@ -56,23 +56,20 @@ #include #endif -// --------------------------------------------------------------------------- -// code used in both base and GUI compilation -// --------------------------------------------------------------------------- +#if wxUSE_BASE // our OS version is the same in non GUI and GUI cases -wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) +wxOperatingSystemId wxGetOsVersion(int *majorVsn, int *minorVsn) { long theSystem; + Gestalt(gestaltSystemVersion, &theSystem); - // are there x-platform conventions ? + if ( majorVsn != NULL ) + *majorVsn = (theSystem >> 8); - Gestalt(gestaltSystemVersion, &theSystem); - if (minorVsn != NULL) + if ( minorVsn != NULL ) *minorVsn = (theSystem & 0xFF); - if (majorVsn != NULL) - *majorVsn = (theSystem >> 8); #if defined( __DARWIN__ ) return wxOS_MAC_OSX_DARWIN; @@ -81,8 +78,6 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) #endif } -#if wxUSE_BASE - #ifndef __DARWIN__ // defined in unix/utilsunx.cpp for Mac OS X