<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Bug 7152519 has been created for this patch.<br>
<br>
- Jonathan<br>
<br>
On 03/09/2012 07:49 PM, Jonathan Lu wrote:
<blockquote
cite="mid:CAC-GWLdkVMSdVKyz=fKEOWWr-s_J+Ye-32XOe5NBedocxYRSOA@mail.gmail.com"
type="cite">
<div bgcolor="#FFFFFF" text="#000000"> Hello 2d-dev,<br>
<br>
I find that link.h is included in several place of OpenJDK code,
mostly together with dlfcn.h, but this caused portability
problem in my testing on some Unix platforms, such as AIX.<br>
So far as I see OpenJDK only makes use of basic POSIX.1-2001
compatible dynamic library manipulation functions, such as
dlopen, dlclose, dlsym, dlerr functions, no other extensions
found, so is link.h still neccessary for current implementation?
because link.h is not found in the c-POSIX standard headers (<span><a
moz-do-not-send="true"
href="http://en.wikipedia.org/wiki/C_POSIX_library"
target="_blank">http://en.wikipedia.org/wiki/C_POSIX_library</a></span>)
and I think this removal will be an enhancement for portability,
does that make sense?<br>
<br>
Here's the proposed patch, since most parts of it are from
Java2d so I post it here for discussion.<br>
<a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Eluchsh/remove_link_h/"
target="_blank">http://cr.openjdk.java.net/~luchsh/remove_link_h/</a><br>
<br>
And one more question, in
src/solaris/native/sun/java2d/x11/XRBackendNative.c I found
following comments<br>
#ifdef __solaris__<br>
/* Solaris 10 will not have these symbols at runtime */<br>
#include <link.h><br>
<br>
And in src/solaris/native/sun/awt/fontpath.c,<br>
#include <dlfcn.h><br>
#ifndef __linux__ /* i.e. is solaris */<br>
#include <link.h><br>
#endif<br>
<br>
I've built successfully on Ubuntu 11.10 32bit and OpenSolaris
Express 2010.11 x86, the patch seems to be OK, but does anybody
know the situation on Solaris (e.g. Solaris 10) of this problem?<br>
I assume it will also comply with POSIX.1-2001 standard, and
provide all the required functions in dlfcn.h, right?<br>
<br>
Cheers!<br>
- Jonathan<br>
<br>
</div>
</blockquote>
<br>
</body>
</html>