Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 78d6bb9

Browse files
committed
use local definition of FindExInfoBasic for earlier sdks
1 parent f8776ed commit 78d6bb9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/disk_interface.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@ bool StatAllFilesInDir(const string& dir, map<string, TimeStamp>* stamps,
9797
bool quiet) {
9898
// FindExInfoBasic is 30% faster than FindExInfoStandard.
9999
static bool can_use_basic_info = IsWindows7OrLater();
100+
// This is not in earlier SDKs.
101+
const FINDEX_INFO_LEVELS kFindExInfoBasic =
102+
static_cast<FINDEX_INFO_LEVELS>(1);
100103
FINDEX_INFO_LEVELS level =
101-
can_use_basic_info ? FindExInfoBasic : FindExInfoStandard;
104+
can_use_basic_info ? kFindExInfoBasic : FindExInfoStandard;
102105
WIN32_FIND_DATAA ffd;
103106
HANDLE find_handle = FindFirstFileExA((dir + "\\*").c_str(), level, &ffd,
104107
FindExSearchNameMatch, NULL, 0);

0 commit comments

Comments
 (0)