X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a8eaaeb23796c69ea0f67cbd48fc5f667d9823d0..39fbbfda3c702e44d0c128a39440a321489b9b28:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index f6195cfeb2..449bafe65f 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -17,7 +17,14 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__) +// Some older compilers (such as EMX) cannot handle +// #pragma interface/implementation correctly, iff +// #pragma implementation is used in _two_ translation +// units (as created by e.g. event.cpp compiled for +// libwx_base and event.cpp compiled for libwx_gui_core). +// So we must not use those pragmas for those compilers in +// such files. #pragma implementation "utils.h" #endif @@ -293,12 +300,12 @@ int wxGetOsVersion(int *verMaj, int *verMin) if ( ! traits ) traits = &traitsConsole; - wxToolkitInfo *info = traits->GetToolkitInfo(); + wxToolkitInfo& info = traits->GetToolkitInfo(); if ( verMaj ) - *verMaj = info->versionMajor; + *verMaj = info.versionMajor; if ( verMin ) - *verMin = info->versionMinor; - return info->os; + *verMin = info.versionMinor; + return info.os; } // ----------------------------------------------------------------------------