[OpenJDK 2D-Dev] Remove including of link.h to improve portability (original) (raw)
Phil Race philip.race at oracle.com
Mon Mar 12 11:22:40 PDT 2012
- Previous message: Remove including of link.h to improve portability
- Next message: [OpenJDK 2D-Dev] Remove including of link.h to improve portability
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I added two of those includes myself I believe and I doubt I did it unless needed and others apparently found it necessary too. So we need to be sure this is OK. However at least one of those I added dates back to Solaris 8 being the build platform so maybe its no longer needed.
I ran the patch through our internal jprt build system on all platforms which for Solaris uses a recent Solaris 10 update and it built fine. I didn't notice any new warnings on the files I know anything about.
7152519 It was incorrectly submitted as awt, I moved it to 2D.
But I think you should split this into 2 patches. The above bug can be used for all the 2D ones and push to 2d.
The other one for the nio and security patches can go to the "tl" repo.
-phil.
On 3/11/2012 8:29 PM, Jonathan Lu wrote:
Bug 7152519 has been created for this patch.
- Jonathan On 03/09/2012 07:49 PM, Jonathan Lu wrote: Hello 2d-dev,
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. 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 (http://en.wikipedia.org/wiki/CPOSIXlibrary) and I think this removal will be an enhancement for portability, does that make sense? Here's the proposed patch, since most parts of it are from Java2d so I post it here for discussion. http://cr.openjdk.java.net/~luchsh/removelinkh/ <http://cr.openjdk.java.net/%7Eluchsh/removelinkh/> And one more question, in src/solaris/native/sun/java2d/x11/XRBackendNative.c I found following comments #ifdef solaris /* Solaris 10 will not have these symbols at runtime */ #include <link.h> And in src/solaris/native/sun/awt/fontpath.c, #include <dlfcn.h> #ifndef linux /* i.e. is solaris */ #include <link.h> #endif 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? I assume it will also comply with POSIX.1-2001 standard, and provide all the required functions in dlfcn.h, right? Cheers! - Jonathan
- Previous message: Remove including of link.h to improve portability
- Next message: [OpenJDK 2D-Dev] Remove including of link.h to improve portability
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]