Restore checks for __i386 where needed for Sun compilers on Solaris

This commit is contained in:
Alan Coopersmith 2007-11-20 18:31:03 -08:00
parent 2f387d913a
commit a55ec1a9f4
8 changed files with 19 additions and 22 deletions

View File

@ -210,7 +210,7 @@
# define ARCH_PCI_INIT ia64linuxPciInit # define ARCH_PCI_INIT ia64linuxPciInit
# endif # endif
# define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper # define XF86SCANPCI_WRAPPER ia64ScanPCIWrapper
#elif defined(__i386__) #elif defined(__i386__) || defined(__i386)
# if defined(linux) # if defined(linux)
# define ARCH_PCI_INIT linuxPciInit # define ARCH_PCI_INIT linuxPciInit
# else # else

View File

@ -26,7 +26,7 @@
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
#ifdef __i386__ #if defined(__i386__) || defined(__i386)
#define _NEED_SYSI86 #define _NEED_SYSI86
#endif #endif
#include "xf86.h" #include "xf86.h"
@ -66,7 +66,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
Offset += Base & (psize - 1); Offset += Base & (psize - 1);
Base &= ~(psize - 1); Base &= ~(psize - 1);
mlen = (Offset + Len + psize - 1) & ~(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) if (Base >= 0xA0000 && Base + mlen < 0xFFFFF && xf86Info.vtno >= 0)
sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno); sprintf(solx86_vtname, "/dev/vt%02d", xf86Info.vtno);
else else

View File

