diff --git a/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsContainer.cpp b/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsContainer.cpp index a7a238d241..772469808b 100644 --- a/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsContainer.cpp +++ b/Code/Editor/Plugins/ProjectSettingsTool/ProjectSettingsContainer.cpp @@ -8,6 +8,7 @@ #include "ProjectSettingsContainer.h" +#include #include #include #include diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h b/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h index 8f456e4649..9225cca8d7 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultHandshake.h @@ -9,6 +9,7 @@ #define GM_DEFAULT_HANDSHAKE_H #include +#include namespace GridMate { diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp index 5da3c784ff..f9280d9918 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.cpp @@ -12,6 +12,7 @@ #include #include +#include using namespace GridMate; diff --git a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.h b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.h index 1d8a1f6b46..259c619f53 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.h +++ b/Code/Framework/GridMate/GridMate/Carrier/DefaultTrafficControl.h @@ -12,6 +12,8 @@ #include +#include + namespace GridMate { /** diff --git a/Code/Framework/GridMate/GridMate/Carrier/Handshake.h b/Code/Framework/GridMate/GridMate/Carrier/Handshake.h index 0f825da49b..5f67b6637c 100644 --- a/Code/Framework/GridMate/GridMate/Carrier/Handshake.h +++ b/Code/Framework/GridMate/GridMate/Carrier/Handshake.h @@ -10,6 +10,7 @@ #include #include +#include namespace GridMate { diff --git a/Code/Legacy/CryCommon/Linux_Win32Wrapper.h b/Code/Legacy/CryCommon/Linux_Win32Wrapper.h index 6507d7c8ee..912546cb7b 100644 --- a/Code/Legacy/CryCommon/Linux_Win32Wrapper.h +++ b/Code/Legacy/CryCommon/Linux_Win32Wrapper.h @@ -378,7 +378,7 @@ typedef struct _finddata_t extern int _findnext64(intptr_t last, __finddata64_t* pFindData); extern intptr_t _findfirst64(const char* pFileName, __finddata64_t* pFindData); -extern DWORD GetFileAttributes(LPCSTR lpFileName); +extern DWORD GetFileAttributesW(LPCWSTR lpFileName); extern const bool GetFilenameNoCase(const char* file, char*, const bool cCreateNew = false); diff --git a/Code/Legacy/CryCommon/WinBase.cpp b/Code/Legacy/CryCommon/WinBase.cpp index 74d383b88d..64e9d9b066 100644 --- a/Code/Legacy/CryCommon/WinBase.cpp +++ b/Code/Legacy/CryCommon/WinBase.cpp @@ -1648,12 +1648,33 @@ DWORD GetFileAttributes(LPCWSTR lpFileNameW) uint32 CryGetFileAttributes(const char* lpFileName) { - AZStd::string fn = lpFileName; adaptFilenameToLinux(fn); const char* buffer = fn.c_str(); - return GetFileAttributes(buffer); + struct stat fileStats; + const int success = stat(buffer, &fileStats); + if (success == -1) + { + char adjustedFilename[MAX_PATH]; + GetFilenameNoCase(buffer, adjustedFilename); + if (stat(adjustedFilename, &fileStats) == -1) + { + return (DWORD)INVALID_FILE_ATTRIBUTES; + } + } + DWORD ret = 0; + + const int acc = (fileStats.st_mode & S_IWRITE); + + if (acc != 0) + { + if (S_ISDIR(fileStats.st_mode) != 0) + { + ret |= FILE_ATTRIBUTE_DIRECTORY; + } + } + return (ret == 0) ? FILE_ATTRIBUTE_NORMAL : ret;//return file attribute normal as the default value, must only be set if no other attributes have been found } __finddata64_t::~__finddata64_t() diff --git a/Gems/LyShine/Code/Source/Animation/AnimSequence.cpp b/Gems/LyShine/Code/Source/Animation/AnimSequence.cpp index 43a80d5002..0b19c4a06a 100644 --- a/Gems/LyShine/Code/Source/Animation/AnimSequence.cpp +++ b/Gems/LyShine/Code/Source/Animation/AnimSequence.cpp @@ -594,6 +594,8 @@ void CUiAnimSequence::Activate() } } +typedef AZStd::fixed_string<512> stack_string; + ////////////////////////////////////////////////////////////////////////// void CUiAnimSequence::Deactivate() { diff --git a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp index 4944626d77..f46c8e229a 100644 --- a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp +++ b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp @@ -30,6 +30,7 @@ #include #include +#include #include