You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by rl...@apache.org on 2018/03/10 21:01:56 UTC

svn commit: r1826420 - in /xerces/c/trunk: ./ cmake/ src/ src/xercesc/util/

Author: rleigh
Date: Sat Mar 10 21:01:56 2018
New Revision: 1826420

URL: http://svn.apache.org/viewvc?rev=1826420&view=rev
Log:
Explicitly export ArrayJanitor templates

Added:
    xerces/c/trunk/src/xercesc/util/JanitorExports.cpp
Modified:
    xerces/c/trunk/cmake/XercesDLL.cmake
    xerces/c/trunk/configure.ac
    xerces/c/trunk/src/CMakeLists.txt
    xerces/c/trunk/src/Makefile.am
    xerces/c/trunk/src/xercesc/util/Janitor.hpp
    xerces/c/trunk/src/xercesc/util/TransService.hpp
    xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in
    xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in

Modified: xerces/c/trunk/cmake/XercesDLL.cmake
URL: http://svn.apache.org/viewvc/xerces/c/trunk/cmake/XercesDLL.cmake?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/cmake/XercesDLL.cmake (original)
+++ xerces/c/trunk/cmake/XercesDLL.cmake Sat Mar 10 21:01:56 2018
@@ -32,6 +32,7 @@ endif()
 
 set(XERCES_PLATFORM_EXPORT)
 set(XERCES_PLATFORM_IMPORT)
+set(XERCES_TEMPLATE_EXTERN extern)
 set(XERCES_DLL_EXPORT)
 set(XERCES_STATIC_LIBRARY)
 if(NOT BUILD_SHARED_LIBS)
@@ -40,6 +41,9 @@ else()
   if(WIN32)
     set(XERCES_PLATFORM_EXPORT "__declspec(dllexport)")
     set(XERCES_PLATFORM_IMPORT "__declspec(dllimport)")
+    if (MSVC)
+      set(XERCES_TEMPLATE_EXTERN)
+    endif()
     set(XERCES_DLL_EXPORT 1)
   endif()
 endif()

Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Sat Mar 10 21:01:56 2018
@@ -350,15 +350,18 @@ case $host in
 *-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows* )
 	platform_export="__declspec(dllexport)"
 	platform_import="__declspec(dllimport)"
+        template_extern=""
 	;;
 * )
 	platform_export=""
 	platform_import=""
+        template_extern="extern"
 	;;
 esac
 
 AC_DEFINE_UNQUOTED([XERCES_PLATFORM_EXPORT], [$platform_export], [Define as the platform's export attribute])
 AC_DEFINE_UNQUOTED([XERCES_PLATFORM_IMPORT], [$platform_import], [Define as the platform's import attribute])
+AC_DEFINE_UNQUOTED([XERCES_TEMPLATE_EXTERN], [$template_extern], [Define as the platform's template extern attribute])
 
 AS_IF([test ! $ac_cv_cxx_have_bool],
 	AC_DEFINE([XERCES_NO_NATIVE_BOOL], 1, [Define if there is no native bool support in this environment]))

Modified: xerces/c/trunk/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/CMakeLists.txt?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/CMakeLists.txt (original)
+++ xerces/c/trunk/src/CMakeLists.txt Sat Mar 10 21:01:56 2018
@@ -603,6 +603,7 @@ set(util_sources
   xercesc/util/EncodingValidator.cpp
   xercesc/util/HeaderDummy.cpp
   xercesc/util/HexBin.cpp
+  xercesc/util/JanitorExports.cpp
   xercesc/util/KVStringPair.cpp
   xercesc/util/Mutexes.cpp
   xercesc/util/PanicHandler.cpp

Modified: xerces/c/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/Makefile.am?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/Makefile.am (original)
+++ xerces/c/trunk/src/Makefile.am Sat Mar 10 21:01:56 2018
@@ -743,6 +743,7 @@ util_sources = \
 	xercesc/util/EncodingValidator.cpp \
 	xercesc/util/HeaderDummy.cpp \
 	xercesc/util/HexBin.cpp \
+        xercesc/util/JanitorExports.cpp \
 	xercesc/util/KVStringPair.cpp \
 	xercesc/util/Mutexes.cpp \
 	xercesc/util/PanicHandler.cpp \

Modified: xerces/c/trunk/src/xercesc/util/Janitor.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Janitor.hpp?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Janitor.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/Janitor.hpp Sat Mar 10 21:01:56 2018
@@ -155,6 +155,8 @@ private :
 };
 
 
+XERCES_TEMPLATE_EXTERN template class XMLUTIL_EXPORT ArrayJanitor<XMLByte>;
+XERCES_TEMPLATE_EXTERN template class XMLUTIL_EXPORT ArrayJanitor<XMLCh>;
 
 
 XERCES_CPP_NAMESPACE_END

Added: xerces/c/trunk/src/xercesc/util/JanitorExports.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/JanitorExports.cpp?rev=1826420&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/JanitorExports.cpp (added)
+++ xerces/c/trunk/src/xercesc/util/JanitorExports.cpp Sat Mar 10 21:01:56 2018
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <xercesc/util/Janitor.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
+
+template class ArrayJanitor<XMLByte>;
+template class ArrayJanitor<XMLCh>;
+
+XERCES_CPP_NAMESPACE_END

Modified: xerces/c/trunk/src/xercesc/util/TransService.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/TransService.hpp?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/TransService.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/TransService.hpp Sat Mar 10 21:01:56 2018
@@ -461,9 +461,6 @@ private :
     XMLLCPTranscoder& operator=(const XMLLCPTranscoder&);
 };
 
-template class XMLUTIL_EXPORT ArrayJanitor<XMLByte>;
-template class XMLUTIL_EXPORT ArrayJanitor<XMLCh>;
-
 //
 // This class can be used to transcode to a target encoding. It manages the
 // memory allocated for the transcode in an exception safe manner, automatically

Modified: xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in (original)
+++ xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in Sat Mar 10 21:01:56 2018
@@ -84,6 +84,7 @@
 #cmakedefine XERCES_STATIC_LIBRARY 1
 #define XERCES_PLATFORM_EXPORT @XERCES_PLATFORM_EXPORT@
 #define XERCES_PLATFORM_IMPORT @XERCES_PLATFORM_IMPORT@
+#define XERCES_TEMPLATE_EXTERN @XERCES_TEMPLATE_EXTERN@
 #ifdef XERCES_DLL_EXPORT
 #  define DLL_EXPORT
 #endif

Modified: xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in?rev=1826420&r1=1826419&r2=1826420&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in (original)
+++ xerces/c/trunk/src/xercesc/util/Xerces_autoconf_config.hpp.in Sat Mar 10 21:01:56 2018
@@ -80,6 +80,7 @@
 
 #undef XERCES_PLATFORM_EXPORT
 #undef XERCES_PLATFORM_IMPORT
+#undef XERCES_TEMPLATE_EXTERN
 
 #undef XERCES_NO_MATCHING_DELETE_OPERATOR
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org