]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/utilsunx.cpp
some compilers don't like statics in inline functions, even if they're const -- repla...
[wxWidgets.git] / src / unix / utilsunx.cpp
index 072a66b54a7f46a0d12f4e6de428ff1e5191e9cd..b9e17c0c145fdbb4d4ebc4c51123678085f1fae2 100644 (file)
     #endif // __BSD__/!__BSD__
 
     #define wxStatfs statfs
     #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
 #endif // HAVE_STATFS
 
 #ifdef HAVE_STATVFS
@@ -315,7 +320,11 @@ long wxExecute( const wxString& command, int flags, wxProcess *process )
 
     long lRc;
 #if defined(__DARWIN__)
 
     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
 
         return lRc;
 #endif