2009/6/16 Anthony Petrov <[email protected]>: > Hi Andrew, > > On 06/16/2009 02:11 AM, Andrew John Hughes wrote: >>> >>> Is it really necessary to include a chunk of the header file rather >>> than just doing a #include? If so, may I suggest that the block is >>> dependent on _XRENDER_H_ not being defined? > > The header may be absent on Solaris 10 U2 which is now a supported platform > for building JDK. This was the primary reason to cut'n'paste the chunk of > code from the xrender header. I think the best solution would be to wrap the > "imported" chunk of code with the proper #ifdef statement for now. Can you > make a patch please? >
I did: http://fuseyism.com/xrender/webrev.02/ Unfortunately, it isn't sufficient. gcc seems to include awt_p.h first, so that when the XRender header is included, it again redefines the structures. I tried also defining _XRENDER_H_ in awt_p.h, but of course because this is not the whole of the header, the XRender pipeline code then fails to compile: In file included from ../../../src/solaris/native/sun/java2d/x11/X11SurfaceData.h:34, from ../../../src/solaris/native/sun/java2d/x11/X11TextRenderer_md.c:31: ../../../src/solaris/native/sun/java2d/x11/MaskBuffer.h:45: error: expected specifier-qualifier-list before 'Picture' ../../../src/solaris/native/sun/java2d/x11/MaskBuffer.h:87: error: expected declaration specifiers or '...' before 'Picture' In file included from ../../../src/solaris/native/sun/java2d/x11/X11SurfaceData.h:35, from ../../../src/solaris/native/sun/java2d/x11/X11TextRenderer_md.c:31: ../../../src/solaris/native/sun/java2d/x11/XRSurfaceData.h:46: error: expected specifier-qualifier-list before 'Picture' ../../../src/solaris/native/sun/java2d/x11/XRSurfaceData.h:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'color_black' ../../../src/solaris/native/sun/java2d/x11/XRSurfaceData.h:67: error: expected ')' before 'mask' In file included from ../../../src/solaris/native/sun/java2d/x11/X11SurfaceData.h:35, from ../../../src/solaris/native/sun/java2d/x11/X11TextRenderer_md.c:31: ../../../src/solaris/native/sun/java2d/x11/XRSurfaceData.h:73: error: expected declaration specifiers or '...' before 'XRenderColor' ../../../src/solaris/native/sun/java2d/x11/XRSurfaceData.h:76: error: expected declaration specifiers or '...' before 'XRenderColor' In file included from ../../../src/solaris/native/sun/java2d/x11/X11TextRenderer_md.c:31: ../../../src/solaris/native/sun/java2d/x11/X11SurfaceData.h:118: error: expected specifier-qualifier-list before 'Picture' make[6]: *** [/mnt/builder/icedtea/openjdk-ecj/build/linux-amd64/tmp/sun/sun.awt.X11/xawt/obj64/X11TextRenderer_md.o] Error 1 As the XRender pipeline will be a feature of JDK7 (http://openjdk.java.net/projects/jdk7/features/), I think support for UNIX platforms without it, such as Solaris 10 U2, will have to be dropped for 7. > -- > best regards, > Anthony > >> Here's a webrev that fixes it by just using the xrender header: >> >> http://fuseyism.com/xrender/webrev.01/ >> >> It does mean the header has to be available at build time, but dlsym >> is still used to make it optional at runtime. >> Given the XRender project is going to be merged at some point anyway, >> this hardly seems like a huge sacrifice. >> >> Ok to commit? > -- 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
