mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +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
c4a0051b20
commit
657809714f
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>
|
2010-05-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSAttributedString.m (-initWithCoder:, -encodeWithCoder:):
|
* 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);
|
finalize_imp = get_imp(self, finalize_sel);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__) && defined(__i386__)
|
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386__)
|
||||||
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
|
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
|
||||||
// problems on *BSD)
|
// problems on *BSD)
|
||||||
// Note this only works on x86
|
// Note this only works on x86
|
||||||
|
# if defined(FE_INVALID)
|
||||||
fedisableexcept(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
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue