#include "wx/process.h"
#include "wx/thread.h"
-#include "wx/unix/execute.h"
+#if wxUSE_GUI
+ #include "wx/unix/execute.h"
+#endif
#include <stdarg.h>
#include <dirent.h>
return wxExecute(cmd) != 0;
}
+#if wxUSE_GUI
+
void wxHandleProcessTermination(wxEndProcessData *proc_data)
{
int pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid);
}
}
-long wxExecute( wxChar **argv, bool sync, wxProcess *process )
+#endif // wxUSE_GUI
+
+#if wxUSE_GUI
+ #define WXUNUSED_UNLESS_GUI(p) p
+#else
+ #define WXUNUSED_UNLESS_GUI(p)
+#endif
+
+long wxExecute(wxChar **argv,
+ bool sync,
+ wxProcess * WXUNUSED_UNLESS_GUI(process))
{
wxCHECK_MSG( *argv, 0, wxT("can't exec empty command") );
#if wxUSE_GUI
wxEndProcessData *data = new wxEndProcessData;
-
ARGS_CLEANUP;
if ( sync )