mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-02 21:04:57 +00:00
Basilisk II and SheepShaver Macintosh emulators
c6d88f213c
SheepShaver includes the C errno string in many error messages. One case is when it calls the memory allocation routines in the Basilisk II vm_alloc.cpp program. This works when the memory allocation routine uses functions that set errno (such as mmap or malloc). For example, running SheepShaver on a Linux hosts produces meaningful error messages. The problem is that when run on an OS X host, the memory allocation uses Mach routines such as vm_allocate, which do not set errno. So when SheepShaver reported the error, it used a stale value of errno, which happened to be 17. The result was an extremely misleading error message: "Cannot map RAM: File already exists". The fix is to change vm_alloc so that it translates Mac return codes into POSIX errno values. It also initializes errno to 0 at the start of the memory allocation routine, so that no matter what path it takes, it won't return a stale value. |
||
---|---|---|
BasiliskII | ||
CVSROOT | ||
SheepShaver |