ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/vm_alloc.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/vm_alloc.cpp (file contents):
Revision 1.32 by asvitkine, 2009-08-11T07:43:46Z vs.
Revision 1.33 by asvitkine, 2011-12-30T20:37:30Z

# Line 39 | Line 39
39   #include <limits.h>
40   #include "vm_alloc.h"
41  
42 + #if defined(__APPLE__) && defined(__MACH__)
43 + #include <sys/utsname.h>
44 + #endif
45 +
46   #ifdef HAVE_MACH_VM
47   #ifndef HAVE_MACH_TASK_SELF
48   #ifdef HAVE_TASK_SELF
# Line 181 | Line 185 | int vm_init(void)
185                  return -1;
186   #endif
187   #endif
188 +
189 + // On 10.4 and earlier, reset CrashReporter's task signal handler to
190 + // avoid having it show up for signals that get handled.
191 + #if defined(__APPLE__) && defined(__MACH__)
192 +        struct utsname info;
193 +
194 +        if (!uname(&info) && atoi(info.release) <= 8) {
195 +                task_set_exception_ports(mach_task_self(),
196 +                        EXC_MASK_BAD_ACCESS | EXC_MASK_ARITHMETIC,
197 +                        MACH_PORT_NULL,
198 +                        EXCEPTION_STATE_IDENTITY,
199 +                        MACHINE_THREAD_STATE);
200 +        }
201 + #endif
202 +
203          return 0;
204   }
205  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines