mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
Fix preprocessor checks WIN32 => _WIN32
The latter is predefined by Windows toolchains and is more reliable. Reported-by: Michael Stürmer <michael.stuermer@schaeffler.com>
This commit is contained in:
@@ -66,7 +66,7 @@ static mode_t mode_setuid = S_ISUID;
|
||||
static mode_t mode_setgid = S_ISGID;
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
#if defined(_WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
// libcurl doesn't support file:// urls for unicode filenames on Windows.
|
||||
// Convert string from UTF-8 to ACP if this is a file:// URL.
|
||||
static std::string fix_file_url_windows(const std::string& url)
|
||||
@@ -3156,7 +3156,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
#if defined(_WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
url = fix_file_url_windows(url);
|
||||
#endif
|
||||
|
||||
@@ -3411,7 +3411,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
|
||||
|
||||
unsigned long file_size = cmsys::SystemTools::FileLength(filename);
|
||||
|
||||
#if defined(WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
#if defined(_WIN32) && defined(CMAKE_ENCODING_UTF8)
|
||||
url = fix_file_url_windows(url);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user