Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
3a7f493b
Commit
3a7f493b
authored
May 30, 2019
by
Brad King
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2019-05-30 (f892bacf)
parents
c68efd19
9ef1e13b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
10 deletions
+52
-10
Source/kwsys/CMakeLists.txt
Source/kwsys/CMakeLists.txt
+10
-2
Source/kwsys/ProcessWin32.c
Source/kwsys/ProcessWin32.c
+18
-5
Source/kwsys/SystemInformation.cxx
Source/kwsys/SystemInformation.cxx
+8
-1
Source/kwsys/SystemTools.cxx
Source/kwsys/SystemTools.cxx
+8
-1
Source/kwsys/testConsoleBuf.cxx
Source/kwsys/testConsoleBuf.cxx
+8
-1
No files found.
Source/kwsys/CMakeLists.txt
View file @
3a7f493b
...
@@ -120,7 +120,14 @@ SET_PROPERTY(DIRECTORY
...
@@ -120,7 +120,14 @@ SET_PROPERTY(DIRECTORY
if
(
KWSYS_CXX_STANDARD
)
if
(
KWSYS_CXX_STANDARD
)
set
(
CMAKE_CXX_STANDARD
"
${
KWSYS_CXX_STANDARD
}
"
)
set
(
CMAKE_CXX_STANDARD
"
${
KWSYS_CXX_STANDARD
}
"
)
elseif
(
NOT DEFINED CMAKE_CXX_STANDARD AND NOT DEFINED KWSYS_CXX_STANDARD
)
elseif
(
NOT DEFINED CMAKE_CXX_STANDARD AND NOT DEFINED KWSYS_CXX_STANDARD
)
set
(
CMAKE_CXX_STANDARD 11
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
AND
"x
${
CMAKE_CXX_SIMULATE_ID
}
"
STREQUAL
"xMSVC"
AND
"x
${
CMAKE_CXX_COMPILER_FRONTEND_VARIANT
}
"
STREQUAL
"xGNU"
)
set
(
CMAKE_CXX_STANDARD 14
)
else
()
set
(
CMAKE_CXX_STANDARD 11
)
endif
()
endif
()
endif
()
# Select library components.
# Select library components.
...
@@ -1005,7 +1012,8 @@ ENDIF()
...
@@ -1005,7 +1012,8 @@ ENDIF()
ADD_DEFINITIONS
(
"-DKWSYS_NAMESPACE=
${
KWSYS_NAMESPACE
}
"
)
ADD_DEFINITIONS
(
"-DKWSYS_NAMESPACE=
${
KWSYS_NAMESPACE
}
"
)
# Disable deprecation warnings for standard C functions.
# Disable deprecation warnings for standard C functions.
IF
(
MSVC
OR
(
WIN32 AND CMAKE_C_COMPILER_ID STREQUAL
"Intel"
))
IF
(
MSVC
OR
(
WIN32
AND
(
CMAKE_C_COMPILER_ID STREQUAL
"Intel"
OR
(
CMAKE_C_COMPILER_ID STREQUAL
"Clang"
AND
"x
${
CMAKE_CXX_SIMULATE_ID
}
"
STREQUAL
"xMSVC"
))))
ADD_DEFINITIONS
(
ADD_DEFINITIONS
(
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE
...
...
Source/kwsys/ProcessWin32.c
View file @
3a7f493b
...
@@ -117,7 +117,6 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1,
...
@@ -117,7 +117,6 @@ static kwsysProcessTime kwsysProcessTimeAdd(kwsysProcessTime in1,
kwsysProcessTime
in2
);
kwsysProcessTime
in2
);
static
kwsysProcessTime
kwsysProcessTimeSubtract
(
kwsysProcessTime
in1
,
static
kwsysProcessTime
kwsysProcessTimeSubtract
(
kwsysProcessTime
in1
,
kwsysProcessTime
in2
);
kwsysProcessTime
in2
);
static
void
kwsysProcessSetExitException
(
kwsysProcess
*
cp
,
int
code
);
static
void
kwsysProcessSetExitExceptionByIndex
(
kwsysProcess
*
cp
,
int
code
,
static
void
kwsysProcessSetExitExceptionByIndex
(
kwsysProcess
*
cp
,
int
code
,
int
idx
);
int
idx
);
static
void
kwsysProcessKillTree
(
int
pid
);
static
void
kwsysProcessKillTree
(
int
pid
);
...
@@ -358,13 +357,20 @@ kwsysProcess* kwsysProcess_New(void)
...
@@ -358,13 +357,20 @@ kwsysProcess* kwsysProcess_New(void)
# pragma warning(push)
# pragma warning(push)
# ifdef __INTEL_COMPILER
# ifdef __INTEL_COMPILER
# pragma warning(disable : 1478)
# pragma warning(disable : 1478)
# elif defined __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# else
# else
# pragma warning(disable : 4996)
# pragma warning(disable : 4996)
# endif
# endif
#endif
#endif
GetVersionEx
(
&
osv
);
GetVersionEx
(
&
osv
);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning(pop)
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma warning(pop)
# endif
#endif
#endif
if
(
osv
.
dwPlatformId
==
VER_PLATFORM_WIN32_WINDOWS
)
{
if
(
osv
.
dwPlatformId
==
VER_PLATFORM_WIN32_WINDOWS
)
{
/* Win9x no longer supported. */
/* Win9x no longer supported. */
...
@@ -2269,13 +2275,20 @@ static kwsysProcess_List* kwsysProcess_List_New(void)
...
@@ -2269,13 +2275,20 @@ static kwsysProcess_List* kwsysProcess_List_New(void)
# pragma warning(push)
# pragma warning(push)
# ifdef __INTEL_COMPILER
# ifdef __INTEL_COMPILER
# pragma warning(disable : 1478)
# pragma warning(disable : 1478)
# elif defined __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# else
# else
# pragma warning(disable : 4996)
# pragma warning(disable : 4996)
# endif
# endif
#endif
#endif
GetVersionEx
(
&
osv
);
GetVersionEx
(
&
osv
);
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
#ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning(pop)
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma warning(pop)
# endif
#endif
#endif
self
->
NT4
=
self
->
NT4
=
(
osv
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
&&
osv
.
dwMajorVersion
<
5
)
?
1
(
osv
.
dwPlatformId
==
VER_PLATFORM_WIN32_NT
&&
osv
.
dwMajorVersion
<
5
)
?
1
...
@@ -2659,8 +2672,8 @@ static int kwsysProcessesAdd(HANDLE hProcess, DWORD dwProcessid,
...
@@ -2659,8 +2672,8 @@ static int kwsysProcessesAdd(HANDLE hProcess, DWORD dwProcessid,
newSize
=
kwsysProcesses
.
Size
?
kwsysProcesses
.
Size
*
2
:
4
;
newSize
=
kwsysProcesses
.
Size
?
kwsysProcesses
.
Size
*
2
:
4
;
/* Try allocating the new block of memory. */
/* Try allocating the new block of memory. */
if
(
newArray
=
(
kwsysProcessInstance
*
)
malloc
(
if
(
(
newArray
=
(
kwsysProcessInstance
*
)
malloc
(
newSize
*
sizeof
(
kwsysProcessInstance
)))
{
newSize
*
sizeof
(
kwsysProcessInstance
)))
)
{
/* Copy the old process handles to the new memory. */
/* Copy the old process handles to the new memory. */
if
(
kwsysProcesses
.
Count
>
0
)
{
if
(
kwsysProcesses
.
Count
>
0
)
{
memcpy
(
newArray
,
kwsysProcesses
.
Processes
,
memcpy
(
newArray
,
kwsysProcesses
.
Processes
,
...
...
Source/kwsys/SystemInformation.cxx
View file @
3a7f493b
...
@@ -5205,6 +5205,9 @@ bool SystemInformationImplementation::QueryOSInformation()
...
@@ -5205,6 +5205,9 @@ bool SystemInformationImplementation::QueryOSInformation()
# pragma warning(push)
# pragma warning(push)
# ifdef __INTEL_COMPILER
# ifdef __INTEL_COMPILER
# pragma warning(disable : 1478)
# pragma warning(disable : 1478)
# elif defined __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# else
# else
# pragma warning(disable : 4996)
# pragma warning(disable : 4996)
# endif
# endif
...
@@ -5217,7 +5220,11 @@ bool SystemInformationImplementation::QueryOSInformation()
...
@@ -5217,7 +5220,11 @@ bool SystemInformationImplementation::QueryOSInformation()
}
}
}
}
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning(pop)
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma warning(pop)
# endif
# endif
# endif
switch
(
osvi
.
dwPlatformId
)
{
switch
(
osvi
.
dwPlatformId
)
{
...
...
Source/kwsys/SystemTools.cxx
View file @
3a7f493b
...
@@ -4366,6 +4366,9 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
...
@@ -4366,6 +4366,9 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
# pragma warning(push)
# pragma warning(push)
# ifdef __INTEL_COMPILER
# ifdef __INTEL_COMPILER
# pragma warning(disable : 1478)
# pragma warning(disable : 1478)
# elif defined __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# else
# else
# pragma warning(disable : 4996)
# pragma warning(disable : 4996)
# endif
# endif
...
@@ -4375,7 +4378,11 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
...
@@ -4375,7 +4378,11 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
return
0
;
return
0
;
}
}
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# pragma warning(pop)
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma warning(pop)
# endif
# endif
# endif
switch
(
osvi
.
dwPlatformId
)
{
switch
(
osvi
.
dwPlatformId
)
{
...
...
Source/kwsys/testConsoleBuf.cxx
View file @
3a7f493b
...
@@ -499,6 +499,9 @@ static int testConsole()
...
@@ -499,6 +499,9 @@ static int testConsole()
# pragma warning(push)
# pragma warning(push)
# ifdef __INTEL_COMPILER
# ifdef __INTEL_COMPILER
# pragma warning(disable : 1478)
# pragma warning(disable : 1478)
# elif defined __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
# else
# else
# pragma warning(disable : 4996)
# pragma warning(disable : 4996)
# endif
# endif
...
@@ -506,7 +509,11 @@ static int testConsole()
...
@@ -506,7 +509,11 @@ static int testConsole()
const
bool
isVistaOrGreater
=
const
bool
isVistaOrGreater
=
LOBYTE
(
LOWORD
(
GetVersion
()))
>=
HIBYTE
(
_WIN32_WINNT_VISTA
);
LOBYTE
(
LOWORD
(
GetVersion
()))
>=
HIBYTE
(
_WIN32_WINNT_VISTA
);
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersion
# pragma warning(pop)
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma warning(pop)
# endif
# endif
# endif
if
(
!
isVistaOrGreater
)
{
if
(
!
isVistaOrGreater
)
{
if
(
RegOpenKeyExW
(
HKEY_CURRENT_USER
,
L"Console"
,
0
,
KEY_READ
|
KEY_WRITE
,
if
(
RegOpenKeyExW
(
HKEY_CURRENT_USER
,
L"Console"
,
0
,
KEY_READ
|
KEY_WRITE
,
...
...
Brad King
@brad.king
mentioned in commit
ec4d70b5
·
May 31, 2019
mentioned in commit
ec4d70b5
mentioned in commit ec4d70b564f8ac2928cf27aaa10d57ac2a8226bc
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment