]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/cmdlib/cmdlib.cpp
- Radiant is now Vista compatible (Aero must be disabled)
[xonotic/netradiant.git] / libs / cmdlib / cmdlib.cpp
index 23fdd5f64448e34919ad360ef0ee84328de72771..a09ed9ead1a39e9106e08a534d85b0bde7c2fea5 100644 (file)
@@ -32,15 +32,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "os/path.h"
 #include "container/array.h"
 
-#ifdef WIN32
-  #include <windows.h>
-#endif
-#if defined (__linux__) || defined (__APPLE__)
-  #include <unistd.h>
-#endif
 
+#if defined (POSIX)
+
+#include <unistd.h>
 
-#if defined (__linux__) || defined (__APPLE__)
 bool Q_Exec(const char *cmd, char *cmdline, const char *, bool)
 {
   char fullcmd[2048];
@@ -82,9 +78,11 @@ bool Q_Exec(const char *cmd, char *cmdline, const char *, bool)
   }
   return true;
 }
-#endif
 
-#ifdef WIN32
+#elif defined(WIN32)
+
+#include <windows.h>
+
 // NOTE TTimo windows is VERY nitpicky about the syntax in CreateProcess
 bool Q_Exec(const char *cmd, char *cmdline, const char *execdir, bool bCreateConsole)
 {
@@ -126,5 +124,6 @@ bool Q_Exec(const char *cmd, char *cmdline, const char *execdir, bool bCreateCon
     return true;
   return false;
 }
+
 #endif