missing JNIEXPORT / JNICALL at some places in function declarations/implementations (original) (raw)
Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Apr 5 15:45:06 UTC 2018
- Previous message (by thread): missing JNIEXPORT / JNICALL at some places in function declarations/implementations
- Next message (by thread): (urgent) RFR: JDK-8201221: JDK-8199608 introduced a build race on macosx
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That's most likely a result of the new JNIEXPORT I added as part of the mapfile removal.
I tried to match header file and C file, but I can certainly have missed cases. If I didn't get any warnings, it was hard to know what I missed.
Please do submit your patch.
I'm a bit surprised 32-bit Window is still buildable. :)
/Magnus
5 apr. 2018 kl. 17:20 skrev Baesken, Matthias <matthias.baesken at sap.com>:
Hello, we noticed that at a number of places in the coding , the JNIEXPORT and/or JNICALL modifiers do not match when one compares the declaration and The implementation of functions. While this is ok on most platforms, it seems to fail on Windows 32 bit and leads to errors like this one : e:/priv/openjdk/repos/jdk/src/java.desktop/share/native/libmlibimage/mlibImageConvKernelConvert.c(87) : error C2373: 'j2dmlibImageConvKernelConvert' : redefinition; different type modifiers e:\priv\openjdk\repos\jdk\src\java.desktop\share\native\libmlibimage\mlibimageproto.h(2630) : see declaration of 'j2dmlibImageConvKernelConvert' (there are quite a few of these e.g. in mlib / splashscreen etc.)
Another example is this one : diff -r 4d98473ed33e src/java.base/share/native/libjimage/jimage.hpp --- a/src/java.base/share/native/libjimage/jimage.hpp Thu Apr 05 09:55:16 2018 +0200 +++ b/src/java.base/share/native/libjimage/jimage.hpp Thu Apr 05 17:07:40 2018 +0200 @@ -126,7 +126,7 @@ * JImageLocationRef location = (*JImageFindResource)(image, * "java.base", "9.0", "java/lang/String.class", &size); */ -extern "C" JNIEXPORT JImageLocationRef JIMAGEFindResource(JImageFile* jimage, +extern "C" JNIEXPORT JImageLocationRef JNICALL JIMAGEFindResource(JImageFile* jimage, const char* modulename, const char* version, const char* name, jlong* size); Is there some generic way to get the same declarations / impementations in the code ? Or should I just add a patch with my findings ? Best regards, Matthias
- Previous message (by thread): missing JNIEXPORT / JNICALL at some places in function declarations/implementations
- Next message (by thread): (urgent) RFR: JDK-8201221: JDK-8199608 introduced a build race on macosx
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]