diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-10 04:36:42 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-10 22:18:48 -0700 |
commit | 66c59ae9c97694a8ab33eddd266dd6f73d72fde7 (patch) | |
tree | bd27426778e720fa895635b26b6a0909300d21af /crawl-ref/source/files.cc | |
parent | 6eb4f8d4954d7ba008de2eb921d42e02993b9db5 (diff) | |
download | crawl-ref-66c59ae9c97694a8ab33eddd266dd6f73d72fde7.tar.gz crawl-ref-66c59ae9c97694a8ab33eddd266dd6f73d72fde7.zip |
project-wide: implement use of platform.h detection macros
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 6068619aba..2e627db619 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -22,7 +22,7 @@ REVISION("$Rev$"); #include <algorithm> #include <functional> -#ifdef DOS +#ifdef TARGET_OS_DOS #include <conio.h> #include <file.h> #endif @@ -32,7 +32,7 @@ REVISION("$Rev$"); #include <unistd.h> #endif -#ifdef __MINGW32__ +#ifdef TARGET_COMPILER_MINGW #include <io.h> #endif @@ -88,7 +88,7 @@ REVISION("$Rev$"); #endif #ifndef HAVE_STAT -#if defined(UNIX) || defined(__MINGW32__) || defined(DOS) +#if defined(UNIX) || defined(TARGET_COMPILER_MINGW) || defined(TARGET_OS_DOS) #define HAVE_STAT #endif #endif @@ -142,7 +142,7 @@ static bool _is_uid_file(const std::string &name, const std::string &ext) { std::string save_suffix = get_savedir_filename("", "", ""); save_suffix += ext; -#ifdef DOS +#ifdef TARGET_OS_DOS // Grumble grumble. Hang all retarded operating systems. uppercase(save_suffix); #endif @@ -198,7 +198,7 @@ static inline bool _is_good_filename(const std::string &s) return (s != "." && s != ".."); } -#if defined(DOS) +#if defined(TARGET_OS_DOS) // Abbreviates a given file name to DOS style "xxxxxx~1.txt". // Does not take into account files with differing suffixes or files // with a prepended path with more than one separator. @@ -409,7 +409,7 @@ static int _create_directory(const char *dir) { #if defined(MULTIUSER) return mkdir(dir, SHARED_FILES_CHMOD_PUBLIC | 0111); -#elif defined(DOS) +#elif defined(TARGET_OS_DOS) return mkdir(dir, 0755); #elif defined(_MSC_VER) return _mkdir(dir); @@ -514,7 +514,7 @@ std::string datafile_path(std::string basename, #else !SysEnv.crawl_dir.empty()? SysEnv.crawl_dir : "", #endif -#ifdef OSX +#ifdef TARGET_OS_MACOSX SysEnv.crawl_base + "../Resources/", #endif }; @@ -786,7 +786,7 @@ std::string get_savedir_filename(const std::string &prefix, result += extension; } -#ifdef DOS +#ifdef TARGET_OS_DOS uppercase(result); #endif return result; |