mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Fixed SIGFPE on *BSD.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5133 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
00df0a12c7
commit
e5d4612f25
2 changed files with 18 additions and 0 deletions
|
@ -498,6 +498,17 @@ static BOOL double_release_check_enabled = NO;
|
|||
{
|
||||
if (self == [NSObject class])
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
|
||||
// problems on *BSD)
|
||||
|
||||
volatile short cw;
|
||||
|
||||
__asm__ volatile ("fstcw (%0)" : : "g" (&cw));
|
||||
cw |= 1; /* Mask 'invalid' exception */
|
||||
__asm__ volatile ("fldcw (%0)" : : "g" (&cw));
|
||||
#endif
|
||||
|
||||
// Create the global lock
|
||||
gnustep_global_lock = [[NSRecursiveLock alloc] init];
|
||||
autorelease_class = [NSAutoreleasePool class];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue