From 51e16725b8eadd9d3f792321a7fa4a490fce8e6a Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 8 Apr 2011 16:16:38 +0200 Subject: configure.ac (libgcj_ld_export_all): Set for windows native targets to export-all-symbols. 2011-04-08 Kai Tietz * configure.ac (libgcj_ld_export_all): Set for windows native targets to export-all-symbols. (LIBGCJ_LD_EXPORT_ALL): Export libgcj_ld_export_all. * Makefile.am (libgcj_la_LDFLAGS): Add LIBGCJ_LD_EXPORT_ALL. * sysdep/i386/backtrace.h (MAIN_FUNC): Define for windows native targets to DllMain. * gcj/javaprims.h (JNICALL): Define it dependent for different windows targets. * include/jni_md.h: Likewise. * headers.txt (_Jv_JNI_ToReflectedField): Mark JNICALLS for friends. (_Jv_JNI_ToReflectedMethod): Likewise. * java/lang/Class.h: Regenerated. * java/lang/reflect/Field.h: Regenerated. * java/lang/reflect/Constructor.h: Regenerated. * java/lang/reflect/Method.h: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. From-SVN: r172186 --- libjava/include/Makefile.in | 1 + libjava/include/jni_md.h | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'libjava/include') diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in index 1796971..e6b043c 100644 --- a/libjava/include/Makefile.in +++ b/libjava/include/Makefile.in @@ -190,6 +190,7 @@ LIBGCJ_BC_SPEC = @LIBGCJ_BC_SPEC@ LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@ LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@ LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@ +LIBGCJ_LD_EXPORT_ALL = @LIBGCJ_LD_EXPORT_ALL@ LIBGCJ_LD_SYMBOLIC = @LIBGCJ_LD_SYMBOLIC@ LIBGCJ_LD_SYMBOLIC_FUNCTIONS = @LIBGCJ_LD_SYMBOLIC_FUNCTIONS@ LIBGCJ_SPEC = @LIBGCJ_SPEC@ diff --git a/libjava/include/jni_md.h b/libjava/include/jni_md.h index d75efc6..4038127 100644 --- a/libjava/include/jni_md.h +++ b/libjava/include/jni_md.h @@ -65,6 +65,15 @@ typedef struct _Jv_JavaVM JavaVM; reused between non-nesting JNI calls. */ \ struct _Jv_JNI_LocalFrame *bottom_locals; +/* JNI calling convention. Also defined in javaprims.h. */ +#ifndef JNICALL +#if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) \ + && !defined (_WIN64) + #define JNICALL __stdcall + #else + #define JNICALL + #endif +#endif #else /* __GCJ_JNI_IMPL__ */ @@ -117,14 +126,17 @@ typedef uint16_t jchar; /* Linkage and calling conventions. */ -#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32) +#if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) \ + && !defined (_WIN64) #define JNIIMPORT __declspec(dllimport) #define JNIEXPORT __declspec(dllexport) -#define JNICALL __stdcall +#ifndef JNICALL +#define JNICALL __stdcall +#endif -#else /* !( _WIN32 || __WIN32__ || WIN32) */ +#else /* !( _WIN32 || __WIN32__ || WIN32) || _WIN64 */ #define JNIIMPORT #if defined(__GNUC__) && __GNUC__ > 3 @@ -133,9 +145,11 @@ typedef uint16_t jchar; #define JNIEXPORT #endif +#ifndef JNICALL #define JNICALL +#endif -#endif /* !( _WIN32 || __WIN32__ || WIN32) */ +#endif /* !( _WIN32 || __WIN32__ || WIN32) || _WIN64 */ /* These defines apply to symbols in libgcj */ #ifdef __GCJ_DLL__ -- cgit v1.1