#include "wx/thread.h"
#ifdef __WXMAC__
-#if TARGET_API_MAC_OSX
+#ifdef __DARWIN__
#include <CoreServices/CoreServices.h>
#else
#include <DriverServices.h>
kDurationForever);
if ( err)
{
- wxLogSysError( _( "Cannot wait on thread to exit."));
+ wxLogSysError( _( "Cannot wait for thread termination."));
rc = (void*) -1;
}
wxASSERT_MSG( wxThread::IsMain(),
wxT("only main thread may call wxMutexGuiLeaveOrEnter()!") );
+ if( !gs_critsectWaitingForGui )
+ return;
+
wxCriticalSectionLocker enter(*gs_critsectWaitingForGui);
if ( gs_nWaitingForGui == 0 )