diff options
author | Julien Cristau <jcristau@debian.org> | 2017-05-11 08:42:16 +0200 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-05-11 15:24:05 -0400 |
commit | c394f6b27329d212d2a8b9b3c6da1ef7847c46f3 (patch) | |
tree | 624163a80541895a1910541711400f7f8f9808a5 /hw/xfree86/os-support | |
parent | 6634ffc4d26846dcf892f27682f9021f6d9956a9 (diff) |
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>
Diffstat (limited to 'hw/xfree86/os-support')
-rw-r--r-- | hw/xfree86/os-support/bus/Pci.h | 4 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/Sbus.c | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/bus/xf86Sbus.h | 2 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_agp.c | 6 | ||||
-rw-r--r-- | hw/xfree86/os-support/misc/SlowBcopy.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index 776bb637c..1921e0282 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -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__) || \ diff --git a/hw/xfree86/os-support/bus/Sbus.c b/hw/xfree86/os-support/bus/Sbus.c index a5265770c..cb14368f8 100644 --- a/hw/xfree86/os-support/bus/Sbus.c +++ b/hw/xfree86/os-support/bus/Sbus.c @@ -157,7 +157,7 @@ promSetNode(sbusPromNodePtr pnode) static void promIsP1275(void) { -#ifdef linux +#ifdef __linux__ FILE *f; char buffer[1024]; diff --git a/hw/xfree86/os-support/bus/xf86Sbus.h b/hw/xfree86/os-support/bus/xf86Sbus.h index 8a10d64fe..d702e4e6c 100644 --- a/hw/xfree86/os-support/bus/xf86Sbus.h +++ b/hw/xfree86/os-support/bus/xf86Sbus.h @@ -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> diff --git a/hw/xfree86/os-support/linux/lnx_agp.c b/hw/xfree86/os-support/linux/lnx_agp.c index 2a28c6af8..e47bbfa1a 100644 --- a/hw/xfree86/os-support/linux/lnx_agp.c +++ b/hw/xfree86/os-support/linux/lnx_agp.c @@ -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 { diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c index 4f4881ce2..9d82c71bf 100644 --- a/hw/xfree86/os-support/misc/SlowBcopy.c +++ b/hw/xfree86/os-support/misc/SlowBcopy.c @@ -57,7 +57,7 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) #ifdef __alpha__ -#ifdef linux +#ifdef __linux__ unsigned long _bus_base(void); |