Check for __sparc as well as __sparc__ for compatibility with Sun cc

(gcc defines __sparc__, Sun cc defines __sparc)
(cherry picked from commit f9f7d7f3be)
This commit is contained in:
Alan Coopersmith 2006-12-04 13:36:30 -08:00 committed by Keith Packard
parent 68b79fb193
commit 9ad0811a54
7 changed files with 14 additions and 14 deletions

View File

@ -118,7 +118,7 @@ extern int ffs(unsigned long);
# if defined(NO_INLINE) || defined(DO_PROTOTYPES) # if defined(NO_INLINE) || defined(DO_PROTOTYPES)
# if !defined(__arm__) # if !defined(__arm__)
# if !defined(__sparc__) && !defined(__arm32__) \ # if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \
&& !(defined(__alpha__) && defined(linux)) \ && !(defined(__alpha__) && defined(linux)) \
&& !(defined(__ia64__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \
@ -1697,7 +1697,7 @@ static __inline__ void ppc_flush_icache(char *addr)
: : "r"(addr) : "memory"); : : "r"(addr) : "memory");
} }
# elif defined(__sparc__) || defined(sparc) # elif defined(__sparc__) || defined(sparc) || defined(__sparc)
/* /*
* Like powerpc, we provide byteswapping and no byteswapping functions * Like powerpc, we provide byteswapping and no byteswapping functions
* here with byteswapping as default, drivers that don't need byteswapping * here with byteswapping as default, drivers that don't need byteswapping

View File

@ -64,7 +64,7 @@ extern ScrnInfoPtr xf86CurrentScreen;
extern Bool pciSlotClaimed; extern Bool pciSlotClaimed;
extern Bool isaSlotClaimed; extern Bool isaSlotClaimed;
extern Bool fbSlotClaimed; extern Bool fbSlotClaimed;
#ifdef __sparc__ #if defined(__sparc__) || defined(__sparc)
extern Bool sbusSlotClaimed; extern Bool sbusSlotClaimed;
#endif #endif
extern confDRIRec xf86ConfigDRI; extern confDRIRec xf86ConfigDRI;

View File

@ -113,7 +113,7 @@ void
xf86BusProbe(void) xf86BusProbe(void)
{ {
xf86PciProbe(); xf86PciProbe();
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
xf86SbusProbe(); xf86SbusProbe();
#endif #endif
} }
@ -2373,7 +2373,7 @@ xf86PostProbe(void)
if (fbSlotClaimed) { if (fbSlotClaimed) {
if (pciSlotClaimed || isaSlotClaimed if (pciSlotClaimed || isaSlotClaimed
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
|| sbusSlotClaimed || sbusSlotClaimed
#endif #endif
) { ) {
@ -3006,7 +3006,7 @@ xf86FindPrimaryDevice()
} }
#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) #if !defined(__sparc) && !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__)
#include "vgaHW.h" #include "vgaHW.h"
#include "compiler.h" #include "compiler.h"
#endif #endif
@ -3018,7 +3018,7 @@ static void
CheckGenericGA() CheckGenericGA()
{ {
/* This needs to be changed for multiple domains */ /* This needs to be changed for multiple domains */
#if !defined(__sparc__) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__) #if !defined(__sparc__) && !defined(__sparc) && !defined(__powerpc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__arm__) && !defined(__s390__)
IOADDRESS GenericIOBase = VGAHW_GET_IOBASE(); IOADDRESS GenericIOBase = VGAHW_GET_IOBASE();
CARD8 CurrentValue, TestValue; CARD8 CurrentValue, TestValue;

View File

@ -40,7 +40,7 @@
#define _XF86_BUS_H #define _XF86_BUS_H
#include "xf86pciBus.h" #include "xf86pciBus.h"
#ifdef __sparc__ #if defined(__sparc__) || defined(__sparc)
#include "xf86sbusBus.h" #include "xf86sbusBus.h"
#endif #endif

View File

@ -48,7 +48,7 @@
#include "Configint.h" #include "Configint.h"
#include "vbe.h" #include "vbe.h"
#include "xf86DDC.h" #include "xf86DDC.h"
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
#include "xf86Bus.h" #include "xf86Bus.h"
#include "xf86Sbus.h" #include "xf86Sbus.h"
#endif #endif
@ -57,7 +57,7 @@
typedef struct _DevToConfig { typedef struct _DevToConfig {
GDevRec GDev; GDevRec GDev;
pciVideoPtr pVideo; pciVideoPtr pVideo;
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
sbusDevicePtr sVideo; sbusDevicePtr sVideo;
#endif #endif
int iDriver; int iDriver;
@ -134,7 +134,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int
if (!DevToConfig[i].pVideo) if (!DevToConfig[i].pVideo)
return NULL; return NULL;
break; break;
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
case BUS_SBUS: case BUS_SBUS:
for (i = 0; i < nDevToConfig; i++) for (i = 0; i < nDevToConfig; i++)
if (DevToConfig[i].sVideo && if (DevToConfig[i].sVideo &&
@ -213,7 +213,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int
NewDevice.GDev.identifier = "ISA Adapter"; NewDevice.GDev.identifier = "ISA Adapter";
NewDevice.GDev.busID = "ISA"; NewDevice.GDev.busID = "ISA";
break; break;
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
case BUS_SBUS: { case BUS_SBUS: {
char *promPath = NULL; char *promPath = NULL;
NewDevice.sVideo = (sbusDevicePtr) busData; NewDevice.sVideo = (sbusDevicePtr) busData;

View File

@ -510,7 +510,7 @@ _X_HIDDEN void *xfree86LookupTab[] = {
SYMFUNC(xf86AddModuleInfo) SYMFUNC(xf86AddModuleInfo)
SYMFUNC(xf86DeleteModuleInfo) SYMFUNC(xf86DeleteModuleInfo)
#if defined(__sparc__) && !defined(__OpenBSD__) #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__)
/* xf86sbusBus.c */ /* xf86sbusBus.c */
SYMFUNC(xf86MatchSbusInstances) SYMFUNC(xf86MatchSbusInstances)
SYMFUNC(xf86GetSbusInfoForEntity) SYMFUNC(xf86GetSbusInfoForEntity)

View File

@ -181,7 +181,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86memchr) SYMFUNC(xf86memchr)
SYMFUNC(xf86memcmp) SYMFUNC(xf86memcmp)
SYMFUNC(xf86memcpy) SYMFUNC(xf86memcpy)
#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__ia64__) || defined (__amd64__) #if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined (__amd64__)
/* /*
* Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle * Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle
* structure copies. This causes a problem both here and in shared * structure copies. This causes a problem both here and in shared