diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2019-08-01 17:03:52 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2019-08-01 17:03:52 +0300 |
commit | 7d25d8c677cc0edbba469e2a54658ed9468efa60 (patch) | |
tree | 9597677d64fa92fa534c62eab627699f044d4f8c /src | |
parent | ec9117cc06e5b268d5c5b1170312c922fe3e892b (diff) |
Can build with (original llvm) clang-cl on windows
Diffstat (limited to 'src')
-rw-r--r-- | src/avrdude/windows/unistd.h | 8 | ||||
-rw-r--r-- | src/libnest2d/tests/test.cpp | 4 | ||||
-rw-r--r-- | src/libslic3r/Arrange.cpp | 5 | ||||
-rw-r--r-- | src/libslic3r/MinAreaBoundingBox.cpp | 5 | ||||
-rw-r--r-- | src/slic3r/GUI/GUI_Utils.cpp | 2 |
5 files changed, 22 insertions, 2 deletions
diff --git a/src/avrdude/windows/unistd.h b/src/avrdude/windows/unistd.h index 95ba79a34..fe6a8fb87 100644 --- a/src/avrdude/windows/unistd.h +++ b/src/avrdude/windows/unistd.h @@ -63,10 +63,15 @@ extern "C" { #define STDOUT_FILENO 1 #define STDERR_FILENO 2 +#ifdef _MSC_VER +#include <stdint.h> +struct timezone; +struct timeval; +#else #ifndef __cplusplus /* should be in some equivalent to <sys/types.h> */ typedef __int8 int8_t; -typedef __int16 int16_t; +typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; @@ -74,6 +79,7 @@ typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; #endif +#endif int usleep(unsigned usec); diff --git a/src/libnest2d/tests/test.cpp b/src/libnest2d/tests/test.cpp index 29577344d..4a6691415 100644 --- a/src/libnest2d/tests/test.cpp +++ b/src/libnest2d/tests/test.cpp @@ -7,6 +7,10 @@ #include "../tools/svgtools.hpp" #include <libnest2d/utils/rotcalipers.hpp> +#if defined(_MSC_VER) && defined(__clang__) +#define BOOST_NO_CXX17_HDR_STRING_VIEW +#endif + #include "boost/multiprecision/integer.hpp" #include "boost/rational.hpp" diff --git a/src/libslic3r/Arrange.cpp b/src/libslic3r/Arrange.cpp index b4cfac954..ed599d11d 100644 --- a/src/libslic3r/Arrange.cpp +++ b/src/libslic3r/Arrange.cpp @@ -12,6 +12,11 @@ #include <ClipperUtils.hpp> #include <boost/geometry/index/rtree.hpp> + +#if defined(_MSC_VER) && defined(__clang__) +#define BOOST_NO_CXX17_HDR_STRING_VIEW +#endif + #include <boost/multiprecision/integer.hpp> #include <boost/rational.hpp> diff --git a/src/libslic3r/MinAreaBoundingBox.cpp b/src/libslic3r/MinAreaBoundingBox.cpp index fafb54a58..15c04517d 100644 --- a/src/libslic3r/MinAreaBoundingBox.cpp +++ b/src/libslic3r/MinAreaBoundingBox.cpp @@ -1,6 +1,11 @@ #include "MinAreaBoundingBox.hpp" #include <libslic3r/ExPolygon.hpp> + +#if defined(_MSC_VER) && defined(__clang__) +#define BOOST_NO_CXX17_HDR_STRING_VIEW +#endif + #include <boost/rational.hpp> #include <libslic3r/Int128.hpp> diff --git a/src/slic3r/GUI/GUI_Utils.cpp b/src/slic3r/GUI/GUI_Utils.cpp index 74e70c554..d5753f2cc 100644 --- a/src/slic3r/GUI/GUI_Utils.cpp +++ b/src/slic3r/GUI/GUI_Utils.cpp @@ -62,7 +62,7 @@ template<class F> typename F::FN winapi_get_function(const wchar_t *dll, const c static HINSTANCE dll_handle = LoadLibraryExW(dll, nullptr, 0); if (dll_handle == nullptr) { return nullptr; } - return (F::FN)GetProcAddress(dll_handle, fn_name); + return (typename F::FN)GetProcAddress(dll_handle, fn_name); } #endif |