Replace all checks for 'linux' macro with '__linux__'
gcc -std=c99 does not define the former, and it's a horrible namespace confusion anyway. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
6634ffc4d2
commit
c394f6b273
|
@ -98,9 +98,9 @@
|
|||
#if defined(DO_PROTOTYPES)
|
||||
#if !defined(__arm__)
|
||||
#if !defined(__sparc__) && !defined(__arm32__) && !defined(__nds32__) \
|
||||
&& !(defined(__alpha__) && defined(linux)) \
|
||||
&& !(defined(__ia64__) && defined(linux)) \
|
||||
&& !(defined(__mips64) && defined(linux)) \
|
||||
&& !(defined(__alpha__) && defined(__linux__)) \
|
||||
&& !(defined(__ia64__) && defined(__linux__)) \
|
||||
&& !(defined(__mips64) && defined(__linux__)) \
|
||||
|
||||
extern _X_EXPORT void outb(unsigned short, unsigned char);
|
||||
extern _X_EXPORT void outw(unsigned short, unsigned short);
|
||||
|
@ -215,7 +215,7 @@ extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned long, unsigned int);
|
|||
#ifdef __GNUC__
|
||||
#if defined(__alpha__)
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux__
|
||||
/* for Linux on Alpha, we use the LIBC _inx/_outx routines */
|
||||
/* note that the appropriate setup via "ioperm" needs to be done */
|
||||
/* *before* any inx/outx is done. */
|
||||
|
@ -263,7 +263,7 @@ inl(unsigned long port)
|
|||
return _inl(port);
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
#endif /* __linux__ */
|
||||
|
||||
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) \
|
||||
&& !defined(DO_PROTOTYPES)
|
||||
|
@ -570,7 +570,7 @@ inl(unsigned PORT_SIZE port)
|
|||
}
|
||||
|
||||
#if defined(__mips__)
|
||||
#ifdef linux /* don't mess with other OSs */
|
||||
#ifdef __linux__ /* don't mess with other OSs */
|
||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||
static __inline__ unsigned int
|
||||
xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset)
|
||||
|
@ -594,7 +594,7 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset,
|
|||
:"r"(val), "r"(addr));
|
||||
}
|
||||
#endif
|
||||
#endif /* !linux */
|
||||
#endif /* !__linux__ */
|
||||
#endif /* __mips__ */
|
||||
|
||||
#elif defined(__powerpc__)
|
||||
|
|
|
@ -868,7 +868,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
|||
|
||||
/* when forcing input devices, we use kbd. otherwise evdev, so use the
|
||||
* evdev rules set. */
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
if (!xf86Info.forceInputDevices)
|
||||
rules = "evdev";
|
||||
else
|
||||
|
|
|
@ -61,7 +61,7 @@ static Bool foundMouse = FALSE;
|
|||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
static const char *DFLT_MOUSE_DEV = "/dev/sysmouse";
|
||||
static const char *DFLT_MOUSE_PROTO = "auto";
|
||||
#elif defined(linux)
|
||||
#elif defined(__linux__)
|
||||
static const char *DFLT_MOUSE_DEV = "/dev/input/mice";
|
||||
static const char *DFLT_MOUSE_PROTO = "auto";
|
||||
#elif defined(WSCONS_SUPPORT)
|
||||
|
|
|
@ -183,7 +183,7 @@ xf86PrintBanner(void)
|
|||
xf86ErrorFVerb(0, "Current Operating System: %s %s %s %s %s\n",
|
||||
name.sysname, name.nodename, name.release,
|
||||
name.version, name.machine);
|
||||
#ifdef linux
|
||||
#ifdef __linux__
|
||||
do {
|
||||
char buf[80];
|
||||
int fd = open("/proc/cmdline", O_RDONLY);
|
||||
|
|
|
@ -249,7 +249,7 @@ typedef struct _DriverRec {
|
|||
*/
|
||||
|
||||
/* Tolerate prior #include <linux/input.h> */
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#undef BUS_NONE
|
||||
#undef BUS_PCI
|
||||
#undef BUS_SBUS
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
/*
|
||||
* Global Definitions
|
||||
*/
|
||||
#if (defined(__alpha__) || defined(__ia64__)) && defined (linux)
|
||||
#if (defined(__alpha__) || defined(__ia64__)) && defined (__linux__)
|
||||
#define PCI_DOM_MASK 0x01fful
|
||||
#else
|
||||
#define PCI_DOM_MASK 0x0ffu
|
||||
|
@ -135,7 +135,7 @@
|
|||
#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
|
||||
#define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u)
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#define osPciInit(x) do {} while (0)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \
|
||||
defined(__OpenBSD__) || defined(__NetBSD__) || \
|
||||
|
|
|
@ -157,7 +157,7 @@ promSetNode(sbusPromNodePtr pnode)
|
|||
static void
|
||||
promIsP1275(void)
|
||||
{
|
||||
#ifdef linux
|
||||
#ifdef __linux__
|
||||
FILE *f;
|
||||
char buffer[1024];
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef _XF86_SBUS_H
|
||||
#define _XF86_SBUS_H
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <asm/types.h>
|
||||
#include <linux/fb.h>
|
||||
#include <asm/fbio.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "xf86_OSlib.h"
|
||||
#include "xf86OSpriv.h"
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
#include <asm/ioctl.h>
|
||||
#include <linux/agpgart.h>
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
|
@ -91,7 +91,7 @@ GARTInit(int screenNum)
|
|||
}
|
||||
xf86ReleaseGART(-1);
|
||||
|
||||
#if defined(linux)
|
||||
#if defined(__linux__)
|
||||
/* Per Dave Jones, every effort will be made to keep the
|
||||
* agpgart interface backwards compatible, so allow all
|
||||
* future versions.
|
||||
|
@ -196,7 +196,7 @@ xf86ReleaseGART(int screenNum)
|
|||
* to give up access to the GART, but not to remove any
|
||||
* allocations.
|
||||
*/
|
||||
#if !defined(linux)
|
||||
#if !defined(__linux__)
|
||||
if (screenNum == -1)
|
||||
#endif
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len)
|
|||
|
||||
#ifdef __alpha__
|
||||
|
||||
#ifdef linux
|
||||
#ifdef __linux__
|
||||
|
||||
unsigned long _bus_base(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue