[cups-devel] cups #defines __attribute__ to be empty

Phil Race philip.race at oracle.com
Thu Jul 5 13:30:51 PDT 2018


OpenJDK builds use the __attribute__  keyword to indicate symbols are 
exported
However cups/versioning.h #defines this to be empty unless the compiler 
is GNU C.
See the last few lines here :
https://github.com/apple/cups/blob/master/cups/versioning.h

So in our code when we include cups/cups.h cups we lose the value of 
__attribute__
and you only find out at runtime when these symbols are loaded via JNI and
we get a linkage error.

Why is CUPS doing this ?
And more importantly can it be fixed ?

-phil.
<https://github.com/apple/cups/blob/master/cups/versioning.h>


More information about the cups-devel mailing list