summaryrefslogtreecommitdiff
path: root/hw/xfree86/int10
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2006-02-10 22:00:30 +0000
committerEric Anholt <anholt@freebsd.org>2006-02-10 22:00:30 +0000
commitc3d14036729fd186d4ec7ca1de603e1f2d174e2f (patch)
tree6fc1290e4da4a16eea3c10c250d302df6b9e98c2 /hw/xfree86/int10
parenta8cec1b656f57746758613213de1d6e5acb79451 (diff)
Remove libcwrapper usage from xorg server modules. The libcwrapper is only
of (marginal) use in the drivers, and that usage remains.
Diffstat (limited to 'hw/xfree86/int10')
-rw-r--r--hw/xfree86/int10/generic.c4
-rw-r--r--hw/xfree86/int10/helper_exec.c17
-rw-r--r--hw/xfree86/int10/helper_mem.c4
-rw-r--r--hw/xfree86/int10/pci.c3
-rw-r--r--hw/xfree86/int10/x86emu.c4
-rw-r--r--hw/xfree86/int10/xf86int10.c1
-rw-r--r--hw/xfree86/int10/xf86x86emu.c2
7 files changed, 18 insertions, 17 deletions
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index e9ddd3334..a9ceebcb0 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -8,9 +8,11 @@
#include <xorg-config.h>
#endif
+#include <string.h>
+#include <unistd.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#define _INT10_PRIVATE
#include "xf86int10.h"
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index eae6b5378..1809e2d95 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -19,9 +19,11 @@
#include <xorg-config.h>
#endif
+#include <unistd.h>
+
+#include <X11/Xos.h>
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#define _INT10_PRIVATE
#include "int10Defines.h"
@@ -342,13 +344,14 @@ x_inw(CARD16 port)
CARD16 val;
if (port == 0x5c) {
+ struct timeval tv;
+
/*
* Emulate a PC98's timer. Typical resolution is 3.26 usec.
* Approximate this by dividing by 3.
*/
- long sec, usec;
- (void)getsecs(&sec, &usec);
- val = (CARD16)(usec / 3);
+ X_GETTIMEOFDAY(&tv);
+ val = (CARD16)(tv.tv_usec / 3);
} else {
if (!pciCfg1inw(port, &val))
val = inw(Int10Current->ioBase + port);
@@ -363,15 +366,15 @@ void
x_outb(CARD16 port, CARD8 val)
{
if ((port == 0x43) && (val == 0)) {
+ struct timeval tv;
/*
* Emulate a PC's timer 0. Such timers typically have a resolution of
* some .838 usec per tick, but this can only provide 1 usec per tick.
* (Not that this matters much, given inherent emulation delays.) Use
* the bottom bit as a byte select. See inb(0x40) above.
*/
- long sec, usec;
- (void) getsecs(&sec, &usec);
- Int10Current->inb40time = (CARD16)(usec | 1);
+ X_GETTIMEOFDAY(&tv);
+ Int10Current->inb40time = (CARD16)(tv.tv_usec | 1);
#ifdef PRINT_PORT
ErrorF(" outb(%#x, %2.2x)\n", port, val);
#endif
diff --git a/hw/xfree86/int10/helper_mem.c b/hw/xfree86/int10/helper_mem.c
index 495a0e04d..65ffe3df5 100644
--- a/hw/xfree86/int10/helper_mem.c
+++ b/hw/xfree86/int10/helper_mem.c
@@ -8,9 +8,11 @@
#include <xorg-config.h>
#endif
+#include <string.h>
+#include <stdlib.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86Pci.h"
#define _INT10_PRIVATE
diff --git a/hw/xfree86/int10/pci.c b/hw/xfree86/int10/pci.c
index f35bd7233..520df1495 100644
--- a/hw/xfree86/int10/pci.c
+++ b/hw/xfree86/int10/pci.c
@@ -9,9 +9,10 @@
#include <xorg-config.h>
#endif
+#include <string.h>
+
#include "xf86Pci.h"
#include "xf86.h"
-#include "xf86_ansic.h"
#define _INT10_PRIVATE
#include "xf86int10.h"
diff --git a/hw/xfree86/int10/x86emu.c b/hw/xfree86/int10/x86emu.c
index b9580a1de..b3320e5b9 100644
--- a/hw/xfree86/int10/x86emu.c
+++ b/hw/xfree86/int10/x86emu.c
@@ -3,10 +3,6 @@
#include <xorg-config.h>
#endif
-#ifdef NO_SYS_HEADERS
-# include "xf86_ansic.h"
-#endif
-
#include "debug.c"
#include "decode.c"
#include "fpu.c"
diff --git a/hw/xfree86/int10/xf86int10.c b/hw/xfree86/int10/xf86int10.c
index 06cf40b8c..303cf8925 100644
--- a/hw/xfree86/int10/xf86int10.c
+++ b/hw/xfree86/int10/xf86int10.c
@@ -10,7 +10,6 @@
#endif
#include "xf86.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#define _INT10_PRIVATE
#include "xf86int10.h"
diff --git a/hw/xfree86/int10/xf86x86emu.c b/hw/xfree86/int10/xf86x86emu.c
index c15a5f9be..62a34e3aa 100644
--- a/hw/xfree86/int10/xf86x86emu.c
+++ b/hw/xfree86/int10/xf86x86emu.c
@@ -10,11 +10,9 @@
#include <x86emu.h>
#include "xf86.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86_OSproc.h"
#include "xf86Pci.h"
-#include "xf86_libc.h"
#define _INT10_PRIVATE
#include "xf86int10.h"
#include "int10Defines.h"