mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
11d14c597d
commit
a8ce0b2efb
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Thu Nov 4 1999 Michael Hanni <mhanni@sprintmail.com>
|
||||||
|
|
||||||
|
* Source/NSObject.m: added FreeBSD specific code in
|
||||||
|
initialization so that the FPU is intialized with the correct
|
||||||
|
exception flag. This allows NSConnection to work on FreeBSD (gdnc,
|
||||||
|
gdomap, gpbs.)
|
||||||
|
|
||||||
Thu Nov 4 10:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Thu Nov 4 10:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSArray.m: use NSLog() to warn about attempts to remove nil.
|
* Source/NSArray.m: use NSLog() to warn about attempts to remove nil.
|
||||||
|
|
|
@ -498,6 +498,17 @@ static BOOL double_release_check_enabled = NO;
|
||||||
{
|
{
|
||||||
if (self == [NSObject class])
|
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
|
// Create the global lock
|
||||||
gnustep_global_lock = [[NSRecursiveLock alloc] init];
|
gnustep_global_lock = [[NSRecursiveLock alloc] init];
|
||||||
autorelease_class = [NSAutoreleasePool class];
|
autorelease_class = [NSAutoreleasePool class];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue