From 475091c67389ed61cf7589c9b7037fbd8c916b70 Mon Sep 17 00:00:00 2001 From: Steven Noonan Date: Tue, 13 Oct 2009 03:18:38 -0700 Subject: platform detection: clean up abuse of '_MSC_VER' macro Use TARGET_COMPILER_VC instead, unless you need to find the Visual C++ version information. Signed-off-by: Steven Noonan --- crawl-ref/source/files.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 303ea417d6..8d4dceaf98 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -79,7 +79,7 @@ REVISION("$Rev$"); #include "tutorial.h" #include "view.h" -#if _MSC_VER +#ifdef TARGET_COMPILER_VC #include #define WIN32_LEAN_AND_MEAN #include @@ -227,7 +227,7 @@ std::vector get_dir_files(const std::string &dirname) { std::vector files; -#ifdef _MSC_VER +#ifdef TARGET_COMPILER_VC WIN32_FIND_DATA lData; std::string dir = dirname; if (!dir.empty() && dir[dir.length() - 1] != FILE_SEPARATOR) @@ -387,7 +387,7 @@ bool file_exists(const std::string &name) // Low-tech existence check. bool dir_exists(const std::string &dir) { -#ifdef _MSC_VER +#ifdef TARGET_COMPILER_VC DWORD lAttr = GetFileAttributes(dir.c_str()); return (lAttr != INVALID_FILE_ATTRIBUTES && (lAttr & FILE_ATTRIBUTE_DIRECTORY)); @@ -411,7 +411,7 @@ static int _create_directory(const char *dir) return mkdir(dir, SHARED_FILES_CHMOD_PUBLIC | 0111); #elif defined(TARGET_OS_DOS) return mkdir(dir, 0755); -#elif defined(_MSC_VER) +#elif defined(TARGET_COMPILER_VC) return _mkdir(dir); #else return mkdir(dir); -- cgit v1.2.3-54-g00ecf