From c9fdfb7db4de33179db0316b102217f80c3dc16d Mon Sep 17 00:00:00 2001 From: Don Bright Date: Mon, 12 Sep 2011 20:45:32 -0500 Subject: [PATCH 1/2] fix intmax_t problem on older windows visual studio --- src/import.cc | 7 +++++++ src/mainwin.cc | 8 ++++++++ src/openscad.cc | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/src/import.cc b/src/import.cc index f64a8f6d..f1da4a0a 100644 --- a/src/import.cc +++ b/src/import.cc @@ -36,6 +36,13 @@ #include "handle_dep.h" // handle_dep() #ifdef ENABLE_CGAL +#ifdef _MSC_VER +// see http://en.wikipedia.org/wiki/Stdint.h +// and http://www.mpfr.org/mpfr-2.4.2/#stdint +#include +using boost::intmax_t; +using boost::uintmax_t; +#endif #include "cgalutils.h" #endif diff --git a/src/mainwin.cc b/src/mainwin.cc index 56502f23..9dacbcee 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -86,6 +86,14 @@ using namespace boost::lambda; #ifdef ENABLE_CGAL +#ifdef _MSC_VER +// see http://en.wikipedia.org/wiki/Stdint.h +// and http://www.mpfr.org/mpfr-2.4.2/#stdint +#include +using boost::intmax_t; +using boost::uintmax_t; +#endif + #include "CGALCache.h" #include "CGALEvaluator.h" #include "PolySetCGALEvaluator.h" diff --git a/src/openscad.cc b/src/openscad.cc index fd74de4f..cb3a18d1 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -42,6 +42,13 @@ #include #ifdef ENABLE_CGAL +#ifdef _MSC_VER +// see http://en.wikipedia.org/wiki/Stdint.h +// and http://www.mpfr.org/mpfr-2.4.2/#stdint +#include +using boost::intmax_t; +using boost::uintmax_t; +#endif #include "CGAL_Nef_polyhedron.h" #include #include "CGALEvaluator.h" From 6b861c8f22604dbad56be5f58bd984f74b97c0c3 Mon Sep 17 00:00:00 2001 From: don bright Date: Tue, 13 Sep 2011 02:51:59 -0500 Subject: [PATCH 2/2] intmax_t patch - make smaller --- src/cgal.h | 8 ++++++++ src/import.cc | 7 ------- src/mainwin.cc | 8 -------- src/openscad.cc | 7 ------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/cgal.h b/src/cgal.h index e0e246cc..26d64aed 100644 --- a/src/cgal.h +++ b/src/cgal.h @@ -3,6 +3,14 @@ #ifdef ENABLE_CGAL +#ifdef _MSC_VER +// see http://en.wikipedia.org/wiki/Stdint.h +// and http://www.mpfr.org/mpfr-2.4.2/#stdint +#include +using boost::intmax_t; +using boost::uintmax_t; +#endif + #include #include #include diff --git a/src/import.cc b/src/import.cc index f1da4a0a..f64a8f6d 100644 --- a/src/import.cc +++ b/src/import.cc @@ -36,13 +36,6 @@ #include "handle_dep.h" // handle_dep() #ifdef ENABLE_CGAL -#ifdef _MSC_VER -// see http://en.wikipedia.org/wiki/Stdint.h -// and http://www.mpfr.org/mpfr-2.4.2/#stdint -#include -using boost::intmax_t; -using boost::uintmax_t; -#endif #include "cgalutils.h" #endif diff --git a/src/mainwin.cc b/src/mainwin.cc index 9dacbcee..56502f23 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -86,14 +86,6 @@ using namespace boost::lambda; #ifdef ENABLE_CGAL -#ifdef _MSC_VER -// see http://en.wikipedia.org/wiki/Stdint.h -// and http://www.mpfr.org/mpfr-2.4.2/#stdint -#include -using boost::intmax_t; -using boost::uintmax_t; -#endif - #include "CGALCache.h" #include "CGALEvaluator.h" #include "PolySetCGALEvaluator.h" diff --git a/src/openscad.cc b/src/openscad.cc index cb3a18d1..fd74de4f 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -42,13 +42,6 @@ #include #ifdef ENABLE_CGAL -#ifdef _MSC_VER -// see http://en.wikipedia.org/wiki/Stdint.h -// and http://www.mpfr.org/mpfr-2.4.2/#stdint -#include -using boost::intmax_t; -using boost::uintmax_t; -#endif #include "CGAL_Nef_polyhedron.h" #include #include "CGALEvaluator.h"