aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
Diffstat (limited to 'dep')
-rw-r--r--dep/SFMT/SFMT.h87
-rw-r--r--dep/g3dlite/Readme.txt1
-rw-r--r--dep/g3dlite/include/G3D/g3dmath.h2
3 files changed, 48 insertions, 42 deletions
diff --git a/dep/SFMT/SFMT.h b/dep/SFMT/SFMT.h
index 4004ae1db6e..3d15d651e5b 100644
--- a/dep/SFMT/SFMT.h
+++ b/dep/SFMT/SFMT.h
@@ -150,9 +150,13 @@ __m128i const &c, __m128i const &d, __m128i const &mask) {
return z2;
}
+namespace boost {
+ template <typename T> class thread_specific_ptr;
+}
+
// Class for SFMT generator
class SFMTRand { // Encapsulate random number generator
- friend class ACE_TSS<SFMTRand>;
+ friend class boost::thread_specific_ptr<SFMTRand>;
public:
SFMTRand()
@@ -243,6 +247,47 @@ public:
y = ((uint32_t*)state)[ix++];
return y;
}
+
+ void* operator new(size_t size, std::nothrow_t const&)
+ {
+ return _mm_malloc(size, 16);
+ }
+
+ void operator delete(void* ptr, std::nothrow_t const&)
+ {
+ _mm_free(ptr);
+ }
+
+ void* operator new(size_t size)
+ {
+ return _mm_malloc(size, 16);
+ }
+
+ void operator delete(void* ptr)
+ {
+ _mm_free(ptr);
+ }
+
+ void* operator new[](size_t size, std::nothrow_t const&)
+ {
+ return _mm_malloc(size, 16);
+ }
+
+ void operator delete[](void* ptr, std::nothrow_t const&)
+ {
+ _mm_free(ptr);
+ }
+
+ void* operator new[](size_t size)
+ {
+ return _mm_malloc(size, 16);
+ }
+
+ void operator delete[](void* ptr)
+ {
+ _mm_free(ptr);
+ }
+
private:
void Init2() // Various initializations and period certification
{
@@ -307,46 +352,6 @@ private:
ix = 0;
}
- void* operator new(size_t size, std::nothrow_t const&)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete(void* ptr, std::nothrow_t const&)
- {
- _mm_free(ptr);
- }
-
- void* operator new(size_t size)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete(void* ptr)
- {
- _mm_free(ptr);
- }
-
- void* operator new[](size_t size, std::nothrow_t const&)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete[](void* ptr, std::nothrow_t const&)
- {
- _mm_free(ptr);
- }
-
- void* operator new[](size_t size)
- {
- return _mm_malloc(size, 16);
- }
-
- void operator delete[](void* ptr)
- {
- _mm_free(ptr);
- }
-
__m128i mask; // AND mask
__m128i state[SFMT_N]; // State vector for SFMT generator
uint32_t ix; // Index into state array
diff --git a/dep/g3dlite/Readme.txt b/dep/g3dlite/Readme.txt
index 7988d1f314e..739f6985090 100644
--- a/dep/g3dlite/Readme.txt
+++ b/dep/g3dlite/Readme.txt
@@ -9,3 +9,4 @@ G3D-v8.0_hotfix5.diff - 2013-02-27 - fix compilation in cygwin environments
G3D-v8.0_hotfix6.diff - 2013-03-08 - fix compilation in mingw
G3D-v8.0_hotfix7.diff - 2013-08-31 - fix typo in Matrix4 == operator
G3D-v8.0_hotfix8.diff - 2013-09-01 - fix typo in Vector3int32 += operator
+G3D-v8.0_hotfix9.diff - 2014-06-01 - only VS < 10 don't ship inttypes.h
diff --git a/dep/g3dlite/include/G3D/g3dmath.h b/dep/g3dlite/include/G3D/g3dmath.h
index b0c98aeaf04..4be723ca30c 100644
--- a/dep/g3dlite/include/G3D/g3dmath.h
+++ b/dep/g3dlite/include/G3D/g3dmath.h
@@ -30,7 +30,7 @@
#include <limits>
#include <stdlib.h>
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && (_MSC_VER < 1000)
// Visual Studio is missing inttypes.h
# ifndef PRId64
# define PRId64 "I64d"