// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) 1998-2002 wxWindows dev team
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include <ctype.h>
-#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
+#if !defined(__GNUWIN32__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
#include <direct.h>
#ifndef __MWERKS__
#include <dos.h>
#include <sys/stat.h>
#endif
-#if defined(__WIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__)
-#include <io.h>
+#if defined(__WIN32__) && !defined(__WXMICROWIN__)
+#ifndef __UNIX__
+ #include <io.h>
+#endif
#ifndef __GNUWIN32__
#include <shellapi.h>
bool wxPipeInputStream::CanRead() const
{
- // FIXME
-#ifdef __WXWINE__
- return FALSE;
-#else // !Wine
if ( !IsOpened() )
return FALSE;
}
return nAvailable != 0;
-#endif // Wine/!Wine
}
size_t wxPipeInputStream::OnSysRead(void *buffer, size_t len)
{
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