Skip to content

Commit

Permalink
Address JanK's PR feedback
Browse files Browse the repository at this point in the history
I fulltext-searched CoreCLR source code and I have found almost no
conditional checks for Windows. I ended up using _WINNT_
and it seems to work.

Thanks

Tomas
  • Loading branch information
trylek committed Sep 22, 2019
1 parent cda347f commit 187f1ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/coreclr/hosts/corerun/corerun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,18 +459,18 @@ bool TryLoadHostPolicy(StackSString& hostPolicyPath)
}

// Use proper prefix / extension for the host policy dynamic library
#if defined(__APPLE__)
#if defined(_WINNT_)
static const WCHAR LibraryPrefix[] = L"";
static const WCHAR LibrarySuffix[] = L".dll";
static const WCHAR PathSeparator = L'\\';
#elif defined(__APPLE__)
static const WCHAR LibraryPrefix[] = u"lib";
static const WCHAR LibrarySuffix[] = u".dylib";
static const WCHAR PathSeparator = u'/';
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
#else // Various Linux-related OS-es
static const WCHAR LibraryPrefix[] = u"lib";
static const WCHAR LibrarySuffix[] = u".so";
static const WCHAR PathSeparator = u'/';
#else
static const WCHAR LibraryPrefix[] = L"";
static const WCHAR LibrarySuffix[] = L".dll";
static const WCHAR PathSeparator = L'\\';
#endif

SString::CIterator fileNamePos = hostPolicyPath.End();
Expand Down

0 comments on commit 187f1ec

Please sign in to comment.