xserver: Branch 'master' - 2 commits

Adam Jackson ajax at kemper.freedesktop.org
Wed May 3 19:53:41 UTC 2017


 configure.ac                           |    2 +-
 hw/dmx/dmx.c                           |    3 +--
 hw/xfree86/common/xf86Xinput.c         |    3 +++
 hw/xfree86/os-support/linux/lnx_init.c |    3 +++
 include/meson.build                    |    1 +
 include/xorg-config.h.in               |    3 +++
 6 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit d732c36597fab2e9bc4f2aa72cf1110997697557
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Apr 27 14:45:25 2017 -0400

    xfree86: Silence a new glibc warning
    
    glibc would like to stop declaring major()/minor() macros in
    <sys/types.h> because that header gets included absolutely everywhere
    and unix device major/minor is perhaps usually not what's expected. Fair
    enough. If one includes <sys/sysmacros.h> as well then glibc knows we
    meant it and doesn't warn, so do that if it exists.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/configure.ac b/configure.ac
index 8ef201709..faf0753d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,7 +132,7 @@ AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h \
- fnmatch.h sys/mkdev.h sys/utsname.h])
+ fnmatch.h sys/mkdev.h sys/sysmacros.h sys/utsname.h])
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 39de498a3..136bf50ff 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -84,6 +84,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
 #ifdef HAVE_SYS_MKDEV_H
 #include <sys/mkdev.h>          /* for major() & minor() on Solaris */
 #endif
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index dbf497ca2..9e5ddcd50 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -38,6 +38,9 @@
 #include "xf86_OSlib.h"
 
 #include <sys/stat.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
 
 #ifndef K_OFF
 #define K_OFF 0x4
diff --git a/include/meson.build b/include/meson.build
index 173f8ddfa..a2f74ada9 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -95,6 +95,7 @@ conf_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h'))
 conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h'))
 conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h'))
 conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h'))
+conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h'))
 conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h'))
 
 conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace'))
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index b8d6a87a3..bf555eb95 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -124,6 +124,9 @@
 /* Define to 1 if you have the <sys/mkdev.h> header file. */
 #undef HAVE_SYS_MKDEV_H
 
+/* Define to 1 if you have the <sys/sysmacros.h> header file. */
+#undef HAVE_SYS_SYSMACROS_H
+
 /* Path to text files containing PCI IDs */
 #undef PCI_TXT_IDS_PATH
 
commit c3147a20065b212fac78eb29c9bb9e150f9b22f5
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Apr 27 14:45:24 2017 -0400

    dmx: Fix decl mismatch for XRT_WINDOW
    
    Building xserver with meson -Db_lto=true found this! Check it:
    
    ../hw/dmx/dmx.c:66:22: warning: type of ‘XRT_WINDOW’ does not match
                                    original declaration [-Wlto-type-mismatch]
     extern unsigned long XRT_WINDOW;
                          ^
    ../include/resource.h:58:18: note: type ‘RESTYPE’ should match type ‘long
                                       unsigned int’
     typedef uint32_t RESTYPE;
                      ^
    ../Xext/panoramiX.c:85:9: note: ‘XRT_WINDOW’ was previously declared here
     RESTYPE XRT_WINDOW;
             ^
    ../Xext/panoramiX.c:85:9: note: code may be misoptimized unless
                                    -fno-strict-aliasing is used
    
    I have never managed successfully to build xserver with LTO with
    autotools, so, score one for meson.
    
    Get the decl from panoramiXsrv.h, which includes panoramiX.h first anyway.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c
index 6c3614276..88fe9d3d4 100644
--- a/hw/dmx/dmx.c
+++ b/hw/dmx/dmx.c
@@ -62,8 +62,7 @@
 #include "protocol-versions.h"
 
 #ifdef PANORAMIX
-#include "panoramiX.h"
-extern unsigned long XRT_WINDOW;
+#include "panoramiXsrv.h"
 extern int PanoramiXNumScreens;
 #endif
 


More information about the xorg-commit mailing list