X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93d4c1d03b162957dddace3c22f12f0e7b5bbf06..e26c0634d0040057f09d902842c2b77aa9f0cbfc:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index c16ad865b4..be03d3c4c8 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -418,7 +418,7 @@ wxLogStderr::wxLogStderr(FILE *fp) m_fp = fp; } -#if defined(__WXMAC__) && !defined(__UNIX__) +#if defined(__WXMAC__) && !defined(__DARWIN__) #define kDebuggerSignature 'MWDB' static Boolean FindProcessBySignature(OSType signature, ProcessInfoRec* info) @@ -514,7 +514,7 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) str += wxT("\r\n") ; OutputDebugString(str.c_str()); #endif // MSW -#if defined(__WXMAC__) && !defined(__WXMAC_X__) && wxUSE_GUI +#if defined(__WXMAC__) && !defined(__DARWIN__) && wxUSE_GUI Str255 pstr ; strcpy( (char*) pstr , str.c_str() ) ; strcat( (char*) pstr , ";g" ) ; @@ -732,7 +732,10 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode) 0, NULL); // copy it to our buffer and free memory - wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1); + if( lpMsgBuf != 0 ) + wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1); + else + s_szBuf[0] = wxT('\0'); s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0'); LocalFree(lpMsgBuf);