From 2baa0b125ba2c40313f466f405ae1f32c236af85 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 15 Feb 2008 15:33:38 +0000 Subject: [PATCH] applying patch 1894478 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/utils.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 278643c101..01aefde677 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -641,14 +641,26 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt) #if wxUSE_BASE +#ifdef __DARWIN__ +#include +#endif + wxString wxGetOsDescription() { +#ifdef __DARWIN__ + char data[128]; + struct utsname name; + uname(&name); + sprintf(data, "Mac OS X (%s %s %s)", name.sysname, name.release, name.machine); + return wxString(data, wxConvUTF8); +#else #ifdef WXWIN_OS_DESCRIPTION // use configure generated description if available return wxString(wxT("MacOS (")) + wxT(WXWIN_OS_DESCRIPTION) + wxString(wxT(")")); #else return wxT("MacOS"); //TODO:define further #endif +#endif } #ifndef __DARWIN__