diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-11-01 19:26:19 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-11-01 19:26:19 (GMT) |
commit | cca30e678df5ee2d9ce80bd72610e6aeb1afa60b (patch) | |
tree | 2c53f045d71ab31353dfdbbe08d03ca6d96c25d0 | |
parent | cc6ce9f7b70de17108380e55b39fa98658e2cdca (diff) | |
parent | 6c554dbe4466d4485bab6f2aeecd24b8b828a766 (diff) | |
download | Ninja-cca30e678df5ee2d9ce80bd72610e6aeb1afa60b.zip Ninja-cca30e678df5ee2d9ce80bd72610e6aeb1afa60b.tar.gz Ninja-cca30e678df5ee2d9ce80bd72610e6aeb1afa60b.tar.bz2 |
Merge pull request #825 from Rapptz/master
Suppress warnings from building with MinGW
-rw-r--r-- | src/disk_interface.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/disk_interface.cc b/src/disk_interface.cc index 1a79fb0..9810708 100644 --- a/src/disk_interface.cc +++ b/src/disk_interface.cc @@ -82,8 +82,10 @@ TimeStamp StatSingleFile(const string& path, bool quiet) { return TimeStampFromFileTime(attrs.ftLastWriteTime); } +#ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4996) // GetVersionExA is deprecated post SDK 8.1. +#endif bool IsWindows7OrLater() { OSVERSIONINFO version_info = { sizeof(version_info) }; if (!GetVersionEx(&version_info)) @@ -91,7 +93,9 @@ bool IsWindows7OrLater() { return version_info.dwMajorVersion > 6 || (version_info.dwMajorVersion == 6 && version_info.dwMinorVersion >= 1); } +#ifdef _MSC_VER #pragma warning(pop) +#endif bool StatAllFilesInDir(const string& dir, map<string, TimeStamp>* stamps, bool quiet) { |