[PATCH] Change xf86dga.h to only conditionally include server's header file.
peter.hutterer at who-t.net
Wed Sep 16 21:59:32 PDT 2009
On Wed, Sep 16, 2009 at 09:19:39PM -0700, Carl Worth wrote:
> The recent re-addition of the xf86dga.h file introduced an
> incompatibility with a recent, but unreleased version of libXxf86dga
> which also wanted to install a file of the same name.
note that both the library and the protocol are a pre-releases (.99.1). so
strictly speaking you're using a unreleased protocol as well :)
> Instead, we
> allow the proto package to own this file, and include the library's
> version (now to be named Xxf86dga.h) unless we're building an old
> server (indicated by _XF86DGA_SERVER_).
> configure.ac | 2 +-
> xf86dga.h | 8 ++++++++
> 2 files changed, 9 insertions(+), 1 deletions(-)
> diff --git a/configure.ac b/configure.ac
> index d517c3a..8c81de9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,5 +1,5 @@
> -AC_INIT([XF86DGAProto], [22.214.171.124], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
> +AC_INIT([XF86DGAProto], [126.96.36.199], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
> AM_INIT_AUTOMAKE([foreign dist-bzip2])
> # Require xorg-macros: XORG_CHANGELOG
> diff --git a/xf86dga.h b/xf86dga.h
> index 6d39268..aa1e69f 100644
> --- a/xf86dga.h
> +++ b/xf86dga.h
> @@ -1,3 +1,11 @@
> +#ifdef _XF86DGA_SERVER_
> #warning "xf86dga.h is obsolete and may be removed in the future."
> #warning "include <X11/extensions/xf86dgaconst.h> instead."
> #include <X11/extensions/xf86dgaconst.h>
xf86dga.h is also a library header, so this warning needs to also spit out a
warning about including Xxf86dga.h instead for clients.
> +#include <X11/extensions/Xxf86dga.h>
this is what I don't like about the whole approach - now you have the proto
package include some libX* header although he protocol itself doesn't and
shouldn't have any dependency on the library modules.
even more, if the server includes xf86dga.h without defining
_XF86DGA_SERVER_ first, it now includes the library header. This just gets
confusing. (I'm not sure there is a server version that actually does that,
More information about the xorg-devel