[OpenJDK 2D-Dev] RFR: 8206106: [solaris sparc] jck tests api/javax_print/PrintService failing

Erik Joelsson erik.joelsson at oracle.com
Thu Jul 5 21:09:16 UTC 2018


Looks good to me.

I would have thought __attribute__ was a macro originally, but since 
it's not, this looks like a very simple solution. Would be nice if 
Volker could verify this as well.

/Erik


On 2018-07-05 14:06, Phil Race wrote:
> bug: https://bugs.openjdk.java.net/browse/JDK-8206106
>
> Current CUPS include files are defining __attribute__ to be empty
> We need to undo that to build. Details in the bug report.
> built + tested on Solaris, Linux, Mac.
>
> fix :
> hg diff src/java.desktop/unix/native/common/awt/CUPSfuncs.c
> diff --git a/src/java.desktop/unix/native/common/awt/CUPSfuncs.c 
> b/src/java.desktop/unix/native/common/awt/CUPSfuncs.c
> --- a/src/java.desktop/unix/native/common/awt/CUPSfuncs.c
> +++ b/src/java.desktop/unix/native/common/awt/CUPSfuncs.c
> @@ -29,6 +29,12 @@
>  #include <dlfcn.h>
>  #include <cups/cups.h>
>  #include <cups/ppd.h>
> +/*
> + * CUPS #define's __attribute__(x) to be empty unless the compiler is 
> GNU C.
> + * We need to #undef this else it breaks use of this keyword used by 
> JNIEXPORT.
> + */
> +#undef __attribute__
> +
>
> -phil.



More information about the 2d-dev mailing list