From d8e91e46262bc44006913e6796843909f1ac7bcd Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 19 Jan 2019 10:01:25 +0000 Subject: Vendor import of llvm trunk r351319 (just before the release_80 branch point): https://llvm.org/svn/llvm-project/llvm/trunk@351319 --- lib/Support/LockFileManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Support/LockFileManager.cpp') diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index 77baf7ac4bdd..c166230ba3a3 100644 --- a/lib/Support/LockFileManager.cpp +++ b/lib/Support/LockFileManager.cpp @@ -24,7 +24,7 @@ #include #include #include -#if _WIN32 +#ifdef _WIN32 #include #endif #if LLVM_ON_UNIX @@ -295,7 +295,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { if (getState() != LFS_Shared) return Res_Success; -#if _WIN32 +#ifdef _WIN32 unsigned long Interval = 1; #else struct timespec Interval; @@ -310,7 +310,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { // finish up and remove the lock file. // FIXME: Should we hook in to system APIs to get a notification when the // lock file is deleted? -#if _WIN32 +#ifdef _WIN32 Sleep(Interval); #else nanosleep(&Interval, nullptr); @@ -329,7 +329,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { return Res_OwnerDied; // Exponentially increase the time we wait for the lock to be removed. -#if _WIN32 +#ifdef _WIN32 Interval *= 2; #else Interval.tv_sec *= 2; @@ -340,7 +340,7 @@ LockFileManager::WaitForUnlockResult LockFileManager::waitForUnlock() { } #endif } while ( -#if _WIN32 +#ifdef _WIN32 Interval < MaxSeconds * 1000 #else Interval.tv_sec < (time_t)MaxSeconds -- cgit v1.2.3