mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-17 22:00:37 +02:00
Merge pull request #3773 from bylaws/win-fixes
Windows: Small fixes for compat with newer toolchains/wine versions
This commit is contained in:
5 files changed
+10
-14
No files matched your search
@@ -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()
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -9,4 +9,4 @@ EXPORTS
|
||||
NtGetContextThread
|
||||
NtContinue
|
||||
__wine_dbg_output
|
||||
__wine_unix_call
|
||||
__wine_unix_call_dispatcher DATA
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user