]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - con.c
No more hacks
[xonotic/gmqcc.git] / con.c
diff --git a/con.c b/con.c
index 7406caed3fc67ab25a01bdc476645cb9b395d253..3fca6ef76fbdd8a576e85beaec822e700581e704 100644 (file)
--- a/con.c
+++ b/con.c
  * + some other things likewise.
  */
 #ifndef _WIN32
  * + some other things likewise.
  */
 #ifndef _WIN32
-#include <unistd.h>
+#   include <unistd.h>
+#else
+#   include <io.h>
+    /*
+     * Windows and it's posix underscore bullshit.  We simply fix this
+     * with yay, another macro :P
+     */
+#   define isatty _isatty
 #endif
 
 #define GMQCC_IS_STDOUT(X) ((FILE*)((void*)X) == stdout)
 #endif
 
 #define GMQCC_IS_STDOUT(X) ((FILE*)((void*)X) == stdout)
@@ -59,12 +66,6 @@ typedef struct {
 #define STDERR_FILENO 2
 #define STDOUT_FILENO 1
 
 #define STDERR_FILENO 2
 #define STDOUT_FILENO 1
 
-/*
- * Windows and it's posix underscore bullshit.  We simply fix this
- * with yay, another macro :P
- */
-#define isatty _isatty
-
 enum {
     RESET = 0,
     BOLD  = 1,
 enum {
     RESET = 0,
     BOLD  = 1,