Merge pull request #3773 from bylaws/win-fixes

Windows: Small fixes for compat with newer toolchains/wine versions
This commit is contained in:
Ryan Houdek authored and GitHub committed 2024-06-27 15:14:20 -07:00
commit 4e5da4946d
5 files changed
+10 -14

No files matched your search

-10
View File
@@ -367,16 +367,6 @@ function(AddLibrary Name Type)
target_link_libraries(${Name} FEXCore_Base)
target_compile_options(${Name} PRIVATE ${FEX_TUNE_COMPILE_FLAGS})
set_target_properties(${Name} PROPERTIES OUTPUT_NAME FEXCore)
if (MINGW_BUILD)
# Mingw build isn't building a linux shared library, so it can't have a SONAME.
set_target_properties(${Name} PROPERTIES NO_SONAME ON)
# Change the suffixes otherwise cmake continues using .a and .so
if (${Type} STREQUAL SHARED)
set_target_properties(${Name} PROPERTIES SUFFIX ".dll")
elseif(${Type} STREQUAL STATIC)
set_target_properties(${Name} PROPERTIES SUFFIX ".lib")
endif()
endif()
AddDefaultOptionsToTarget(${Name})
endfunction()
+2 -2
View File
@@ -81,7 +81,7 @@ ssize_t LoadFileToBuffer(const fextl::string& Filepath, std::span<char> Buffer)
#else
template<typename T>
static bool LoadFileImpl(T& Data, const fextl::string& Filepath, size_t FixedSize) {
std::ifstream f(Filepath, std::ios::binary | std::ios::ate);
std::ifstream f(Filepath.c_str(), std::ios::binary | std::ios::ate);
if (f.fail()) {
return false;
}
@@ -93,7 +93,7 @@ static bool LoadFileImpl(T& Data, const fextl::string& Filepath, size_t FixedSiz
}
ssize_t LoadFileToBuffer(const fextl::string& Filepath, std::span<char> Buffer) {
std::ifstream f(Filepath, std::ios::binary | std::ios::ate);
std::ifstream f(Filepath.c_str(), std::ios::binary | std::ios::ate);
return f.readsome(Buffer.data(), Buffer.size());
}
+2
View File
@@ -47,6 +47,8 @@ uint64_t SetSignalMask(uint64_t Mask) {
#ifndef _WIN32
::syscall(SYS_rt_sigprocmask, SIG_SETMASK, &Mask, &Mask, 8);
return Mask;
#else
return 0;
#endif
}
+1 -1
View File
@@ -9,4 +9,4 @@ EXPORTS
NtGetContextThread
NtContinue
__wine_dbg_output
__wine_unix_call
__wine_unix_call_dispatcher DATA
+5 -1
View File
@@ -11,7 +11,11 @@ extern "C" {
typedef UINT64 unixlib_handle_t;
NTSTATUS WINAPI __wine_unix_call(unixlib_handle_t handle, unsigned int code, void* args);
extern NTSTATUS(WINAPI* __wine_unix_call_dispatcher)(unixlib_handle_t, unsigned int, void*);
static inline NTSTATUS __wine_unix_call(unixlib_handle_t handle, unsigned int code, void* args) {
return __wine_unix_call_dispatcher(handle, code, args);
}
#ifdef __cplusplus
}