diff options
author | Ranjit Mathew <rmathew@hotmail.com> | 2002-11-10 17:38:08 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-11-10 17:38:08 +0000 |
commit | a2eb270a7e559144b40f03f2adf3866f96749a04 (patch) | |
tree | c724227df81b3c05f2ca9db31c0ec88df76adc36 | |
parent | 44e8d1f0064828a9a59df0097b72e7299d5d500b (diff) | |
download | gcc-a2eb270a7e559144b40f03f2adf3866f96749a04.zip gcc-a2eb270a7e559144b40f03f2adf3866f96749a04.tar.gz gcc-a2eb270a7e559144b40f03f2adf3866f96749a04.tar.bz2 |
jni.h (JNIIMPORT, [...]): Linker defines for Win32.
2002-11-08 Ranjit Mathew <rmathew@hotmail.com>
* include/jni.h (JNIIMPORT, JNIEXPORT, JNICALL): Linker defines
for Win32. JNICALL has been defined to __stdcall to be compatible
with Sun's JDKs.
From-SVN: r58985
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/include/jni.h | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b2a035a..bd350f8 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2002-11-08 Ranjit Mathew <rmathew@hotmail.com> + + * include/jni.h (JNIIMPORT, JNIEXPORT, JNICALL): Linker defines + for Win32. JNICALL has been defined to __stdcall to be compatible + with Sun's JDKs. + 2002-11-10 Tom Tromey <tromey@redhat.com> * java/awt/GridLayout.java (setColumns): Check newCols, not cols. diff --git a/libjava/include/jni.h b/libjava/include/jni.h index b5ce334..07a21e6 100644 --- a/libjava/include/jni.h +++ b/libjava/include/jni.h @@ -173,12 +173,21 @@ typedef void *jmethodID; #define JNI_EDETACHED -2 #define JNI_EVERSION -3 -/* Linkage and calling conventions. This will need updating when we - support Windows DLLs. */ +/* Linkage and calling conventions. */ +#if defined(_WIN32) || defined (__WIN32__) || defined (WIN32) + +#define JNIIMPORT __declspec(dllimport) +#define JNIEXPORT __declspec(dllexport) +#define JNICALL __stdcall + +#else + #define JNIIMPORT #define JNIEXPORT #define JNICALL +#endif /* !( _WIN32 || __WIN32__ || WIN32) */ + #ifdef __cplusplus extern "C" { |