xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Thu May 11 19:32:12 UTC 2017


 Xext/xf86bigfont.c                     |    7 -------
 hw/xfree86/common/compiler.h           |   14 +++++++-------
 hw/xfree86/common/xf86Config.c         |    2 +-
 hw/xfree86/common/xf86Configure.c      |    2 +-
 hw/xfree86/common/xf86Init.c           |    2 +-
 hw/xfree86/common/xf86str.h            |    2 +-
 hw/xfree86/os-support/bus/Pci.h        |    4 ++--
 hw/xfree86/os-support/bus/Sbus.c       |    2 +-
 hw/xfree86/os-support/bus/xf86Sbus.h   |    2 +-
 hw/xfree86/os-support/linux/lnx_agp.c  |    6 +++---
 hw/xfree86/os-support/misc/SlowBcopy.c |    2 +-
 11 files changed, 19 insertions(+), 26 deletions(-)

New commits:
commit c394f6b27329d212d2a8b9b3c6da1ef7847c46f3
Author: Julien Cristau <jcristau at debian.org>
Date:   Thu May 11 08:42:16 2017 +0200

    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 at debian.org>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Tested-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 5a1fdac96..eea29dfb5 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -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__)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index c2b522a18..fa04a3f11 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 668a55151..5f9643a52 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -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)
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index d0bd6e95b..994b63b43 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -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);
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index 1da66e2dd..edd91c745 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -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
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);
 
commit 6634ffc4d26846dcf892f27682f9021f6d9956a9
Author: Julien Cristau <jcristau at debian.org>
Date:   Thu May 11 08:42:15 2017 +0200

    Drop workaround for pre-glibc linux
    
    It seems unlikely anyone still needs to build against libc4/libc5.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Julien Cristau <jcristau at debian.org>

diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c
index 72bb77401..529595bb7 100644
--- a/Xext/xf86bigfont.c
+++ b/Xext/xf86bigfont.c
@@ -40,13 +40,6 @@
 
 #include <sys/types.h>
 #ifdef HAS_SHM
-#if defined(linux) && (!defined(__GNU_LIBRARY__) || __GNU_LIBRARY__ < 2)
-/* libc4 does not define __GNU_LIBRARY__, libc5 defines __GNU_LIBRARY__ as 1 */
-/* Linux libc4 and libc5 only (because glibc doesn't include kernel headers):
-   Linux 2.0.x and 2.2.x define SHMLBA as PAGE_SIZE, but forget to define
-   PAGE_SIZE. It is defined in <asm/page.h>. */
-#include <asm/page.h>
-#endif
 #ifdef SVR4
 #include <sys/sysmacros.h>
 #endif


More information about the xorg-commit mailing list