Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2015-11-06 13:34:37 +0300
committerAlessandro Ranellucci <aar@cpan.org>2015-11-06 13:34:37 +0300
commitca48501f9197370730fb65229f5d13fe13d32cf4 (patch)
tree9ac370e5530b2aba52cb66a10c9d9714c62c20a2 /xs/src/libslic3r/Config.cpp
parente7d2be842ddeb05bf65582f64a39d8d6fbf40c0a (diff)
Remove Boost from distribution and fix some more things for Windows compilation
Diffstat (limited to 'xs/src/libslic3r/Config.cpp')
-rw-r--r--xs/src/libslic3r/Config.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xs/src/libslic3r/Config.cpp b/xs/src/libslic3r/Config.cpp
index e388d8f9b..ba77d2aba 100644
--- a/xs/src/libslic3r/Config.cpp
+++ b/xs/src/libslic3r/Config.cpp
@@ -1,7 +1,7 @@
#include "Config.hpp"
#include <stdlib.h> // for setenv()
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(setenv) && defined(_putenv_s)
#define setenv(k, v, o) _putenv_s(k, v)
#endif
@@ -104,6 +104,7 @@ ConfigBase::get_abs_value(const t_config_option_key &opt_key, double ratio_over)
void
ConfigBase::setenv_()
{
+#ifdef setenv
t_config_option_keys opt_keys = this->keys();
for (t_config_option_keys::const_iterator it = opt_keys.begin(); it != opt_keys.end(); ++it) {
// prepend the SLIC3R_ prefix
@@ -118,6 +119,7 @@ ConfigBase::setenv_()
setenv(envname.c_str(), this->serialize(*it).c_str(), 1);
}
+#endif
}
#ifdef SLIC3RXS