X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62705a278a57b8d3dd67222f20b161584a86982d..5cb61fed97c78e0399ba18457e45b51f8eb15edf:/src/unix/utilsunx.cpp?ds=inline diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 072a66b54a..b9e17c0c14 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -80,6 +80,11 @@ #endif // __BSD__/!__BSD__ #define wxStatfs statfs + + #ifndef HAVE_STATFS_DECL + // some systems lack statfs() prototype in the system headers (AIX 4) + extern "C" int statfs(const char *path, struct statfs *buf); + #endif #endif // HAVE_STATFS #ifdef HAVE_STATVFS @@ -315,7 +320,11 @@ long wxExecute( const wxString& command, int flags, wxProcess *process ) long lRc; #if defined(__DARWIN__) - if( (lRc = wxMacExecute(argv, flags, process)) != -1) + // wxMacExecute only executes app bundles. + // It returns an error code if the target is not an app bundle, thus falling + // through to the regular wxExecute for non app bundles. + lRc = wxMacExecute(argv, flags, process); + if( lRc != ((flags & wxEXEC_SYNC) ? -1 : 0)) return lRc; #endif