From 0e3d1f4af5e6104376a0d3075c181c1aa261caf7 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Fri, 19 Oct 2007 02:42:42 +0000 Subject: [PATCH] Backport modified 49154 from trunk. Normalizes multiple and incorrect usage of darwin/mac/cocoa tests into one USE_OLD_DARWIN_END_PROCESS_DETECT which now excludes wxCocoa since it will be using the new method. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/utilsunx.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 021e909053..0e63ebc8e0 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -1170,13 +1170,18 @@ bool wxHandleFatalExceptions(bool doit) #if wxUSE_GUI +#ifdef __DARWIN__ + #include +#endif // ---------------------------------------------------------------------------- // wxExecute support // ---------------------------------------------------------------------------- -// Darwin doesn't use the same process end detection mechanisms so we don't -// need wxExecute-related helpers for it -#if !(defined(__DARWIN__) && defined(__WXMAC__)) +#define USE_OLD_DARWIN_END_PROCESS_DETECT (defined(__DARWIN__) && defined(__WXMAC__)) + +// wxMac doesn't use the same process end detection mechanisms so we don't +// need wxExecute-related helpers for it. +#if !USE_OLD_DARWIN_END_PROCESS_DETECT bool wxGUIAppTraits::CreateEndProcessPipe(wxExecuteData& execData) { @@ -1244,7 +1249,7 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData) } -#if defined(__DARWIN__) && (defined(__WXMAC__) || defined(__WXCOCOA__)) +#if USE_OLD_DARWIN_END_PROCESS_DETECT endProcData->tag = wxAddProcessCallbackForPid(endProcData, execData.pid); #else endProcData->tag = wxAddProcessCallback @@ -1254,7 +1259,7 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData) ); execData.pipeEndProcDetect.Close(); -#endif // defined(__DARWIN__) && (defined(__WXMAC__) || defined(__WXCOCOA__)) +#endif // USE_OLD_DARWIN_END_PROCESS_DETECT if ( flags & wxEXEC_SYNC ) {