From 78d6bb9b6794c01308dba313f75e205d43f95e23 Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Thu, 19 Jun 2014 11:22:44 -0700 Subject: use local definition of FindExInfoBasic for earlier sdks --- src/disk_interface.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/disk_interface.cc b/src/disk_interface.cc index dfea469..c329aa3 100644 --- a/src/disk_interface.cc +++ b/src/disk_interface.cc @@ -97,8 +97,11 @@ bool StatAllFilesInDir(const string& dir, map* stamps, bool quiet) { // FindExInfoBasic is 30% faster than FindExInfoStandard. static bool can_use_basic_info = IsWindows7OrLater(); + // This is not in earlier SDKs. + const FINDEX_INFO_LEVELS kFindExInfoBasic = + static_cast(1); FINDEX_INFO_LEVELS level = - can_use_basic_info ? FindExInfoBasic : FindExInfoStandard; + can_use_basic_info ? kFindExInfoBasic : FindExInfoStandard; WIN32_FIND_DATAA ffd; HANDLE find_handle = FindFirstFileExA((dir + "\\*").c_str(), level, &ffd, FindExSearchNameMatch, NULL, 0); -- cgit v0.12