Explorar o código

Adds conditional include of io.h when compiling with MinGW

Martinsh Shaiters %!s(int64=13) %!d(string=hai) anos
pai
achega
39ddc268cb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      xmltest.cpp

+ 3 - 1
xmltest.cpp

@@ -14,6 +14,8 @@
 	#include <windows.h>
 	_CrtMemState startMemState;
 	_CrtMemState endMemState;
+#elif defined(MINGW32) || defined(__MINGW32__)
+    #include <io.h>  // mkdir
 #else
 	#include <sys/stat.h>	// mkdir
 #endif
@@ -156,7 +158,7 @@ int main( int /*argc*/, const char ** /*argv*/ )
 		_CrtMemCheckpoint( &startMemState );
 	#endif
 
-	#if defined(_MSC_VER)
+	#if defined(_MSC_VER) || defined(MINGW32) || defined(__MINGW32__)
 		_mkdir( "resources/out/" );
 	#else
 		mkdir( "resources/out/", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);