diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/ijar/common.h | 4 | ||||
-rw-r--r-- | third_party/ijar/platform_utils.cc | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/third_party/ijar/common.h b/third_party/ijar/common.h index 05ad19fef8..c5b841aa7e 100644 --- a/third_party/ijar/common.h +++ b/third_party/ijar/common.h @@ -22,10 +22,10 @@ #include <stdint.h> #include <string.h> -#ifdef COMPILER_MSVC +#ifdef _WIN32 #define PATH_MAX 4096 typedef int mode_t; -#endif // COMPILER_MSVC +#endif // _WIN32 namespace devtools_ijar { diff --git a/third_party/ijar/platform_utils.cc b/third_party/ijar/platform_utils.cc index c73827d4b5..4e647b1b89 100644 --- a/third_party/ijar/platform_utils.cc +++ b/third_party/ijar/platform_utils.cc @@ -17,13 +17,13 @@ #include <limits.h> #include <stdio.h> -#if defined(COMPILER_MSVC) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) #include <windows.h> -#else // !(defined(COMPILER_MSVC) || defined(__CYGWIN__)) +#else // !(defined(_WIN32) || defined(__CYGWIN__)) #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> -#endif // defined(COMPILER_MSVC) || defined(__CYGWIN__) +#endif // defined(_WIN32) || defined(__CYGWIN__) #include <string> @@ -39,7 +39,7 @@ namespace devtools_ijar { using std::string; bool stat_file(const char* path, Stat* result) { -#if defined(COMPILER_MSVC) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) std::wstring wpath; std::string error; if (!blaze_util::AsAbsoluteWindowsPath(path, &wpath, &error)) { @@ -69,7 +69,7 @@ bool stat_file(const char* path, Stat* result) { } ::CloseHandle(handle); return success; -#else // !(defined(COMPILER_MSVC) || defined(__CYGWIN__)) +#else // !(defined(_WIN32) || defined(__CYGWIN__)) struct stat statst; if (stat(path, &statst) < 0) { return false; @@ -78,7 +78,7 @@ bool stat_file(const char* path, Stat* result) { result->file_mode = statst.st_mode; result->is_directory = (statst.st_mode & S_IFDIR) != 0; return true; -#endif // defined(COMPILER_MSVC) || defined(__CYGWIN__) +#endif // defined(_WIN32) || defined(__CYGWIN__) } bool write_file(const char* path, unsigned int perm, const void* data, @@ -93,10 +93,10 @@ bool read_file(const char* path, void* buffer, size_t size) { string get_cwd() { return blaze_util::GetCwd(); } bool make_dirs(const char* path, unsigned int mode) { -#ifndef COMPILER_MSVC +#ifndef _WIN32 // TODO(laszlocsomor): respect `mode` on Windows/MSVC. mode |= S_IWUSR | S_IXUSR; -#endif // not COMPILER_MSVC +#endif // not _WIN32 string spath(path); if (spath.empty()) { return true; |