[Libreoffice-commits] core.git: Branch 'aoo/trunk' - jvmaccess/inc jvmaccess/util

Damjan Jovanovic damjan at apache.org
Mon Mar 26 06:09:19 UTC 2018


 jvmaccess/inc/jvmaccess/unovirtualmachine.hxx |   18 +++++++++---------
 jvmaccess/inc/jvmaccess/virtualmachine.hxx    |   20 ++++++++++----------
 jvmaccess/util/gcc3.map                       |    8 ++++----
 jvmaccess/util/mingw.map                      |    8 ++++----
 4 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 2e2e14976eec69b80c04bdf4f5e8d393e04b78dc
Author: Damjan Jovanovic <damjan at apache.org>
Date:   Mon Mar 26 04:48:54 2018 +0000

    On Windows the main/jvmaccess module refuses to be linked to by main/stoc
    
    due to not exporting typeinfos, or refuses to compile because it needs
    array constructors from salhelper's simplereferenceobject.
    
    It seems we have to hide all typeinfos, and export methods on a
    case-by-case basis, just like the .map files do. This gets it to compile,
    and seems to get main/stoc to link to it successfully.
    
    Patch by: me

diff --git a/jvmaccess/inc/jvmaccess/unovirtualmachine.hxx b/jvmaccess/inc/jvmaccess/unovirtualmachine.hxx
index 73ada3b86c81..1e85c131fd30 100644
--- a/jvmaccess/inc/jvmaccess/unovirtualmachine.hxx
+++ b/jvmaccess/inc/jvmaccess/unovirtualmachine.hxx
@@ -36,20 +36,20 @@ class VirtualMachine;
 /** An encapsulating wrapper around a Java virtual machine and an appropriate
     UNO class loader.
  */
