[patch] Allow compiling against newer X11 headers

Andrew John Hughes gnu_andrew at member.fsf.org
Mon Nov 2 14:47:40 PST 2009


2009/11/2 Vlastimil Babka <caster at gentoo.org>:
> Andrew John Hughes wrote:
>  > Hi Mark, Vlastimil,
>
> Hi Andrew,
>
>> Having seen both patches before, I'd personally prefer we just added
>> the necessary headers if that works, rather than the additional cruft
>> we have in the Fedora patch.  We should do that in awt_GraphicsEnv.h
>> though, as in the Fedora patch, which would also remove the need for
>> the #ifdef MITSHM (it's in awt_GraphicsEnv.h already).  So basically
>> the Fedora patch but without the removal of the XShm.h include and the
>> additional structs.
>
> Sure, why not. I just included it in the .c file because the .h file
> didn't use the constant and I hoped to minimize potential symbol
> collisions or something (suspected something like that could be the
> reason for the weird Fedora patch).
>
>> Though I've been aware of this for a while, I deliberately haven't
>> upgraded my own build systems to the new version because it will break
>> OpenJDK builds for which we don't yet have a solution.  Does anyone
>> know of some versioning defines in the X headers that would avoid us
>> having to use a configure check, and thus allow the patch to be
>> submitted upstream? I believe the change
>> (http://lists.x.org/archives/xorg-devel/2009-June/001242.html) appears
>> in libXext 1.1.1 as Vlastimil says, but is there a way of detecting
>> that other than with autoconf?
>
> I don't know about versioning defines, but maybe the simple test Diego
> suggested on our IRC channel could work in this case?
>
> #include <XShm.h>
> #ifndef X_ShmAttach
> #include <X11/Xmd.h>
> #include <X11/extensions/shmproto.h>
> #endif
>
> Vlastimil
>

Applying that to OpenJDk6 works here without shmproto.h:

http://cr.openjdk.java.net/~andrew/xshm/webrev.01/

Does it work for those with the new version? If so, we can send it upstream.
-- 
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8



More information about the distro-pkg-dev mailing list