mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 01:21:17 +00:00
- Merged "- fixed Windows XP compatibility for MSVC 2017 targets".
Workaround initially implemented for MSVC 2015 is enabled with all Windows XP compatible toolsets regardless of Visual Studio version (patch by _mental_) Still it's a VS bug.
This commit is contained in:
parent
60929f353f
commit
d6369978b9
2 changed files with 5 additions and 9 deletions
|
@ -457,11 +457,6 @@ if( NOT MSVC )
|
||||||
add_definitions( -D__forceinline=inline )
|
add_definitions( -D__forceinline=inline )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Fix stat in v140_xp (broken in RTM and Update 1 so far)
|
|
||||||
if( MSVC AND ( CMAKE_GENERATOR_TOOLSET STREQUAL "v140_xp" OR CMAKE_GENERATOR_TOOLSET STREQUAL "v141_xp" ) )
|
|
||||||
add_definitions( -D_stat64i32=VS14Stat )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
CHECK_LIBRARY_EXISTS( rt clock_gettime "" CLOCK_GETTIME_IN_RT )
|
CHECK_LIBRARY_EXISTS( rt clock_gettime "" CLOCK_GETTIME_IN_RT )
|
||||||
if( NOT CLOCK_GETTIME_IN_RT )
|
if( NOT CLOCK_GETTIME_IN_RT )
|
||||||
|
|
|
@ -1461,16 +1461,17 @@ FString I_GetLongPathName(FString shortpath)
|
||||||
#if defined(_MSC_VER) && defined(_USING_V110_SDK71_)
|
#if defined(_MSC_VER) && defined(_USING_V110_SDK71_)
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// VS14Stat
|
// _stat64i32
|
||||||
//
|
//
|
||||||
// Work around an issue where stat doesn't work with v140_xp. This was
|
// Work around an issue where stat() function doesn't work
|
||||||
// supposedly fixed, but as of Update 1 continues to not function on XP.
|
// with Windows XP compatible toolset.
|
||||||
|
// It uses GetFileInformationByHandleEx() which requires Windows Vista.
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
int VS14Stat(const char *path, struct _stat64i32 *buffer)
|
int _stat64i32(const char *path, struct _stat64i32 *buffer)
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||||
if(!GetFileAttributesEx(path, GetFileExInfoStandard, &data))
|
if(!GetFileAttributesEx(path, GetFileExInfoStandard, &data))
|
||||||
|
|
Loading…
Reference in a new issue