diff --git a/xmltest.cpp b/xmltest.cpp index 18a0494..ace309f 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -1,16 +1,18 @@ #include "tinyxml2.h" -#include #include #include #include #if defined( _MSC_VER ) + #include // _mkdir #include #define WIN32_LEAN_AND_MEAN #include _CrtMemState startMemState; _CrtMemState endMemState; +#else + #include // mkdir #endif using namespace tinyxml2; @@ -156,7 +158,11 @@ int main( int /*argc*/, const char ** /*argv*/ ) #pragma warning ( disable : 4996 ) // Fail to see a compelling reason why this should be deprecated. #endif - mkdir( "resources/out/" ); + #if defined(_MSC_VER) + _mkdir( "resources/out/" ); + #else + mkdir( "resources/out/", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); + #endif FILE* fp = fopen( "resources/dream.xml", "r" ); if ( !fp ) {