On Feb 3, 2010, at 09:31, Julien Cristau wrote:
On Wed, Feb 3, 2010 at 09:17:35 -0800, Jeremy Huddleston wrote:2) We're reporting that they're deprecated, so if we expect 3rd party clients of the headers to migrate, we should be willing to do it for our own code.We can migrate while still staying compatible with the old stuff with acouple configure checks.
How about this then: From 5c271b18b45b8e138b793e0a882fd894a488610b Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston <[email protected]> Date: Tue, 2 Feb 2010 15:48:42 -0800Subject: [PATCH] Fix warnings for recent bigreqsproto, xcmiscproto, and xf86bigfontproto
Signed-off-by: Jeremy Huddleston <[email protected]> Acked-by: Dan Nicholson <[email protected]> --- configure.ac | 10 +++++++--- src/Font.c | 4 ++++ src/OpenDis.c | 4 ++++ src/XlibInt.c | 4 ++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0eea575..93d9959 100644 --- a/configure.ac +++ b/configure.ac @@ -60,13 +60,13 @@ AM_CONDITIONAL(XCB, test x$ac_cv_use_xcb != xno) # Checks for pkg-config packages # Always required -X11_REQUIRES='xproto >= 7.0.13 xextproto xtrans' +X11_REQUIRES='[xproto >= 7.0.13] xextproto xtrans' PKG_PROG_PKG_CONFIG() case "$ac_cv_use_xcb" in no) - X11_REQUIRES="${X11_REQUIRES} xau xcmiscproto bigreqsproto"+ X11_REQUIRES="${X11_REQUIRES} xau [xcmiscproto >= 1.2.0] [bigreqsproto >= 1.1.0]"
X11_EXTRA_DEPS="xau"
PKG_CHECK_MODULES(XDMCP, xdmcp,
AC_CHECK_LIB(Xdmcp, XdmcpWrap,
@@ -186,6 +186,10 @@ AC_MSG_RESULT($XLIB_LOADABLE_XCURSOR)
AC_HEADER_STDC
AC_CHECK_HEADERS([sys/select.h])
+# Backwards compatability with older proto packages. This will be
removed eventually.
+# When removing, make sure to update Font.c OpenDis.c XlibInt.c+AC_CHECK_HEADERS([X11/extensions/xcmiscproto.h X11/extensions/ bigreqsproto.h X11/extensions/xf86bigfproto.h], [], [], [#include <X11/ Xproto.h>])
+
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
@@ -330,7 +334,7 @@ AC_ARG_ENABLE(xf86bigfont,
[Disable XF86BigFont extension support]),
[XF86BIGFONT=$enableval],[XF86BIGFONT="yes"])
if test "x$XF86BIGFONT" = "xyes"; then
- PKG_CHECK_MODULES(BIGFONT, xf86bigfontproto,
+ PKG_CHECK_MODULES(BIGFONT, [xf86bigfontproto >= 1.2.0],
AC_DEFINE(XF86BIGFONT,1,[Enable XF86BIGFONT
extension]),XF86BIGFONT="no")
AC_SUBST(BIGFONT_CFLAGS)
AC_SUBST(BIGFONT_LIBS)
diff --git a/src/Font.c b/src/Font.c
index b664b8d..2b82ade 100644
--- a/src/Font.c
+++ b/src/Font.c
@@ -45,8 +45,12 @@ authorization from the X Consortium and the XFree86
Project.
#include <stdio.h> #include <stdlib.h> +#ifdef HAVE_X11_EXTENSIONS_XF86BIGFPROTO_H +#include <X11/extensions/xf86bigfproto.h> +#else #include <X11/extensions/xf86bigfstr.h> #endif +#endif #include "Xlcint.h" #include "XlcPubI.h" diff --git a/src/OpenDis.c b/src/OpenDis.c index 46e1026..e4656a2 100644 --- a/src/OpenDis.c +++ b/src/OpenDis.c@@ -34,7 +34,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xxcbint.h" #else /* !USE_XCB */ #include <X11/Xtrans/Xtrans.h> +#ifdef HAVE_X11_EXTENSIONS_BIGREQSPROTO_H +#include <X11/extensions/bigreqsproto.h> +#else #include <X11/extensions/bigreqstr.h> +#endif #endif /* USE_XCB */ #include <X11/Xatom.h> #include <X11/Xresource.h> diff --git a/src/XlibInt.c b/src/XlibInt.c index fb6e715..8e06273 100644 --- a/src/XlibInt.c +++ b/src/XlibInt.c @@ -44,7 +44,11 @@ from The Open Group. #include <X11/Xpoll.h> #if !USE_XCB #include <X11/Xtrans/Xtrans.h> +#ifdef HAVE_X11_EXTENSIONS_XCMISCPROTO_H +#include <X11/extensions/xcmiscproto.h> +#else #include <X11/extensions/xcmiscstr.h> +#endif #endif /* !USE_XCB */ #include <assert.h> #include <stdio.h> -- 1.6.3.1
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
