The marking of JNI_* functions as dll[im/ex]port causes problems
when libgcj.a is built as static lib.
It seems that the JNIIMPORT and JNIEXPORT are used in two different
ways
in jni.h
1) To declare dll linkage of functions when building or using
libgcj itself as dll.
2) To declare dll linkage of functions defined in user code (eg,
JNI_On[Un]Load). As I understand, JNIIMPORT and JNIEXPORT are
'standard'
macros that are defined in other implementations and user code expects
them
to be defined in jni.h
These different meanings should be separated.
The following patch is ugly, but fixes the problem with static
libgcj.a on windows, while allowing the declaration of
dllimport/export
attributes if building libgcj.as dll.