summaryrefslogtreecommitdiff
path: root/src/configure.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.cc')
-rw-r--r--src/configure.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/configure.cc b/src/configure.cc
index b3517dc..f796906 100644
--- a/src/configure.cc
+++ b/src/configure.cc
@@ -6,6 +6,7 @@
#include <iostream>
#include <filesystem>
#include <fstream>
+#include <sstream>
#include <getoptpp/getoptpp.hpp>
@@ -18,10 +19,23 @@ std::filesystem::path configurationFile("configuration.cc");
std::filesystem::path configHeaderFile("config.h");
const std::map<std::string, std::string> default_configuration{};
+
+#if !defined(_WIN32)
const std::map<std::string, std::string>& __attribute__((weak)) configuration()
{
return default_configuration;
}
+#else
+//extern const char * pWeakValue;
+//extern const char * pDefaultWeakValue = NULL;
+//
+//#pragma comment(linker, "/alternatename:_pWeakValue=_pDefaultWeakValue")
+const std::map<std::string, std::string>& configuration()
+{
+ return default_configuration;
+}
+
+#endif
bool hasConfiguration(const std::string& key)
{