summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-11-20 18:31:03 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-11-20 18:31:07 -0800
commita55ec1a9f4b62139dc5e5462d79d47b330c27c79 (patch)
tree80f5a4b2504540816c86b61018d99bf42a0a9f84
parent2f387d913aa76f1b6d21d8e2698be165301c6bc1 (diff)
Restore checks for __i386 where needed for Sun compilers on Solaris
-rw-r--r--hw/xfree86/os-support/bus/Pci.h2
-rw-r--r--hw/xfree86/os-support/solaris/sun_bios.c4
-rw-r--r--hw/xfree86/os-support/solaris/sun_init.c11
-rw-r--r--hw/xfree86/os-support/solaris/sun_vid.c12
-rw-r--r--hw/xfree86/os-support/xf86_OSlib.h6
-rw-r--r--hw/xfree86/utils/xorgconfig/xorgconfig.c2
-rw-r--r--include/servermd.h2
-rw-r--r--mi/micoord.h2
8 files changed, 19 insertions, 22 deletions
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h
index 6bd0eb7fc..0abb34f98 100644
--- a/hw/xfree86/os-support/bus/Pci.h
+++ b/hw/xfree86/os-support/bus/Pci.h
@@ -210,7 +210,7 @@
# define ARCH_PCI_INIT ia64linuxPciInit
# endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
-#elif defined(__i386__)
+#elif defined(__i386__) || defined(__i386)
# if defined(linux)
# define ARCH_PCI_INIT linuxPciInit
# else
diff --git a/hw/xfree86/os-support/solaris/sun_bios.c b/hw/xfree86/os-support/solaris/sun_bios.c
index 1223dcd68..1fae9759c 100644
--- a/hw/xfree86/os-support/solaris/sun_bios.c
+++ b/hw/xfree86/os-support/solaris/sun_bios.c
@@ -26,7 +26,7 @@
#include <xorg-config.h>
#endif
-#ifdef __i386__
+#if defined(__i386__) || defined(__i386)
#define _NEED_SYSI86
#endif
#include "xf86.h"
@@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
Offset += Base & (psize - 1);
Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(psize - 1);
-#if defined(__i386__) && !defined(__SOL8__)
+#if (defined(__i386__) || defined(__i386)) && !defined(__SOL8__)
if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0)
sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno);
else
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
index c7fac524f..1f389cb40 100644
--- a/hw/xfree86/os-support/solaris/sun_init.c
+++ b/hw/xfree86/os-support/solaris/sun_init.c
@@ -29,7 +29,7 @@
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
# include <sys/kd.h>
#endif
@@ -40,7 +40,7 @@ static int VTnum = -1;
static int xf86StartVT = -1;
#endif
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
static char fb_dev[PATH_MAX] = "/dev/fb";
#else
static char fb_dev[PATH_MAX] = "/dev/console";
@@ -209,11 +209,8 @@ xf86CloseConsole(void)
#ifdef HAS_USL_VTS
struct vt_mode VT;
#endif
-#if defined(__SOL8__) || !defined(__i386__)
- int tmp;
-#endif
-#if !defined(__i386__) && !defined(__x86)
+#if !defined(__i386__) && !defined(__i386) && !defined(__x86)
if (!xf86DoProbe && !xf86DoConfigure) {
int fd;
@@ -332,7 +329,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
#endif /* HAS_USL_VTS */
-#if defined(__SOL8__) || !defined(__i386__)
+#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
if ((i + 1) < argc) {
if (!strcmp(argv[i], "-dev")) {
diff --git a/hw/xfree86/os-support/solaris/sun_vid.c b/hw/xfree86/os-support/solaris/sun_vid.c
index 494b2cfbf..e7b529ccb 100644
--- a/hw/xfree86/os-support/solaris/sun_vid.c
+++ b/hw/xfree86/os-support/solaris/sun_vid.c
@@ -28,7 +28,7 @@
#include <sys/types.h> /* get __x86 definition if not set by compiler */
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
#define _NEED_SYSI86
#endif
#include "xf86.h"
@@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
/* I/O Permissions section */
/***************************************************************************/
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
static Bool ExtendedEnabled = FALSE;
#endif
_X_EXPORT Bool
xf86EnableIO(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (ExtendedEnabled)
return TRUE;
@@ -171,7 +171,7 @@ xf86EnableIO(void)
_X_EXPORT void
xf86DisableIO(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if(!ExtendedEnabled)
return;
@@ -188,7 +188,7 @@ xf86DisableIO(void)
_X_EXPORT Bool xf86DisableInterrupts(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return FALSE;
@@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void)
_X_EXPORT void xf86EnableInterrupts(void)
{
-#if defined(__i386__) || defined(__x86)
+#if defined(__i386__) || defined(__i386) || defined(__x86)
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return;
diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
index 662dbaace..77f2253e9 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -140,7 +140,7 @@ typedef signed long xf86ssize_t;
# endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
# if defined(sun) && defined (SVR4) /* Solaris? */
-# if defined(__i386__) || defined(__x86) /* on x86 or x64? */
+# if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */
# if !defined(V86SC_IOPL) /* Solaris 7 or later? */
# include <sys/v86.h> /* Nope */
# endif
@@ -148,7 +148,7 @@ typedef signed long xf86ssize_t;
# else
# include <sys/v86.h> /* Not solaris */
# endif /* sun && i386 && SVR4 */
-# if defined(sun) && (defined (__i386__) || defined(__x86)) && defined (SVR4)
+# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4)
# include <sys/psw.h>
# endif
# endif /* _NEED_SYSI86 */
@@ -224,7 +224,7 @@ typedef signed long xf86ssize_t;
# define POSIX_TTY
# endif
-# if defined(sun) && defined (__i386__) && defined (SVR4) && !defined(__SOL8__)
+# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__)
# define USE_VT_SYSREQ
# define VT_SYSREQ_DEFAULT TRUE
# endif
diff --git a/hw/xfree86/utils/xorgconfig/xorgconfig.c b/hw/xfree86/utils/xorgconfig/xorgconfig.c
index efabc9d1f..30eb83182 100644
--- a/hw/xfree86/utils/xorgconfig/xorgconfig.c
+++ b/hw/xfree86/utils/xorgconfig/xorgconfig.c
@@ -631,7 +631,7 @@ mouse_configuration(void) {
config_emulate3buttons = 0;
printf("\n");
-#if (defined(sun) && (defined(__i386__) || defined(__x86)))
+#if (defined(sun) && (defined(__i386) || defined(__x86)))
/* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse,
but PS/2 mice default to /dev/kdmouse */
if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {
diff --git a/include/servermd.h b/include/servermd.h
index 2616bfed6..2f511dabe 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -444,7 +444,7 @@ SOFTWARE.
#endif /* luna */
-#if (defined(SVR4) && defined(__i386__)) || \
+#if (defined(SVR4) && (defined(__i386__) || (defined(__i386)))) || \
defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__QNX__) || \
defined(__s390x__) || defined(__s390__)
diff --git a/mi/micoord.h b/mi/micoord.h
index 16a244b96..16d086117 100644
--- a/mi/micoord.h
+++ b/mi/micoord.h
@@ -46,7 +46,7 @@
#if defined(mips) || defined(sgi) || \
defined(sparc) || defined(__sparc64__) || \
defined(__alpha) || defined(__alpha__) || \
- defined(__i386__) || defined(__ia64__) || \
+ defined(__i386__) || defined(__i386) || defined(__ia64__) || \
defined(__s390x__) || defined(__s390__) || \
defined(__amd64__) || defined(amd64) || defined(__amd64)
#define GetHighWord(x) (((int) (x)) >> 16)