diff options
author | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 06:31:01 +0000 |
---|---|---|
committer | pauldubois <pauldubois@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 06:31:01 +0000 |
commit | 8a737d409cea505589f5b67fab49f138265a8174 (patch) | |
tree | df38e20bb1eed6abd6c3603094e109aec11fa96e /crawl-ref/source/files.cc | |
parent | 70b1954c4daae8ee3f364481d0bc245a81720513 (diff) | |
download | crawl-ref-8a737d409cea505589f5b67fab49f138265a8174.tar.gz crawl-ref-8a737d409cea505589f5b67fab49f138265a8174.zip |
Another batch of msvc compile fixes.
Added wrapper implementation for opendir/readdir
Other functions left stubbed out.
It's a shame that crawl's "direct.h" conflicts with <direct.h>.
Fixed up use of AppHdr.h in a couple places (it must be included first);
changed project to use precompiled headers.
crawl now compiles cleanly but doesn't link.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3573 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index de893583a1..a1572e51cd 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -52,7 +52,10 @@ #include <sys/types.h> #include <sys/stat.h> -#if !_MSC_VER +#if _MSC_VER +// # include <direct.h> conflicts with crawl's header. Yes this sucks +# include <c:/Program Files/Microsoft Visual Studio 8/VC/include/direct.h> +#else #include <dirent.h> #endif @@ -113,7 +116,7 @@ void save_level(int level_saved, level_area_type lt, // 2: append piety_hysteresis to TAG_YOU #define YOU_MINOR_VERSION 2 -const short GHOST_SIGNATURE = static_cast<short>( 0xDC55 ); +const short GHOST_SIGNATURE = short( 0xDC55 ); static void redraw_all(void) { @@ -333,6 +336,8 @@ static int create_directory(const char *dir) return mkdir(dir, SHARED_FILES_CHMOD_PUBLIC | 0111); #elif defined(DOS) return mkdir(dir, 0755); +#elif defined(_MSC_VER) + return _mkdir(dir); #else return mkdir(dir); #endif |