[7u40] Request for review: [macosx] jawt_md.h shipped with jdk is outdated

Anthony Petrov anthony.petrov at oracle.com
Tue May 28 09:55:11 PDT 2013


Yes, you need a jdk7u-dev@ approval before this can be pushed to 7u-dev.

I can push your fix tomorrow (provided you get the approval by then). 
But AFAIK, nobody but me has reviewed it yet.

Can we get at least one more review please?

http://cr.openjdk.java.net/~ddehaven/7181710/jdk.0/

--
best regards,
Anthony

On 05/28/2013 07:16 PM, David DeHaven wrote:
>
> Should I post this to 7u-dev for approval? Can I get someone to sponsor this (since I'm not a committer...)?
>
> -DrD-
>
>>
>> Incidentally, I tried compiling with the JDK8 jni_md.h and it built fine... I didn't think the related changes were backported, or were they?
>>
>> Either way, I think it needs to be a separate issue. Not that it matters, I'm off chasing fires with buckets of gasoline again... :(
>>
>> -DrD-
>>
>>> Thanks. I'm OK if this will be a separate bug.
>>>
>>> --
>>> best regards,
>>> Anthony
>>>
>>> On 05/17/2013 07:00 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).
>>>>
>>>> The Mac builds currently use the solaris headers in both versions (which is why I was so interested in helping him). I haven't tried building 7u-dev with the attribute set yet, so I'm not sure of the consequences in JDK7. I can give it a try, if it's too ugly I'll file a separate issue to do the backport.
>>>>
>>>>
>>>>> Also, I assume you're going to forward-port your fix to JDK 8 at some point?
>>>>
>>>> Yes, that's my plan.
>>>>
>>>> -DrD-
>>>>
>>
>


More information about the macosx-port-dev mailing list