mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
Add macOS support
This commit is contained in:
@@ -834,7 +834,7 @@ namespace
|
||||
const auto mod = c.proc.mod_manager.find_by_address(base_address);
|
||||
if (!mod)
|
||||
{
|
||||
printf("Bad address for memory image request: 0x%zX\n", base_address);
|
||||
printf("Bad address for memory image request: 0x%" PRIx64 "\n", base_address);
|
||||
return STATUS_INVALID_ADDRESS;
|
||||
}
|
||||
|
||||
@@ -1487,7 +1487,7 @@ namespace
|
||||
|
||||
for (const auto& file : std::filesystem::directory_iterator(dir))
|
||||
{
|
||||
files.emplace_back(file.path().filename());
|
||||
files.emplace_back(file_entry{.file_path = file.path().filename(),});
|
||||
}
|
||||
|
||||
return files;
|
||||
@@ -2899,13 +2899,8 @@ namespace
|
||||
const auto filename = read_unicode_string(c.emu, emulator_object<UNICODE_STRING<EmulatorTraits<Emu64>>>{c.emu, attributes.ObjectName});
|
||||
const auto u8_filename = u16_to_u8(filename);
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
struct _stat64 file_stat{};
|
||||
if (_stat64(u8_filename.c_str(), &file_stat) != 0)
|
||||
#else
|
||||
struct stat64 file_stat{};
|
||||
if (stat64(u8_filename.c_str(), &file_stat) != 0)
|
||||
#endif
|
||||
{
|
||||
return STATUS_OBJECT_NAME_NOT_FOUND;
|
||||
}
|
||||
@@ -3199,7 +3194,7 @@ namespace
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unsupported thread attribute type: %zX\n", type);
|
||||
printf("Unsupported thread attribute type: %" PRIx64 "\n", type);
|
||||
}
|
||||
}, i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user