@ -29,7 +29,7 @@
#include "xf86.h" #include "xf86.h"
#include "xf86Priv.h" #include "xf86Priv.h"
#include "xf86_OSlib.h" #include "xf86_OSlib.h"
#if defined(__i386__) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
# include <sys/kd.h> # include <sys/kd.h>
#endif #endif
@ -40,7 +40,7 @@ static int VTnum = -1;
static int xf86StartVT = -1; static int xf86StartVT = -1;
#endif #endif
#if defined(__SOL8__) || !defined(__i386__) #if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
static char fb_dev[PATH_MAX] = "/dev/fb"; static char fb_dev[PATH_MAX] = "/dev/fb";
#else #else
static char fb_dev[PATH_MAX] = "/dev/console"; static char fb_dev[PATH_MAX] = "/dev/console";
@ -209,11 +209,8 @@ xf86CloseConsole(void)
#ifdef HAS_USL_VTS #ifdef HAS_USL_VTS
struct vt_mode VT; struct vt_mode VT;
#endif #endif
#if defined(__SOL8__) || !defined(__i386__)
int tmp;
#endif
#if !defined(__i386__) && !defined(__x86) #if !defined(__i386__) && !defined(__i386) && !defined(__x86)
if (!xf86DoProbe && !xf86DoConfigure) { if (!xf86DoProbe && !xf86DoConfigure) {
int fd; int fd;
@ -332,7 +329,7 @@ xf86ProcessArgument(int argc, char **argv, int i)
#endif /* HAS_USL_VTS */ #endif /* HAS_USL_VTS */
#if defined(__SOL8__) || !defined(__i386__) #if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386))
if ((i + 1) < argc) { if ((i + 1) < argc) {
if (!strcmp(argv[i], "-dev")) { if (!strcmp(argv[i], "-dev")) {

View File

@ -28,7 +28,7 @@
#include <sys/types.h> /* get __x86 definition if not set by compiler */ #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 #define _NEED_SYSI86
#endif #endif
#include "xf86.h" #include "xf86.h"
@ -148,14 +148,14 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size)
/* I/O Permissions section */ /* I/O Permissions section */
/***************************************************************************/ /***************************************************************************/
#if defined(__i386__) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
static Bool ExtendedEnabled = FALSE; static Bool ExtendedEnabled = FALSE;
#endif #endif
_X_EXPORT Bool _X_EXPORT Bool
xf86EnableIO(void) xf86EnableIO(void)
{ {
#if defined(__i386__) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
if (ExtendedEnabled) if (ExtendedEnabled)
return TRUE; return TRUE;
@ -171,7 +171,7 @@ xf86EnableIO(void)
_X_EXPORT void _X_EXPORT void
xf86DisableIO(void) xf86DisableIO(void)
{ {
#if defined(__i386__) || defined(__x86) #if defined(__i386__) || defined(__i386) || defined(__x86)
if(!ExtendedEnabled) if(!ExtendedEnabled)
return; return;
@ -188,7 +188,7 @@ xf86DisableIO(void)
_X_EXPORT Bool xf86DisableInterrupts(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)) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return FALSE; return FALSE;
@ -207,7 +207,7 @@ _X_EXPORT Bool xf86DisableInterrupts(void)
_X_EXPORT void xf86EnableInterrupts(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)) if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
return; return;

View File

@ -140,7 +140,7 @@ typedef signed long xf86ssize_t;
# endif /* SVR4 && !sun */ # endif /* SVR4 && !sun */
/* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */ /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */
# if defined(sun) && defined (SVR4) /* Solaris? */ # 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? */ # if !defined(V86SC_IOPL) /* Solaris 7 or later? */
# include <sys/v86.h> /* Nope */ # include <sys/v86.h> /* Nope */
# endif # endif
@ -148,7 +148,7 @@ typedef signed long xf86ssize_t;
# else # else
# include <sys/v86.h> /* Not solaris */ # include <sys/v86.h> /* Not solaris */
# endif /* sun && i386 && SVR4 */ # 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> # include <sys/psw.h>
# endif # endif
# endif /* _NEED_SYSI86 */ # endif /* _NEED_SYSI86 */
@ -224,7 +224,7 @@ typedef signed long xf86ssize_t;
# define POSIX_TTY # define POSIX_TTY
# endif # 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 USE_VT_SYSREQ
# define VT_SYSREQ_DEFAULT TRUE # define VT_SYSREQ_DEFAULT TRUE
# endif # endif

View File

@ -631,7 +631,7 @@ mouse_configuration(void) {
config_emulate3buttons = 0; config_emulate3buttons = 0;
printf("\n"); 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, /* SPARC & USB mice (VUID or AUTO protocols) default to /dev/mouse,
but PS/2 mice default to /dev/kdmouse */ but PS/2 mice default to /dev/kdmouse */
if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) { if ((config_mousetype != M_AUTO) && (config_mousetype != M_VUID)) {

View File

@ -444,7 +444,7 @@ SOFTWARE.
#endif /* luna */ #endif /* luna */
#if (defined(SVR4) && defined(__i386__)) || \ #if (defined(SVR4) && (defined(__i386__) || (defined(__i386)))) || \
defined(__alpha__) || defined(__alpha) || \ defined(__alpha__) || defined(__alpha) || \
defined(__i386__) || defined(__QNX__) || \ defined(__i386__) || defined(__QNX__) || \
defined(__s390x__) || defined(__s390__) defined(__s390x__) || defined(__s390__)

View File

@ -46,7 +46,7 @@
#if defined(mips) || defined(sgi) || \ #if defined(mips) || defined(sgi) || \
defined(sparc) || defined(__sparc64__) || \ defined(sparc) || defined(__sparc64__) || \
defined(__alpha) || defined(__alpha__) || \ defined(__alpha) || defined(__alpha__) || \
defined(__i386__) || defined(__ia64__) || \ defined(__i386__) || defined(__i386) || defined(__ia64__) || \
defined(__s390x__) || defined(__s390__) || \ defined(__s390x__) || defined(__s390__) || \
defined(__amd64__) || defined(amd64) || defined(__amd64) defined(__amd64__) || defined(amd64) || defined(__amd64)
#define GetHighWord(x) (((int) (x)) >> 16) #define GetHighWord(x) (((int) (x)) >> 16)