Commit a55ec1a9 authored by Alan Coopersmith's avatar Alan Coopersmith
Browse files

Restore checks for __i386 where needed for Sun compilers on Solaris

parent 2f387d91
......@@ -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
......
......@@ -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
......
......@@ -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")) {
......
......@@ -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;
......
......@@ -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
......
......@@ -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)) {
......
......@@ -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__)
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment