X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4da152ea3ec3968fb2f304b6ed73e0279c19506..3f85391ea7ec33be616af1a323e2d5c2e0f6e74f:/src/msw/utilsexc.cpp diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 3db9fa1419..17eac58b19 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -6,7 +6,7 @@ // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) 1998-2002 wxWindows dev team -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -60,7 +60,9 @@ #endif #if defined(__WIN32__) && !defined(__WXMICROWIN__) -#include +#ifndef __UNIX__ + #include +#endif #ifndef __GNUWIN32__ #include @@ -490,6 +492,14 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler) { wxCHECK_MSG( !!cmd, 0, wxT("empty command in wxExecute") ); +#if wxUSE_THREADS + // for many reasons, the code below breaks down if it's called from another + // thread -- this could be fixed, but as Unix versions don't support this + // neither I don't want to waste time on this now + wxASSERT_MSG( wxThread::IsMain(), + _T("wxExecute() can be called only from the main thread") ); +#endif // wxUSE_THREADS + wxString command; #if wxUSE_IPC