mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +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
|
@ -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>
|
||||
|
||||
* 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])
|
||||
{
|
||||
#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…
Reference in a new issue