summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-12-17 18:24:37 -0800
committerKeith Packard <keithp@keithp.com>2009-12-18 10:30:53 -0800
commitb63912ed4c69fedd1bea92274d6cae0429a79677 (patch)
treee44dc14894f634ecfdfc5b4eb545a1ff5843c2fb /hw/xfree86
parent0cb638dc6822e54567a1731ea1cf588475a226e9 (diff)
Convert checks for PC98 support from platform #ifdefs to configure flag
Default remains the same - on for most OS'es on i386 (except Solaris), off for everyone else. Can be manually toggled via --enable-pc98 or --disable-pc98. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/common/xf86Config.c17
-rw-r--r--hw/xfree86/common/xf86Globals.c2
-rw-r--r--hw/xfree86/common/xf86Helper.c2
-rw-r--r--hw/xfree86/common/xf86Privstr.h2
4 files changed, 6 insertions, 17 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a6d66f35a..6fbf61346 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -71,13 +71,6 @@ extern DeviceAssocRec mouse_assoc;
#include "picture.h"
#endif
-#if (defined(__i386__)) && \
- (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
- defined(__NetBSD__) || defined(linux) || \
- (defined(SVR4) && !defined(sun)) || defined(__GNU__))
-#define SUPPORT_PC98
-#endif
-
/*
* These paths define the way the config file search is done. The escape
* sequences are documented in parser/scan.c.
@@ -778,11 +771,10 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE },
};
-#ifdef __i386__
+#ifdef SUPPORT_PC98
static Bool
detectPC98(void)
{
-#ifdef SUPPORT_PC98
unsigned char buf[2];
if (xf86ReadBIOS(0xf8000, 0xe80, buf, 2) != 2)
@@ -791,11 +783,8 @@ detectPC98(void)
return TRUE;
else
return FALSE;
-#else
- return FALSE;
-#endif
}
-#endif /* __i386__ */
+#endif
static Bool
configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
@@ -1054,7 +1043,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Info.pixmap24 = Pix24DontCare;
xf86Info.pix24From = X_DEFAULT;
}
-#ifdef __i386__
+#ifdef SUPPORT_PC98
if (xf86GetOptValBool(FlagOptions, FLAG_PC98, &value)) {
xf86Info.pc98 = value;
if (value) {
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index d8f7f7f27..98f828483 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -124,7 +124,7 @@ xf86InfoRec xf86Info = {
.miscModInDevAllowNonLocal = FALSE,
.pixmap24 = Pix24DontCare,
.pix24From = X_DEFAULT,
-#ifdef __i386__
+#ifdef SUPPORT_PC98
.pc98 = FALSE,
#endif
.pmFlag = TRUE,
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 56ab266ae..1cc1526c9 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -2140,7 +2140,7 @@ xf86GetAllowMouseOpenFail(void)
Bool
xf86IsPc98(void)
{
-#ifdef __i386__
+#if SUPPORT_PC98
return xf86Info.pc98;
#else
return FALSE;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index 998260142..b2095aab1 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -91,7 +91,7 @@ typedef struct {
input device events */
Pix24Flags pixmap24;
MessageType pix24From;
-#ifdef __i386__
+#ifdef SUPPORT_PC98
Bool pc98;
#endif
Bool pmFlag;