diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-10 14:05:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-10 18:01:27 +0000 |
commit | 8646ab97dc37c0606b19057686bf3d610f9c15ee (patch) | |
tree | 17b3df6f5cf55cb1091c4aa70930dd415d9ea0e3 /bridges/source/jni_uno | |
parent | 09e9274fc080b471393b806617eb03124db67590 (diff) |
Remove MinGW support
In OOo times, there'd originally been efforts to allow building on Windows with
MinGW. Later, in LO times, this has been shifted to an attempt of cross-
compiling for Windows on Linux. That attempt can be considered abandoned, and
the relevant code rotting.
Due to this heritage, there are now three kinds of MinGW-specific code in LO:
* Code from the original OOo native Windows effort that is no longer relevant
for the LO cross-compilation effort, but has never been removed properly.
* Code from the original OOo native Windows effort that is re-purposed for the
LO cross-compilation effort.
* Code that has been added specifially for the LO cross-compilation effort.
All three kinds of code are removed.
(An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing
--with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.)
Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568
Reviewed-on: https://gerrit.libreoffice.org/34127
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'bridges/source/jni_uno')
-rw-r--r-- | bridges/source/jni_uno/jni_java2uno.cxx | 42 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_uno2java.cxx | 16 |
2 files changed, 0 insertions, 58 deletions
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 079695405d56..98fb8f5bcd00 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -178,11 +178,7 @@ jobject Bridge::call_uno( break; } -#ifdef BROKEN_ALLOCA - char * mem = static_cast<char *>(malloc( -#else char * mem = static_cast<char *>(alloca( -#endif (nParams * sizeof (void *)) + return_size + (nParams * sizeof (largest)) )); void ** uno_args = reinterpret_cast<void **>(mem); @@ -203,11 +199,7 @@ jobject Bridge::call_uno( TypeDescr td( type ); if (sal::static_int_cast< sal_uInt32 >(td.get()->nSize) > sizeof (largest)) -#ifdef BROKEN_ALLOCA - uno_args[ nPos ] = malloc( td.get()->nSize ); -#else uno_args[ nPos ] = alloca( td.get()->nSize ); -#endif } if (param.bIn) @@ -235,14 +227,7 @@ jobject Bridge::call_uno( uno_type_destructData( uno_args[ n ], p.pTypeRef, nullptr ); } -#ifdef BROKEN_ALLOCA - if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ]) - free( uno_args[ nPos ] ); -#endif } -#ifdef BROKEN_ALLOCA - free( mem ); -#endif throw; } } @@ -281,16 +266,9 @@ jobject Bridge::call_uno( { uno_type_destructData( uno_args[ n ], pParams[ n ].pTypeRef, nullptr ); -#ifdef BROKEN_ALLOCA - if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ]) - free( uno_args[ nPos ] ); -#endif } // cleanup uno return value uno_type_destructData( uno_ret, return_type, nullptr ); -#ifdef BROKEN_ALLOCA - free( mem ); -#endif throw; } } @@ -298,10 +276,6 @@ jobject Bridge::call_uno( typelib_TypeClass_ENUM != type->eTypeClass) // opt { uno_type_destructData( uno_args[ nPos ], type, nullptr ); -#ifdef BROKEN_ALLOCA - if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ]) - free( uno_args[ nPos ] ); -#endif } } @@ -319,9 +293,6 @@ jobject Bridge::call_uno( catch (...) { uno_type_destructData( uno_ret, return_type, nullptr ); -#ifdef BROKEN_ALLOCA - free( mem ); -#endif throw; } if (typelib_TypeClass_DOUBLE < return_type->eTypeClass && @@ -329,14 +300,8 @@ jobject Bridge::call_uno( { uno_type_destructData( uno_ret, return_type, nullptr ); } -#ifdef BROKEN_ALLOCA - free( mem ); -#endif return java_ret.l; } -#ifdef BROKEN_ALLOCA - free( mem ); -#endif return nullptr; // void return } else // exception occurred @@ -347,16 +312,9 @@ jobject Bridge::call_uno( typelib_MethodParameter const & param = pParams[ nPos ]; if (param.bIn) uno_type_destructData( uno_args[ nPos ], param.pTypeRef, nullptr ); -#ifdef BROKEN_ALLOCA - if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ]) - free( uno_args[ nPos ] ); -#endif } handle_uno_exc( jni, uno_exc ); -#ifdef BROKEN_ALLOCA - free( mem ); -#endif return nullptr; } } diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index 80667e98fe10..730a9a338532 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -150,11 +150,7 @@ void Bridge::call_java( } // prepare java args, save param td -#ifdef BROKEN_ALLOCA - jvalue * java_args = (jvalue *) malloc( sizeof (jvalue) * nParams ); -#else jvalue * java_args = static_cast<jvalue *>(alloca( sizeof (jvalue) * nParams )); -#endif sal_Int32 nPos; for ( nPos = 0; nPos < nParams; ++nPos ) @@ -182,9 +178,6 @@ void Bridge::call_java( jni->DeleteLocalRef( java_args[ n ].l ); } } -#ifdef BROKEN_ALLOCA - free( java_args ); -#endif throw; } } @@ -344,9 +337,6 @@ void Bridge::call_java( jni->DeleteLocalRef( java_args[ nPos ].l ); } } -#ifdef BROKEN_ALLOCA - free( java_args ); -#endif throw; } jni->DeleteLocalRef( java_args[ nPos ].l ); @@ -381,9 +371,6 @@ void Bridge::call_java( uno_args[ i ], param.pTypeRef, nullptr ); } } -#ifdef BROKEN_ALLOCA - free( java_args ); -#endif throw; } } // else: already set integral uno return value @@ -391,9 +378,6 @@ void Bridge::call_java( // no exception occurred *uno_exc = nullptr; } -#ifdef BROKEN_ALLOCA - free( java_args ); -#endif } // an UNO proxy wrapping a Java interface |