summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny <Rapptz@users.noreply.github.com>2014-09-28 09:52:08 (GMT)
committerDanny <Rapptz@users.noreply.github.com>2014-09-28 09:52:08 (GMT)
commit6c554dbe4466d4485bab6f2aeecd24b8b828a766 (patch)
treeb55a4538e6747f6955b34afc7256cc5cb52f5eb9
parent165b6d189c916ba1a2c19b5b193829b691150a65 (diff)
downloadNinja-6c554dbe4466d4485bab6f2aeecd24b8b828a766.zip
Ninja-6c554dbe4466d4485bab6f2aeecd24b8b828a766.tar.gz
Ninja-6c554dbe4466d4485bab6f2aeecd24b8b828a766.tar.bz2
Fix unknown pragma warnings
-rw-r--r--src/disk_interface.cc4
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) {