]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Make it compile with mingw32 again
authorDale Weiler <killfieldengine@gmail.com>
Fri, 11 Oct 2013 08:58:49 +0000 (04:58 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Fri, 11 Oct 2013 08:58:49 +0000 (04:58 -0400)
ansi.c
ftepp.c

diff --git a/ansi.c b/ansi.c
index 52399df78ca538a156e99eeb03dc087899e3bc74..e69e9e835aa468d235eb78876e93abb8374bc75d 100644 (file)
--- a/ansi.c
+++ b/ansi.c
@@ -157,7 +157,16 @@ long platform_ftell(FILE *stream) {
 }
 
 int platform_mkdir(const char *path, int mode) {
+    /*
+     * For some reason mingw32 just doesn't have a correct mkdir impl
+     * so we handle that here.
+     */
+#   ifdef _WIN32
+    (void)mode;
+    return mkdir(path);
+#   else
     return mkdir(path, mode);
+#   endif /*!_WIN32*/
 }
 
 DIR *platform_opendir(const char *path) {
diff --git a/ftepp.c b/ftepp.c
index e3cbb0d2637b6c989ed96178fe18f4b4bca3b2c7..2a19130989d50fd69c4bd5c6525339383bd34930 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
  */
 #include <string.h>
 #include <stdlib.h>
+#include <sys/stat.h>
 
 #include "gmqcc.h"
 #include "lexer.h"
 #include "platform.h"
 
 #define HT_MACROS 1024
+
 typedef struct {
     bool on;
     bool was_on;