applying patch 1894478

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2008-02-15 15:33:38 +00:00
parent 7e4170e8b7
commit 2baa0b125b

View File

@@ -641,14 +641,26 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt)
#if wxUSE_BASE #if wxUSE_BASE
#ifdef __DARWIN__
#include <sys/utsname.h>
#endif
wxString wxGetOsDescription() 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 #ifdef WXWIN_OS_DESCRIPTION
// use configure generated description if available // use configure generated description if available
return wxString(wxT("MacOS (")) + wxT(WXWIN_OS_DESCRIPTION) + wxString(wxT(")")); return wxString(wxT("MacOS (")) + wxT(WXWIN_OS_DESCRIPTION) + wxString(wxT(")"));
#else #else
return wxT("MacOS"); //TODO:define further return wxT("MacOS"); //TODO:define further
#endif #endif
#endif
} }
#ifndef __DARWIN__ #ifndef __DARWIN__