openbsd-ports/emulators/qemu/patches/patch-dyngen-exec_h
todd 202b6aaad6 Import qemu snapshot from 2005-02-27
QEMU is a generic and open source processor emulator 
which achieves a good emulation speed by using dynamic translation.

QEMU has two operating modes:

* Full system emulation. In this mode, QEMU emulates 
a full system (for example a PC), including a processor and 
various peripherials. It can be used to launch different
Operating Systems without rebooting the PC or to debug system code.

* User mode emulation (Linux host only). In this mode, 

.. many thanks for feedback from many people, and for Lars Hansson and 
   Michael Schmidt for posting early work on the port of qemu to ports@

For now, only for macppc and i386, as these are currently the only archs
that have reported success building qemu.
QEMU can launch Linux processes compiled for one CPU on another CPU.
2005-03-07 16:41:28 +00:00

53 lines
1.4 KiB
Plaintext

$OpenBSD: patch-dyngen-exec_h,v 1.1.1.1 2005/03/07 16:41:28 todd Exp $
--- dyngen-exec.h.orig Sun Nov 14 14:51:33 2004
+++ dyngen-exec.h Sat Feb 26 03:21:02 2005
@@ -20,11 +20,15 @@
#if !defined(__DYNGEN_EXEC_H__)
#define __DYNGEN_EXEC_H__
+#include "config.h"
+
/* NOTE: standard headers should be used with special care at this
point because host CPU registers are used as global variables. Some
host headers do not allow that. */
#include <stddef.h>
-
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#else
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
@@ -43,6 +47,7 @@ typedef signed long int64_t;
#else
typedef signed long long int64_t;
#endif
+#endif
#define INT8_MIN (-128)
#define INT16_MIN (-32767-1)
@@ -57,11 +62,15 @@ typedef signed long long int64_t;
#define UINT32_MAX (4294967295U)
#define UINT64_MAX ((uint64_t)(18446744073709551615))
+#ifdef __OpenBSD__
+typedef struct __sFILE FILE;
+#else
typedef struct FILE FILE;
extern int fprintf(FILE *, const char *, ...);
extern int printf(const char *, ...);
#undef NULL
#define NULL 0
+#endif
#if defined(_BSD) && !defined(__APPLE__)
#include <ieeefp.h>
@@ -70,6 +79,7 @@ extern int printf(const char *, ...);
#define FE_UPWARD FP_RP
#define FE_TOWARDZERO FP_RZ
#define fesetround(x) fpsetround(x)
+#define fegetround() fpgetround()
#else
#include <fenv.h>
#endif