]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsunx.cpp
More small fixes
[wxWidgets.git] / src / unix / utilsunx.cpp
index 23658ace65510ea4c523412dab259f6b4960474e..a93c05a3be1d07e5e4b10cc731bfb360de67318b 100644 (file)
@@ -333,6 +333,8 @@ void wxHandleProcessTermination(wxEndProcessData *proc_data)
 // wxStream classes to support IO redirection in wxExecute
 // ----------------------------------------------------------------------------
 
+#if wxUSE_STREAMS
+
 class wxProcessFileInputStream : public wxInputStream
 {
 public:
@@ -429,6 +431,8 @@ size_t wxProcessFileOutputStream::OnSysWrite(const void *buffer, size_t bufsize)
     return ret;
 }
 
+#endif // wxUSE_STREAMS
+
 long wxExecute(wxChar **argv,
                bool sync,
                wxProcess *process)
@@ -590,16 +594,18 @@ long wxExecute(wxChar **argv,
         // pipe initialization: construction of the wxStreams
         if ( process && process->IsRedirected() )
         {
+#if wxUSE_STREAMS
             // These two streams are relative to this process.
             wxOutputStream *outStream = new wxProcessFileOutputStream(pipeIn[1]);
             wxInputStream *inStream = new wxProcessFileInputStream(pipeOut[0]);
             wxInputStream *errStream = new wxProcessFileInputStream(pipeErr[0]);
 
+            process->SetPipeStreams(inStream, outStream, errStream);
+#endif // wxUSE_STREAMS
+
             close(pipeIn[0]); // close reading side
             close(pipeOut[1]); // close writing side
             close(pipeErr[1]); // close writing side
-
-            process->SetPipeStreams(inStream, outStream, errStream);
         }
 
 #if wxUSE_GUI