mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
OpenBSD fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30489 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5aa6838ebe
commit
2edc03af19
2 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-05-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSObject.h:
|
||||
Floating point fix for openbsd suggested by Sebastian Reitenbach
|
||||
|
||||
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSAttributedString.m (-initWithCoder:, -encodeWithCoder:):
|
||||
|
|
|
@ -1016,11 +1016,21 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
|||
finalize_imp = get_imp(self, finalize_sel);
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__) && defined(__i386__)
|
||||
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386__)
|
||||
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
|
||||
// problems on *BSD)
|
||||
// Note this only works on x86
|
||||
# if defined(FE_INVALID)
|
||||
fedisableexcept(FE_INVALID);
|
||||
# else
|
||||
{
|
||||
volatile short cw;
|
||||
|
||||
__asm__ volatile ("fstcw (%0)" : : "g" (&cw));
|
||||
cw |= 1; /* Mask 'invalid' exception */
|
||||
__asm__ volatile ("fldcw (%0)" : : "g" (&cw));
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
|
|
Loading…
Reference in a new issue