From 51e16725b8eadd9d3f792321a7fa4a490fce8e6a Mon Sep 17 00:00:00 2001 From: Kai Tietz Date: Fri, 8 Apr 2011 16:16:38 +0200 Subject: [PATCH] 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/ChangeLog | 24 ++++++++++++++++++++++++ libjava/Makefile.am | 2 +- libjava/Makefile.in | 3 ++- libjava/configure | 22 +++++++++++++++++++--- libjava/configure.ac | 15 +++++++++++++++ libjava/gcj/Makefile.in | 1 + libjava/gcj/javaprims.h | 9 +++++++++ libjava/headers.txt | 12 ++++++------ libjava/include/Makefile.in | 1 + libjava/include/jni_md.h | 22 ++++++++++++++++++---- libjava/java/lang/Class.h | 8 ++++---- libjava/java/lang/reflect/Constructor.h | 4 ++-- libjava/java/lang/reflect/Field.h | 4 ++-- libjava/java/lang/reflect/Method.h | 4 ++-- libjava/sysdep/i386/backtrace.h | 5 ++++- libjava/testsuite/Makefile.in | 1 + 16 files changed, 111 insertions(+), 26 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0bb6e4c9298..51dd786b528 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,27 @@ +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. + 2011-04-04 Rainer Orth * configure.ac: Redirect $JAR -cf@ output to /dev/null. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 52d09955609..152170862c0 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -492,7 +492,7 @@ xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) + $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL) libgcj_la_LIBADD = \ classpath/native/fdlibm/libfdlibm.la \ java/lang/Object.lo \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index bf5ab9dcda6..6c966a1efd5 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -606,6 +606,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@ @@ -1066,7 +1067,7 @@ xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) + $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL) libgcj_la_LIBADD = \ classpath/native/fdlibm/libfdlibm.la \ diff --git a/libjava/configure b/libjava/configure index 542ca8a0f76..8d7f0d57215 100755 --- a/libjava/configure +++ b/libjava/configure @@ -786,6 +786,7 @@ TOOLKIT LIBGCJDEBUG BUILD_SUBLIBS_FALSE BUILD_SUBLIBS_TRUE +LIBGCJ_LD_EXPORT_ALL LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJ_LD_SYMBOLIC LIBGCJ_SUBLIB_CORE_EXTRA_DEPS @@ -5957,6 +5958,16 @@ if test -z "$libgcj_ld_symbolic"; then libgcj_ld_symbolic=$SYMBOLIC_LDFLAGS fi +# for windows native targets enforce export of all symbols for shared libgcj. +libgcj_ld_export_all= +case "$host" in + *mingw*) + libgcj_ld_export_all=-Wl,--export-all-symbols + ;; + *) + ;; +esac + LIBGCJ_CFLAGS="${libgcj_cflags}" LIBGCJ_CXXFLAGS="${libgcj_cxxflags}" LIBGCJ_JAVAFLAGS="${libgcj_javaflags}" @@ -5964,6 +5975,8 @@ LIBGCJ_SUBLIB_LTFLAGS="${libgcj_sublib_ltflags}" LIBGCJ_SUBLIB_CORE_EXTRA_DEPS="${libgcj_sublib_core_extra_deps}" LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}" LIBGCJ_LD_SYMBOLIC_FUNCTIONS="${libgcj_ld_symbolic_functions}" +LIBGCJ_LD_EXPORT_ALL="${libgcj_ld_export_all}" + @@ -13346,7 +13359,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13349 "configure" +#line 13362 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13452,7 +13465,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13455 "configure" +#line 13468 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19445,7 +19458,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19448 "configure" +#line 19461 "configure" struct S { ~S(); }; void bar(); void foo() @@ -20540,6 +20553,9 @@ arm*linux*eabi) *-*-cygwin) extra_ldflags_libjava=-liconv ;; +*-*-mingw*) + extra_ldflags_libjava=-lws2_32 + ;; esac LIBMATHSPEC= diff --git a/libjava/configure.ac b/libjava/configure.ac index 5172aa1aca4..4cbff945f86 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -214,6 +214,16 @@ if test -z "$libgcj_ld_symbolic"; then libgcj_ld_symbolic=$SYMBOLIC_LDFLAGS fi +# for windows native targets enforce export of all symbols for shared libgcj. +libgcj_ld_export_all= +case "$host" in + *mingw*) + libgcj_ld_export_all=-Wl,--export-all-symbols + ;; + *) + ;; +esac + LIBGCJ_CFLAGS="${libgcj_cflags}" LIBGCJ_CXXFLAGS="${libgcj_cxxflags}" LIBGCJ_JAVAFLAGS="${libgcj_javaflags}" @@ -221,6 +231,7 @@ LIBGCJ_SUBLIB_LTFLAGS="${libgcj_sublib_ltflags}" LIBGCJ_SUBLIB_CORE_EXTRA_DEPS="${libgcj_sublib_core_extra_deps}" LIBGCJ_LD_SYMBOLIC="${libgcj_ld_symbolic}" LIBGCJ_LD_SYMBOLIC_FUNCTIONS="${libgcj_ld_symbolic_functions}" +LIBGCJ_LD_EXPORT_ALL="${libgcj_ld_export_all}" AC_SUBST(LIBGCJ_CFLAGS) AC_SUBST(LIBGCJ_CXXFLAGS) AC_SUBST(LIBGCJ_JAVAFLAGS) @@ -228,6 +239,7 @@ AC_SUBST(LIBGCJ_SUBLIB_LTFLAGS) AC_SUBST(LIBGCJ_SUBLIB_CORE_EXTRA_DEPS) AC_SUBST(LIBGCJ_LD_SYMBOLIC) AC_SUBST(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) +AC_SUBST(LIBGCJ_LD_EXPORT_ALL) # Only use libltdl for non-newlib builds. if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then @@ -930,6 +942,9 @@ arm*linux*eabi) *-*-cygwin) extra_ldflags_libjava=-liconv ;; +*-*-mingw*) + extra_ldflags_libjava=-lws2_32 + ;; esac LIBMATHSPEC= diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in index 626bfb3af62..44979381271 100644 --- a/libjava/gcj/Makefile.in +++ b/libjava/gcj/Makefile.in @@ -189,6 +189,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/gcj/javaprims.h b/libjava/gcj/javaprims.h index 3a0c964a437..3d4c3c947cb 100644 --- a/libjava/gcj/javaprims.h +++ b/libjava/gcj/javaprims.h @@ -26,6 +26,15 @@ details. */ #undef FALSE #define FALSE FALSE +// JNI calling convention also defined in jni.h */ +#ifndef JNICALL + #if (defined (_WIN32) || defined (__WIN32__) || defined (WIN32)) && !defined (_WIN64) + #define JNICALL __stdcall + #else + #define JNICALL + #endif +#endif + // To force selection of correct types that will mangle consistently // across platforms. extern "Java" diff --git a/libjava/headers.txt b/libjava/headers.txt index 73162fcaab3..bc1331db7b6 100644 --- a/libjava/headers.txt +++ b/libjava/headers.txt @@ -41,26 +41,26 @@ friend jstring (::_Jv_AllocString) (jsize); class java/lang/reflect/Constructor prepend jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *); -prepend jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +prepend jobject JNICALL _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); friend jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *); -friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +friend jobject JNICALL (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); friend class java::lang::Class; class java/lang/reflect/Field prepend jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *); -prepend jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean); +prepend jobject JNICALL _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean); prepend jobject _Jv_getFieldInternal (java::lang::reflect::Field *f, jclass c, jobject o); friend jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *); -friend jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean); +friend jobject JNICALL (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean); friend class java::lang::Class; friend jobject (::_Jv_getFieldInternal) (java::lang::reflect::Field *f, jclass c, jobject o); class java/lang/reflect/Method prepend jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *); -prepend jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +prepend jobject JNICALL _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); prepend ::java::lang::reflect::Method *_Jv_GetReflectedMethod (jclass, _Jv_Utf8Const*, _Jv_Utf8Const*); friend jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *); -friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +friend jobject JNICALL (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); friend class java::lang::Class; friend class java::io::ObjectInputStream; friend java::lang::reflect::Method* ::_Jv_GetReflectedMethod (jclass, _Jv_Utf8Const*, _Jv_Utf8Const*); diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in index 1796971d146..e6b043c378d 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 d75efc6f28b..40381270495 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__ diff --git a/libjava/java/lang/Class.h b/libjava/java/lang/Class.h index d4a918483c3..a05bdb0ad04 100644 --- a/libjava/java/lang/Class.h +++ b/libjava/java/lang/Class.h @@ -251,10 +251,10 @@ bool _Jv_getInterfaceMethod(jclass, jclass&, int&, const _Jv_Utf8Const*, const _Jv_Utf8Const*); -jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID, - jboolean); -jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, - jboolean); +jobject JNICALL _Jv_JNI_ToReflectedField (_Jv_JNIEnv *, jclass, jfieldID, + jboolean); +jobject JNICALL _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, + jboolean); jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *); jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *); diff --git a/libjava/java/lang/reflect/Constructor.h b/libjava/java/lang/reflect/Constructor.h index 5a200bc114d..1491ed7b5cf 100644 --- a/libjava/java/lang/reflect/Constructor.h +++ b/libjava/java/lang/reflect/Constructor.h @@ -11,7 +11,7 @@ jmethodID _Jv_FromReflectedConstructor (java::lang::reflect::Constructor *); -jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +jobject JNICALL _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); class java::lang::reflect::Constructor : public ::java::lang::reflect::AccessibleObject { @@ -58,7 +58,7 @@ public: static ::java::lang::Class class$; friend jmethodID (::_Jv_FromReflectedConstructor) (java::lang::reflect::Constructor *); - friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); + friend jobject JNICALL (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); friend class java::lang::Class; }; diff --git a/libjava/java/lang/reflect/Field.h b/libjava/java/lang/reflect/Field.h index 0af95652def..9eb71c3e30e 100644 --- a/libjava/java/lang/reflect/Field.h +++ b/libjava/java/lang/reflect/Field.h @@ -11,7 +11,7 @@ jfieldID _Jv_FromReflectedField (java::lang::reflect::Field *); -jobject _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean); +jobject JNICALL _Jv_JNI_ToReflectedField (_Jv_JNIEnv*, jclass, jfieldID, jboolean); jobject _Jv_getFieldInternal (java::lang::reflect::Field *f, jclass c, jobject o); class java::lang::reflect::Field : public ::java::lang::reflect::AccessibleObject @@ -90,7 +90,7 @@ public: static ::java::lang::Class class$; friend jfieldID (::_Jv_FromReflectedField) (java::lang::reflect::Field *); - friend jobject (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean); + friend jobject JNICALL (::_Jv_JNI_ToReflectedField) (_Jv_JNIEnv*, jclass, jfieldID, jboolean); friend class java::lang::Class; friend jobject (::_Jv_getFieldInternal) (java::lang::reflect::Field *f, jclass c, jobject o); }; diff --git a/libjava/java/lang/reflect/Method.h b/libjava/java/lang/reflect/Method.h index 8a843d5d154..914e04bede8 100644 --- a/libjava/java/lang/reflect/Method.h +++ b/libjava/java/lang/reflect/Method.h @@ -11,7 +11,7 @@ jmethodID _Jv_FromReflectedMethod (java::lang::reflect::Method *); -jobject _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); +jobject JNICALL _Jv_JNI_ToReflectedMethod (_Jv_JNIEnv *, jclass, jmethodID, jboolean); ::java::lang::reflect::Method *_Jv_GetReflectedMethod (jclass, _Jv_Utf8Const*, _Jv_Utf8Const*); class java::lang::reflect::Method : public ::java::lang::reflect::AccessibleObject @@ -75,7 +75,7 @@ public: static ::java::lang::Class class$; friend jmethodID (::_Jv_FromReflectedMethod) (java::lang::reflect::Method *); - friend jobject (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); + friend jobject JNICALL (::_Jv_JNI_ToReflectedMethod) (_Jv_JNIEnv *, jclass, jmethodID, jboolean); friend class java::lang::Class; friend class java::io::ObjectInputStream; friend java::lang::reflect::Method* ::_Jv_GetReflectedMethod (jclass, _Jv_Utf8Const*, _Jv_Utf8Const*); diff --git a/libjava/sysdep/i386/backtrace.h b/libjava/sysdep/i386/backtrace.h index ee793b22a0f..1bad2e1492f 100644 --- a/libjava/sysdep/i386/backtrace.h +++ b/libjava/sysdep/i386/backtrace.h @@ -17,7 +17,10 @@ details. */ /* To allow this to link as a DLL. */ #define MAIN_FUNC dll_crt0__FP11per_process extern "C" int MAIN_FUNC () __declspec(dllimport); -#else /* !__CYGWIN__ */ +#elif defined (_WIN32) +#define MAIN_FUNC DllMain +extern "C" int __stdcall MAIN_FUNC (void *, unsigned long, void *); +#else /* !__CYGWIN__ && !_WIN32 */ #define MAIN_FUNC main extern int MAIN_FUNC (int, char **); #endif /* ?__CYGWIN__ */ diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in index 4af89562341..a3ac9d81f4a 100644 --- a/libjava/testsuite/Makefile.in +++ b/libjava/testsuite/Makefile.in @@ -165,6 +165,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@ -- 2.30.2