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

Phil Race <[email protected]> Thu, 05 Jul 2018 13:30:51 -0700
Newsgroups gmane.comp.printing.cups.devel
Message-ID <[email protected]>
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>