dmsc / emu2

Simple x86 and DOS emulator for the Linux terminal.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Small change for OSX (no /proc)

tsupplis opened this issue · comments

Here is a suggestion for macOS support

dos.c:796

#if defined(APPLE) && defined(MACH)
uint32_t length=4096;
int _NSGetExecutablePath(char * buf, uint32_t * length);
if(_NSGetExecutablePath(exe_path,&length))
print_error("can't get emulator path.\n");
#else
if(readlink("/proc/self/exe", exe_path, 4096) == -1)
print_error("can't get emulator path.\n");
#endif

commented

Please, review my pull request #4 , if it works OK I will merge it.