X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=libs%2Fcmdlib%2Fcmdlib.cpp;h=a09ed9ead1a39e9106e08a534d85b0bde7c2fea5;hp=23fdd5f64448e34919ad360ef0ee84328de72771;hb=3591d7dc01732577ebbb25f3818ccec8f440338f;hpb=06eb8cc3a4046af318da7f7b9fae1c04be8c0380;ds=sidebyside diff --git a/libs/cmdlib/cmdlib.cpp b/libs/cmdlib/cmdlib.cpp index 23fdd5f6..a09ed9ea 100644 --- a/libs/cmdlib/cmdlib.cpp +++ b/libs/cmdlib/cmdlib.cpp @@ -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 -#endif -#if defined (__linux__) || defined (__APPLE__) - #include -#endif +#if defined (POSIX) + +#include -#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 + // 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