mirror of https://github.com/AxioDL/tinyxml2.git
fix up mkdir on win vs. *nix
This commit is contained in:
parent
ef1c69cf15
commit
e9699e6cd2
10
xmltest.cpp
10
xmltest.cpp
|
@ -1,16 +1,18 @@
|
|||
#include "tinyxml2.h"
|
||||
|
||||
#include <direct.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
#include <direct.h> // _mkdir
|
||||
#include <crtdbg.h>
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
_CrtMemState startMemState;
|
||||
_CrtMemState endMemState;
|
||||
#else
|
||||
#include <sys/stat.h> // 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 ) {
|
||||
|
|
Loading…
Reference in New Issue