[OpenJDK 2D-Dev] <AWT Dev> Code Review 7110002: Rename xawt/libmawt.so and headless/libmawt.so so they can be colocated with libawt
Chris Hegarty
chris.hegarty at oracle.com
Fri Nov 11 11:44:49 UTC 2011
David,
Thanks for catching the issue in java_props_md. I should have seen this.
Update webrev:
- incorporated Davids changes to java_props_md
- "fixed" comments referring to libmawt in awt_LoadLibrary.c
http://cr.openjdk.java.net/~chegar/7110002/webrev.01/webrev/
Thanks,
-Chris.
On 11/11/2011 05:06, David Holmes wrote:
> PS. I was also going to query about the continued existence of other
> Motif related code - even libmawt is still referenced in the comments of
> a couple of Motif specific functions. Is that now "dead" code?
>
> David
>
> On 11/11/2011 3:00 PM, David Holmes wrote:
>> Chris,
>>
>> I just discovered that there is an additional change needed for
>> JAVASE_EMBEDDED. On the JDK side we also have a check to try and
>> determine if this is a headless or headful JRE, because a true
>> headless-JRE requires the special HToolkit. That code checks for the
>> existence of lib/<arch>/xawt to make that decision and so presently all
>> JRE's appear to headless JREs :(
>>
>> Here's a fix:
>>
>> diff -r 830d2e46023a src/solaris/native/java/lang/java_props_md.c
>> --- a/src/solaris/native/java/lang/java_props_md.c
>> +++ b/src/solaris/native/java/lang/java_props_md.c
>> @@ -325,8 +325,8 @@
>> realpath((char *)dlinfo.dli_fname, buf);
>> len = strlen(buf);
>> p = strrchr(buf, '/');
>> - /* Default AWT Toolkit on Linux and Solaris is XAWT. */
>> - strncpy(p, "/xawt/", MAXPATHLEN-len-1);
>> + /* Default AWT Toolkit on Linux and Solaris is libawt_xawt. */
>> + strncpy(p, "/libawt_xawt.so", MAXPATHLEN-len-1);
>> /* Check if it exists */
>> if (stat(buf, &statbuf) == -1 && errno == ENOENT) {
>> /* No - this is a reduced-headless-jre so use special HToolkit */
>>
>> Sorry I didn't think of this earlier.
>>
>> Thanks,
>> David
>>
>> On 9/11/2011 10:28 PM, Chris Hegarty wrote:
>>> Hi,
>>>
>>> CR 7110002 proposes to rename the unix version of the awt toolkit
>>> libraries to allow them reside in the same directory as libawt.
>>> xawt/libmawt.so -> libawt_xawt.so
>>> headless/libmawt.so -> libawt_headless.so
>>>
>>> The proposed new library names are prefixed with 'libawt' since they are
>>> subcomponents of libawt and this will make them more easily recognizably
>>> as such. But this is not necessarily a requirement, just that they are
>>> unique and can be colocated with libawt.
>>>
>>> This CR is part of the modularity effort. A future requirement of the
>>> jigsaw prototype is to treat native JDK implementation libraries as it
>>> would any user module installed in a module library. That is, native
>>> libraries should reside within the lib directory of the installed
>>> module. In the module library then AWT's libraries might be located in
>>> somewhere like modules/sun.desktop/8.0/lib.
>>>
>>> See discussion on the awt-dev mailing list for further context:
>>> http://mail.openjdk.java.net/pipermail/awt-dev/2011-April/001666.html
>>>
>>> Webrev:
>>> http://cr.openjdk.java.net/~chegar/7110002/webrev.00/
>>>
>>> Thanks,
>>> -Chris
>>>
More information about the 2d-dev
mailing list