From 87929a9a2168b1634be69fbdcf97d1a41167de6a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Aug 2018 16:58:01 +0200 Subject: compat/linkage-macros: simplify --- options/value.cpp | 3 ++- options/value.hpp | 40 +++++++++++++++++++--------------------- 2 files changed, 21 insertions(+), 22 deletions(-) (limited to 'options') diff --git a/options/value.cpp b/options/value.cpp index 0e0725f8..e0be69ae 100644 --- a/options/value.cpp +++ b/options/value.cpp @@ -1,5 +1,6 @@ // instantiate the "template class" value symbols -#define OTR_INST_VALUE OTR_TEMPLATE_EXPORT +#include "compat/linkage-macros.hpp" +#define OTR_INST_VALUE(x) OTR_TEMPLATE_EXPORT(x) #include "value.hpp" diff --git a/options/value.hpp b/options/value.hpp index 7c0a8d56..bfa8b352 100644 --- a/options/value.hpp +++ b/options/value.hpp @@ -150,27 +150,25 @@ public: }; // some linker problems -#if !defined __APPLE__ -# if !defined OTR_INST_VALUE -# define OTR_INST_VALUE OTR_TEMPLATE_IMPORT -# endif - - 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>); +#if !defined OTR_INST_VALUE +# define OTR_INST_VALUE OTR_TEMPLATE_IMPORT #endif +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>); + } // ns options -- cgit v1.2.3