mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 01:01:12 +00:00
Merge topic 'update-kwsys'
5eb3244260Merge branch 'upstream-KWSys' into update-kwsys40ee224f0aKWSys 2026-08-08 (ea3b2a5a) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !12385
This commit is contained in:
@@ -879,22 +879,25 @@ endif()
|
||||
|
||||
# For building kwsys itself, we use a macro defined on the command
|
||||
# line to configure the namespace in the C and C++ source files.
|
||||
add_definitions("-DKWSYS_NAMESPACE=${KWSYS_NAMESPACE}")
|
||||
add_compile_definitions(KWSYS_NAMESPACE=${KWSYS_NAMESPACE})
|
||||
|
||||
# Disable deprecation warnings for standard C functions.
|
||||
if(MSVC OR (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "Intel" OR
|
||||
(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))))
|
||||
add_definitions(
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_DEPRECATE
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
-D_SCL_SECURE_NO_DEPRECATE
|
||||
add_compile_definitions(
|
||||
_CRT_NONSTDC_NO_DEPRECATE
|
||||
_CRT_SECURE_NO_DEPRECATE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
_SCL_SECURE_NO_DEPRECATE
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Help enforce the use of wide Windows apis.
|
||||
add_definitions(-DUNICODE -D_UNICODE)
|
||||
add_compile_definitions(UNICODE _UNICODE)
|
||||
|
||||
# Minimize "windows.h". We include granular Windows SDK headers as needed.
|
||||
add_compile_definitions(WIN32_LEAN_AND_MEAN)
|
||||
endif()
|
||||
|
||||
if(KWSYS_USE_String)
|
||||
|
||||
@@ -30,6 +30,7 @@ a UNIX-style select system call.
|
||||
#endif
|
||||
#include <io.h> /* _unlink */
|
||||
#include <stdio.h> /* snprintf */
|
||||
#include <stdlib.h> /* malloc */
|
||||
#include <string.h> /* strlen, strdup */
|
||||
|
||||
#ifndef _MAX_FNAME
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
using siginfo_t = int;
|
||||
# endif
|
||||
# include <powerbase.h>
|
||||
# include <winternl.h> // NTSTATUS
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
|
||||
|
||||
@@ -1345,7 +1345,7 @@ bool SystemTools::FileExists(std::string const& filename)
|
||||
return false;
|
||||
}
|
||||
|
||||
byte buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
BYTE buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
DWORD bytesReturned = 0;
|
||||
|
||||
if (!DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT, nullptr, 0, buffer,
|
||||
@@ -3091,7 +3091,7 @@ bool SystemTools::FileIsSymlinkWithAttr(std::wstring const& path,
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
return false;
|
||||
}
|
||||
byte buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
BYTE buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
DWORD bytesReturned = 0;
|
||||
if (!DeviceIoControl(hFile, FSCTL_GET_REPARSE_POINT, nullptr, 0, buffer,
|
||||
MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &bytesReturned,
|
||||
@@ -3157,7 +3157,7 @@ Status SystemTools::ReadSymlink(std::string const& newName,
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
return Status::Windows_GetLastError();
|
||||
}
|
||||
byte buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
BYTE buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
|
||||
DWORD bytesReturned = 0;
|
||||
Status status;
|
||||
if (!DeviceIoControl(hFile, FSCTL_GET_REPARSE_POINT, nullptr, 0, buffer,
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <windows.h>
|
||||
|
||||
# include <shellapi.h>
|
||||
#else
|
||||
# include <signal.h>
|
||||
# include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user