Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2123309 | 5.0-pool | Lew Yobs | P4 | Closed | Future Project |
Currently, JNIEXPORT is defined as 'extern "C"' on Solaris and Linux in HotSpot,
on Windows it is defined as '__declspec(dllexport)'. On Solaris and Linux, it
will force C linkage, but on Windows it does not. As the result, some JVM
functions have C linkage on Solaris/Linux, but C++ linkage on Windows
(e.g. JVM_RegisterUnsafeMethods), that doesn't sound right.
We should redefine JNIEXPORT and follow the definition in JDK, that is,
empty on Solaris/Linux, '__decl(dllexport)' on Windows. JNIEXPORT only makes
a symbol public, it has nothing to do with a symbol's linkage type. All public
JVM functions should have C linkage, and they should be wrapped explicitly
inside 'extern "C" { ... }"
###@###.### 2004-08-20
on Windows it is defined as '__declspec(dllexport)'. On Solaris and Linux, it
will force C linkage, but on Windows it does not. As the result, some JVM
functions have C linkage on Solaris/Linux, but C++ linkage on Windows
(e.g. JVM_RegisterUnsafeMethods), that doesn't sound right.
We should redefine JNIEXPORT and follow the definition in JDK, that is,
empty on Solaris/Linux, '__decl(dllexport)' on Windows. JNIEXPORT only makes
a symbol public, it has nothing to do with a symbol's linkage type. All public
JVM functions should have C linkage, and they should be wrapped explicitly
inside 'extern "C" { ... }"
###@###.### 2004-08-20
- backported by
-
JDK-2123309 JNIEXPORT should be defined as empty on Solaris/Linux
-
- Closed
-