diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-12-04 13:36:30 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-12-04 13:36:30 -0800 |
commit | f9f7d7f3be53c808abb5eaceb7a1abc55744a210 (patch) | |
tree | 11f39ee8225432a387c3e3bb46f0a8ec12ec28a4 | |
parent | ac90ce58ba1da3ed605adf75f4d54c34b578c402 (diff) |
Check for __sparc as well as __sparc__ for compatibility with Sun cc
(gcc defines __sparc__, Sun cc defines __sparc)
-rw-r--r-- | hw/xfree86/common/compiler.h | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86.h | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Bus.c | 8 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Bus.h | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Configure.c | 8 | ||||
-rw-r--r-- | hw/xfree86/loader/xf86sym.c | 2 | ||||
-rw-r--r-- | hw/xfree86/utils/xorgcfg/loadmod.c | 2 |
7 files changed, 14 insertions, 14 deletions
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index a330fadf4..ea995eda1 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -118,7 +118,7 @@ extern int ffs(unsigned long); # if defined(NO_INLINE) || defined(DO_PROTOTYPES) # if !defined(__arm__) -# if !defined(__sparc__) && !defined(__arm32__) \ +# if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ @@ -1697,7 +1697,7 @@ static __inline__ void ppc_flush_icache(char *addr) : : "r"(addr) : "memory"); } -# elif defined(__sparc__) || defined(sparc) +# elif defined(__sparc__) || defined(sparc) || defined(__sparc) /* * Like powerpc, we provide byteswapping and no byteswapping functions * here with byteswapping as default, drivers that don't need byteswapping diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index aa73e7dc0..169a957d2 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -64,7 +64,7 @@ extern ScrnInfoPtr xf86CurrentScreen; extern Bool pciSlotClaimed; extern Bool isaSlotClaimed; extern Bool fbSlotClaimed; -#ifdef __sparc__ +#if defined(__sparc__) || defined(__sparc) extern Bool sbusSlotClaimed; #endif extern confDRIRec xf86ConfigDRI; diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index e20837851..7617bf78a 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -113,7 +113,7 @@ void xf86BusProbe(void) { xf86PciProbe(); -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) xf86SbusProbe(); #endif } @@ -2373,7 +2373,7 @@ xf86PostProbe(void) if (fbSlotClaimed) { if (pciSlotClaimed || isaSlotClaimed -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) || sbusSlotClaimed #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 "compiler.h" #endif @@ -3018,7 +3018,7 @@ static void CheckGenericGA() { /* 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(); CARD8 CurrentValue, TestValue; diff --git a/hw/xfree86/common/xf86Bus.h b/hw/xfree86/common/xf86Bus.h index b7d16089c..b638e9026 100644 --- a/hw/xfree86/common/xf86Bus.h +++ b/hw/xfree86/common/xf86Bus.h @@ -40,7 +40,7 @@ #define _XF86_BUS_H #include "xf86pciBus.h" -#ifdef __sparc__ +#if defined(__sparc__) || defined(__sparc) #include "xf86sbusBus.h" #endif diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index f1f173dd8..f71486c9d 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -48,7 +48,7 @@ #include "Configint.h" #include "vbe.h" #include "xf86DDC.h" -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) #include "xf86Bus.h" #include "xf86Sbus.h" #endif @@ -57,7 +57,7 @@ typedef struct _DevToConfig { GDevRec GDev; pciVideoPtr pVideo; -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) sbusDevicePtr sVideo; #endif int iDriver; @@ -134,7 +134,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int if (!DevToConfig[i].pVideo) return NULL; break; -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: for (i = 0; i < nDevToConfig; i++) if (DevToConfig[i].sVideo && @@ -213,7 +213,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int NewDevice.GDev.identifier = "ISA Adapter"; NewDevice.GDev.busID = "ISA"; break; -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: { char *promPath = NULL; NewDevice.sVideo = (sbusDevicePtr) busData; diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c index 3051dedaf..1cb7dae08 100644 --- a/hw/xfree86/loader/xf86sym.c +++ b/hw/xfree86/loader/xf86sym.c @@ -499,7 +499,7 @@ _X_HIDDEN void *xfree86LookupTab[] = { SYMFUNC(xf86AddModuleInfo) SYMFUNC(xf86DeleteModuleInfo) -#if defined(__sparc__) && !defined(__OpenBSD__) +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) /* xf86sbusBus.c */ SYMFUNC(xf86MatchSbusInstances) SYMFUNC(xf86GetSbusInfoForEntity) diff --git a/hw/xfree86/utils/xorgcfg/loadmod.c b/hw/xfree86/utils/xorgcfg/loadmod.c index 598d0c06a..6f83f3509 100644 --- a/hw/xfree86/utils/xorgcfg/loadmod.c +++ b/hw/xfree86/utils/xorgcfg/loadmod.c @@ -181,7 +181,7 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(xf86memchr) SYMFUNC(xf86memcmp) 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 * structure copies. This causes a problem both here and in shared |