-class JVMACCESS_DLLPUBLIC UnoVirtualMachine: public salhelper::SimpleReferenceObject {
+class UnoVirtualMachine: public salhelper::SimpleReferenceObject {
 public:
     /** An exception indicating failure to create a UnoVirtualMachine.
      */
-    class JVMACCESS_DLLPUBLIC CreationException
+    class CreationException
     {
     public:
-        CreationException();
+        JVMACCESS_DLLPUBLIC CreationException();
 
-        CreationException(CreationException const &);
+        JVMACCESS_DLLPUBLIC CreationException(CreationException const &);
 
-        virtual ~CreationException();
+        JVMACCESS_DLLPUBLIC virtual ~CreationException();
 
-        CreationException & operator =(CreationException const &);
+        JVMACCESS_DLLPUBLIC CreationException & operator =(CreationException const &);
     };
 
     /** Create a wrapper around a Java virtual machine and an appropriate UNO
@@ -69,7 +69,7 @@ public:
         @exception CreationException
         Thrown in case creation fails (due to a JNI problem).
      */
-    UnoVirtualMachine(
+    JVMACCESS_DLLPUBLIC UnoVirtualMachine(
         rtl::Reference< jvmaccess::VirtualMachine > const & virtualMachine,
         void * classLoader);
 
@@ -78,7 +78,7 @@ public:
         @return
         The Java virtual machine wrapper.  Will never be null.
      */
-    rtl::Reference< jvmaccess::VirtualMachine > getVirtualMachine() const;
+    JVMACCESS_DLLPUBLIC rtl::Reference< jvmaccess::VirtualMachine > getVirtualMachine() const;
 
     /** Get the UNO class loader.
 
@@ -89,7 +89,7 @@ public:
         different for different JDK versions, so that the mangled C++ name of
         the function would depend on the JDK version used at compile time.
      */
-    void * getClassLoader() const;
+    JVMACCESS_DLLPUBLIC void * getClassLoader() const;
 
 private:
     UnoVirtualMachine(UnoVirtualMachine &); // not defined
diff --git a/jvmaccess/inc/jvmaccess/virtualmachine.hxx b/jvmaccess/inc/jvmaccess/virtualmachine.hxx
index 79205b1d3524..8ea6136bf342 100644
--- a/jvmaccess/inc/jvmaccess/virtualmachine.hxx
+++ b/jvmaccess/inc/jvmaccess/virtualmachine.hxx
@@ -41,7 +41,7 @@ namespace jvmaccess {
 
 /** An encapsulating wrapper around a Java virtual machine.
  */
-class JVMACCESS_DLLPUBLIC VirtualMachine: public salhelper::SimpleReferenceObject
+class VirtualMachine: public salhelper::SimpleReferenceObject
 {
 public:
     /** A helper to attach a thread to a Java virtual machine.
@@ -54,21 +54,21 @@ public:
         detach the thread from the virtual machine upon destruction of the guard
         at the bottom of the stack).
      */
-    class JVMACCESS_DLLPUBLIC AttachGuard
+    class AttachGuard
     {
     public:
         /** An exception indicating failure to create an AttachGuard.
          */
-        class JVMACCESS_DLLPUBLIC CreationException
+        class CreationException
         {
         public:
-            CreationException();
+            JVMACCESS_DLLPUBLIC CreationException();
 
-            CreationException(CreationException const &);
+            JVMACCESS_DLLPUBLIC CreationException(CreationException const &);
 
-            virtual ~CreationException();
+            JVMACCESS_DLLPUBLIC virtual ~CreationException();
 
-            CreationException & operator =(CreationException const &);
+            JVMACCESS_DLLPUBLIC CreationException & operator =(CreationException const &);
         };
 
         /** Attach the current thread to a virtual machine.
@@ -79,11 +79,11 @@ public:
             @exception CreationException
             Thrown in case attaching fails (due to a JNI problem).
          */
-        explicit AttachGuard(rtl::Reference< VirtualMachine > const & rMachine);
+        JVMACCESS_DLLPUBLIC explicit AttachGuard(rtl::Reference< VirtualMachine > const & rMachine);
 
         /** Detach the current thread from the virtual machine again.
          */
-        ~AttachGuard();
+        JVMACCESS_DLLPUBLIC ~AttachGuard();
 
         /** Get a JNI environment pointer for the current thread.
 
@@ -135,7 +135,7 @@ public:
         anyway).  This parameter is currently unused (but may be used again in
         the future).
      */
-    VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
+    JVMACCESS_DLLPUBLIC VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
                    JNIEnv * pMainThreadEnv);
 
 private:
diff --git a/jvmaccess/util/gcc3.map b/jvmaccess/util/gcc3.map
index 1bc94dc25a1b..1df8c297a15b 100644
--- a/jvmaccess/util/gcc3.map
+++ b/jvmaccess/util/gcc3.map
@@ -28,8 +28,8 @@ UDK_3.1 {
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionC1ERKS2_; # jvmaccess::VirtualMachine::AttachGuard::CreationException::CreationException(CreationException const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionD0Ev; # jvmaccess::VirtualMachine::AttachGuard::CreationException::~CreationException()
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionaSERKS2_; # jvmaccess::VirtualMachine::AttachGuard::CreationException::operator =(CreationException const &)
-        _ZTIN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo for jvmaccess::VirtualMachine::AttachGuard::CreationException
-        _ZTSN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo name for jvmaccess::VirtualMachine::AttachGuard::CreationException
+        # _ZTIN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo for jvmaccess::VirtualMachine::AttachGuard::CreationException
+        # _ZTSN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo name for jvmaccess::VirtualMachine::AttachGuard::CreationException
         _ZN9jvmaccess14VirtualMachine11AttachGuardC1ERKN3rtl9ReferenceIS0_EE; # jvmaccess::VirtualMachine::AttachGuard::AttachGuard(rtl::Reference< VirtualMachine > const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuardC2ERKN3rtl9ReferenceIS0_EE; # jvmaccess::VirtualMachine::AttachGuard::AttachGuard(rtl::Reference< VirtualMachine > const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuardD1Ev; # jvmaccess::VirtualMachine::AttachGuard::~AttachGuard()
@@ -68,8 +68,8 @@ UDK_3.3 {
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionD1Ev; # jvmaccess::UnoVirtualMachine::CreationException::~CreationException()
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionD2Ev; # jvmaccess::UnoVirtualMachine::CreationException::~CreationException()
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionaSERKS1_; # jvmaccess::UnoVirtualMachine::CreationException::operator =(CreationException const &)
-        _ZTIN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo for jvmaccess::UnoVirtualMachine::CreationException
-        _ZTSN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo name for jvmaccess::UnoVirtualMachine::CreationException
+        # _ZTIN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo for jvmaccess::UnoVirtualMachine::CreationException
+        # _ZTSN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo name for jvmaccess::UnoVirtualMachine::CreationException
         _ZN9jvmaccess17UnoVirtualMachineC1ERKN3rtl9ReferenceINS_14VirtualMachineEEEPv; # jvmaccess::UnoVirtualMachine::UnoVirtualMachine(rtl::Reference< jvmaccess::VirtualMachine > const &, void *)
         _ZN9jvmaccess17UnoVirtualMachineC2ERKN3rtl9ReferenceINS_14VirtualMachineEEEPv; # jvmaccess::UnoVirtualMachine::UnoVirtualMachine(rtl::Reference< jvmaccess::VirtualMachine > const &, void *)
         _ZNK9jvmaccess17UnoVirtualMachine17getVirtualMachineEv; # jvmaccess::UnoVirtualMachine::getVirtualMachine() const
diff --git a/jvmaccess/util/mingw.map b/jvmaccess/util/mingw.map
index f1d811c13261..f2e39856b231 100644
--- a/jvmaccess/util/mingw.map
+++ b/jvmaccess/util/mingw.map
@@ -28,8 +28,8 @@ UDK_3_0_0 {
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionC1ERKS2_; # jvmaccess::VirtualMachine::AttachGuard::CreationException::CreationException(CreationException const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionD0Ev; # jvmaccess::VirtualMachine::AttachGuard::CreationException::~CreationException()
         _ZN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionaSERKS2_; # jvmaccess::VirtualMachine::AttachGuard::CreationException::operator =(CreationException const &)
-        _ZTIN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo for jvmaccess::VirtualMachine::AttachGuard::CreationException
-        _ZTSN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo name for jvmaccess::VirtualMachine::AttachGuard::CreationException
+        # _ZTIN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo for jvmaccess::VirtualMachine::AttachGuard::CreationException
+        # _ZTSN9jvmaccess14VirtualMachine11AttachGuard17CreationExceptionE; # typeinfo name for jvmaccess::VirtualMachine::AttachGuard::CreationException
         _ZN9jvmaccess14VirtualMachine11AttachGuardC1ERKN3rtl9ReferenceIS0_EE; # jvmaccess::VirtualMachine::AttachGuard::AttachGuard(rtl::Reference< VirtualMachine > const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuardC2ERKN3rtl9ReferenceIS0_EE; # jvmaccess::VirtualMachine::AttachGuard::AttachGuard(rtl::Reference< VirtualMachine > const &)
         _ZN9jvmaccess14VirtualMachine11AttachGuardD1Ev; # jvmaccess::VirtualMachine::AttachGuard::~AttachGuard()
@@ -52,8 +52,8 @@ UDK_3_0_0 {
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionD1Ev; # jvmaccess::UnoVirtualMachine::CreationException::~CreationException()
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionD2Ev; # jvmaccess::UnoVirtualMachine::CreationException::~CreationException()
         _ZN9jvmaccess17UnoVirtualMachine17CreationExceptionaSERKS1_; # jvmaccess::UnoVirtualMachine::CreationException::operator =(CreationException const &)
-        _ZTIN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo for jvmaccess::UnoVirtualMachine::CreationException
-        _ZTSN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo name for jvmaccess::UnoVirtualMachine::CreationException
+        # _ZTIN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo for jvmaccess::UnoVirtualMachine::CreationException
+        # _ZTSN9jvmaccess17UnoVirtualMachine17CreationExceptionE; # typeinfo name for jvmaccess::UnoVirtualMachine::CreationException
         _ZN9jvmaccess17UnoVirtualMachineC1ERKN3rtl9ReferenceINS_14VirtualMachineEEEPv; # jvmaccess::UnoVirtualMachine::UnoVirtualMachine(rtl::Reference< jvmaccess::VirtualMachine > const &, void *)
         _ZN9jvmaccess17UnoVirtualMachineC2ERKN3rtl9ReferenceINS_14VirtualMachineEEEPv; # jvmaccess::UnoVirtualMachine::UnoVirtualMachine(rtl::Reference< jvmaccess::VirtualMachine > const &, void *)
         _ZNK9jvmaccess17UnoVirtualMachine17getVirtualMachineEv; # jvmaccess::UnoVirtualMachine::getVirtualMachine() const


More information about the Libreoffice-commits mailing list