From: Alexei S. <ale...@gm...> - 2009-08-11 07:44:34
|
Thanks. Committed. -Alexei On Sun, Aug 9, 2009 at 7:45 PM, Michael Schmitt<msb2ssdev@me> wrote: > Attached is a patch to Basilisk II, to fix a problem seen in SheepShaver. > > 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. > > There are no changes to the calling programs. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > basilisk-devel mailing list > bas...@li... > https://lists.sourceforge.net/lists/listinfo/basilisk-devel > > |