[7u40] Request for review: [macosx] jawt_md.h shipped with jdk is outdated
Anthony Petrov
anthony.petrov at oracle.com
Fri May 17 07:40:26 PDT 2013
On 05/17/2013 06:25 PM, David DeHaven wrote:
>> The fix looks good to me. Only one question:
>>
>> src/macosx/javavm/export/jni_md.h
>>> 29 #define JNIEXPORT
>>
>> Does the empty #define imply that when building a jni lib on Mac, it should export all of its symbols by default?
>
> It depends on gcc's visibility setting, but yes, by default all symbols are exported.
>
> JDK8 has a better jni_md.h that sets JNIEXPORT to __attribute__(visibility(("default"))). That change should be backported, but should probably need to be done under a different bug ID. I suppose I could sneak it in here :)
IIRC, Martin Buchholz's fix only updated the jni_md.h for Solaris, so
the Mac's one is unlikely to change even if his fix is back-ported.
Hence I'd vote for adding the __attribute__(visibility(("default"))) in
your fix (unless this can break anything - recall the changes needed in
awt_LoadLibrary.c where the JNIEXPORT was used in a typedef).
Also, I assume you're going to forward-port your fix to JDK 8 at some point?
--
best regards,
Anthony
More information about the macosx-port-dev
mailing list