Skip to contentSkip to conversation

Keyboard problem in qemu 0.6.0-2

Qemu-devel Bochnig, Martin 1 participant 1 message Sep 3, 2004 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 2 lines · Juergen Keil

I use the same macros that are already used for the xxxBSDs, for example in dyngen-exec.h:

Yes - I know, (at least some)BSD's libc does not support these symbols.

I tried to use QEMU's *BSD code for a certain while, too.
But without your modifications below, it didn't work and I got a lot of trouble and I then discarded my idea (due to my success under Solaris10).

Thanks a lot!

Martin

Quoted 33 lines
(quoted diff) +2 -1
-#if defined(_BSD) && !defined(__APPLE__)
+#if defined(_BSD) && !defined(__APPLE__) || defined(_SVR4)
 #include <ieeefp.h>
 
 #define FE_TONEAREST   FP_RN
 #define FE_DOWNWARD    FP_RM
 #define FE_UPWARD      FP_RP
 #define FE_TOWARDZERO  FP_RZ
 #define fesetround(x)  fpsetround(x)
+#define fegetround()  fpgetround()
 #else
 #include <fenv.h>
 #endif
 
 #ifdef __i386__
 #define AREG0 "ebp"

Or in target-i386/exec.h

(quoted diff) +1 -1
-#if !defined(_BSD)
+#if !defined(_BSD) && !defined(_SVR4)
 extern int lrint(CPU86_LDouble x);
 extern int64_t llrint(CPU86_LDouble x);
 #else
 #define lrint(d)               ((int)rint(d))
 #define llrint(d)              ((int)rint(d))
 #endif