From 561b89409551119833acf7abbb77d4afd632a657 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 30 May 2018 07:21:23 +0200 Subject: compat/linkage: extern template works on GNU now --- options/value.cpp | 2 +- options/value.hpp | 44 +++++++++++++++++++++----------------------- 2 files changed, 22 insertions(+), 24 deletions(-) (limited to 'options') diff --git a/options/value.cpp b/options/value.cpp index 5796dcd6..0e0725f8 100644 --- a/options/value.cpp +++ b/options/value.cpp @@ -1,5 +1,5 @@ // instantiate the "template class" value symbols -#define OTR_OPT_VALUE OTR_TEMPLATE_EXPORT +#define OTR_INST_VALUE OTR_TEMPLATE_EXPORT #include "value.hpp" diff --git a/options/value.hpp b/options/value.hpp index a95626f7..47a4d631 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -15,6 +15,7 @@ #include "base-value.hpp" #include "value-traits.hpp" #include "compat/macros.hpp" +#include "compat/linkage-macros.hpp" #include #include @@ -142,30 +143,27 @@ private: const t def; }; -#if defined _MSC_VER - -# if !defined OTR_OPT_VALUE -# define OTR_OPT_VALUE OTR_TEMPLATE_IMPORT -# endif - - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - OTR_OPT_VALUE value; - - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; - OTR_OPT_VALUE value>; +#if !defined OTR_INST_VALUE +# define OTR_INST_VALUE OTR_TEMPLATE_IMPORT +#endif +#if !defined __APPLE__ + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); + OTR_INST_VALUE(value>); #endif } // ns options -- cgit v1.2.3