mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-22 13:13:57 +00:00
Add macOS support
This commit is contained in:
@@ -30,12 +30,20 @@
|
||||
#define NO_INLINE __attribute__((noinline))
|
||||
|
||||
#define DECLSPEC_ALIGN(n) alignas(n)
|
||||
#define _fseeki64 fseeko64
|
||||
#define _ftelli64 ftello64
|
||||
#define fopen_s fopen
|
||||
|
||||
#define RESTRICTED_POINTER __restrict
|
||||
// TODO: warning stdcall problem
|
||||
#define WINAPI
|
||||
|
||||
#ifdef OS_MAC
|
||||
#define _fseeki64 fseeko
|
||||
#define _ftelli64 ftello
|
||||
#define _stat64 stat
|
||||
#else
|
||||
#define _fseeki64 fseeko64
|
||||
#define _ftelli64 ftello64
|
||||
#define _stat64 stat64
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -28,12 +28,12 @@ namespace utils::io
|
||||
io::create_directory(file.parent_path());
|
||||
}
|
||||
|
||||
std::basic_ofstream<uint8_t> stream(
|
||||
std::ofstream stream(
|
||||
file, std::ios::binary | std::ofstream::out | (append ? std::ofstream::app : std::ofstream::out));
|
||||
|
||||
if (stream.is_open())
|
||||
{
|
||||
stream.write(data.data(), static_cast<std::streamsize>(data.size()));
|
||||
stream.write(reinterpret_cast<const char*>(data.data()), static_cast<std::streamsize>(data.size()));
|
||||
stream.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user