From 42aec16cc310fed899f12566ad497d8b478cf8eb Mon Sep 17 00:00:00 2001 From: lorien420 Date: Fri, 13 May 2005 19:00:02 +0000 Subject: [PATCH] - Fixed a mkdir bug on Windows. In mingw32 localdata would just never be created. Sucks eh? Fixed now. --- src/Attack.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Attack.cxx b/src/Attack.cxx index f7a6aa5..2e2825e 100644 --- a/src/Attack.cxx +++ b/src/Attack.cxx @@ -63,7 +63,6 @@ using namespace std; * * Issues and Watches * slow if left sitting a long time before game start - * gtk+ frontend * central server for online game setup * remove dying_count_2 * find and use correct GL_LIGHT_MODEL_COLOR_CONTROL defines @@ -253,18 +252,19 @@ void parseCommandLine ( int argc, char **argv, int &mode, int &port, usage(); } +#define MKDIR(x,y) (mkdir(x, y)) +#ifdef _WIN32 +# include +# undef MKDIR +# define MKDIR(x,y) (_mkdir(x)) +#endif + void setupLocalDataDirectory ( ) { char local_directory[256]; TextureLoader::buildLocalDataDirectoryName(local_directory); if (!TextureLoader::fileExists(local_directory) -#ifndef _WIN32 - && mkdir(local_directory, 0777) -#else -#ifndef __MINGW32__ - && _mkdir(local_directory) -#endif -#endif + && MKDIR(local_directory, 0777) ) { cerr << "Error creating local data directory '" << local_directory << "'." << endl; -- 2.11.4.GIT