No real changes, just reamed HAS_PIPE_INPUT_STREAM.

Renamed the symbol indicating whether pipe-based streams are available from
HAS_PIPE_INPUT_STREAM to HAS_PIPE_STREAMS as it's not really input-specific.

See #12636.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-11-14 14:04:27 +00:00
parent 65fe93d8a5
commit f895c3fce2

View File

@@ -59,15 +59,15 @@
# include <sys/select.h> # include <sys/select.h>
#endif #endif
#define HAS_PIPE_INPUT_STREAM (wxUSE_STREAMS && wxUSE_FILE) #define HAS_PIPE_STREAMS (wxUSE_STREAMS && wxUSE_FILE)
#if HAS_PIPE_INPUT_STREAM #if HAS_PIPE_STREAMS
// define this to let wxexec.cpp know that we know what we're doing // define this to let wxexec.cpp know that we know what we're doing
#define _WX_USED_BY_WXEXECUTE_ #define _WX_USED_BY_WXEXECUTE_
#include "../common/execcmn.cpp" #include "../common/execcmn.cpp"
#endif // HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS
#if defined(__MWERKS__) && defined(__MACH__) #if defined(__MWERKS__) && defined(__MACH__)
#ifndef WXWIN_OS_DESCRIPTION #ifndef WXWIN_OS_DESCRIPTION
@@ -297,7 +297,7 @@ bool wxShutdown(int flags)
// wxStream classes to support IO redirection in wxExecute // wxStream classes to support IO redirection in wxExecute
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if HAS_PIPE_INPUT_STREAM #if HAS_PIPE_STREAMS
bool wxPipeInputStream::CanRead() const bool wxPipeInputStream::CanRead() const
{ {
@@ -337,7 +337,7 @@ bool wxPipeInputStream::CanRead() const
} }
} }
#endif // HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxShell // wxShell
@@ -643,7 +643,7 @@ long wxExecute(char **argv, int flags, wxProcess *process,
// prepare for IO redirection // prepare for IO redirection
#if HAS_PIPE_INPUT_STREAM #if HAS_PIPE_STREAMS
// the input buffer bufOut is connected to stdout, this is why it is // the input buffer bufOut is connected to stdout, this is why it is
// called bufOut and not bufIn // called bufOut and not bufIn
wxStreamTempInputBuffer bufOut, wxStreamTempInputBuffer bufOut,
@@ -684,7 +684,7 @@ long wxExecute(char **argv, int flags, wxProcess *process,
execData.fdOut = fdOut; execData.fdOut = fdOut;
execData.fdErr = fdErr; execData.fdErr = fdErr;
} }
#endif // HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS
if ( pipeIn.IsOk() ) if ( pipeIn.IsOk() )
{ {
@@ -1296,7 +1296,7 @@ int wxAppTraits::AddProcessCallback(wxEndProcessData *data, int fd)
bool wxAppTraits::CheckForRedirectedIO(wxExecuteData& execData) bool wxAppTraits::CheckForRedirectedIO(wxExecuteData& execData)
{ {
#if HAS_PIPE_INPUT_STREAM #if HAS_PIPE_STREAMS
bool hasIO = false; bool hasIO = false;
if ( execData.bufOut && execData.bufOut->Update() ) if ( execData.bufOut && execData.bufOut->Update() )
@@ -1306,11 +1306,11 @@ bool wxAppTraits::CheckForRedirectedIO(wxExecuteData& execData)
hasIO = true; hasIO = true;
return hasIO; return hasIO;
#else // !HAS_PIPE_INPUT_STREAM #else // !HAS_PIPE_STREAMS
wxUnusedVar(execData); wxUnusedVar(execData);
return false; return false;
#endif // HAS_PIPE_INPUT_STREAM/!HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS/!HAS_PIPE_STREAMS
} }
// helper classes/functions used by WaitForChild() // helper classes/functions used by WaitForChild()
@@ -1360,7 +1360,7 @@ private:
wxDECLARE_NO_COPY_CLASS(wxEndHandler); wxDECLARE_NO_COPY_CLASS(wxEndHandler);
}; };
#if HAS_PIPE_INPUT_STREAM #if HAS_PIPE_STREAMS
// class for monitoring our ends of child stdout/err, should be constructed // class for monitoring our ends of child stdout/err, should be constructed
// with the FD and stream from wxExecuteData and will do nothing if they're // with the FD and stream from wxExecuteData and will do nothing if they're
@@ -1389,7 +1389,7 @@ private:
wxDECLARE_NO_COPY_CLASS(wxRedirectedIOHandler); wxDECLARE_NO_COPY_CLASS(wxRedirectedIOHandler);
}; };
#endif // HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS
// helper function which calls waitpid() and analyzes the result // helper function which calls waitpid() and analyzes the result
int DoWaitForChild(int pid, int flags = 0) int DoWaitForChild(int pid, int flags = 0)
@@ -1470,7 +1470,7 @@ int wxAppTraits::WaitForChild(wxExecuteData& execData)
} }
//else: synchronous execution case //else: synchronous execution case
#if HAS_PIPE_INPUT_STREAM && wxUSE_SOCKETS #if HAS_PIPE_STREAMS && wxUSE_SOCKETS
wxProcess * const process = execData.process; wxProcess * const process = execData.process;
if ( process && process->IsRedirected() ) if ( process && process->IsRedirected() )
{ {
@@ -1494,7 +1494,7 @@ int wxAppTraits::WaitForChild(wxExecuteData& execData)
} }
} }
//else: no IO redirection, just block waiting for the child to exit //else: no IO redirection, just block waiting for the child to exit
#endif // HAS_PIPE_INPUT_STREAM #endif // HAS_PIPE_STREAMS
return DoWaitForChild(execData.pid); return DoWaitForChild(execData.pid);
} }