I had to include <cstring> in lots of places to make it compile with GCC 4.3.2 on Ubuntu 8.10
Code:
diff -ur Box2D_v2.0.1/Box2D/Examples/TestBed/Framework/Render.cpp Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Framework/Render.cpp
--- Box2D_v2.0.1/Box2D/Examples/TestBed/Framework/Render.cpp 2008-03-10 21:42:36.000000000 +1100
+++ Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Framework/Render.cpp 2009-02-18 01:47:12.000000000 +1100
@@ -26,6 +26,7 @@
#include <cstdio>
#include <cstdarg>
+#include <cstring>
void DebugDraw::DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color)
{
diff -ur Box2D_v2.0.1/Box2D/Examples/TestBed/Tests/BroadPhaseTest.cpp Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Tests/BroadPhaseTest.cpp
--- Box2D_v2.0.1/Box2D/Examples/TestBed/Tests/BroadPhaseTest.cpp 2008-01-07 00:30:56.000000000 +1100
+++ Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Tests/BroadPhaseTest.cpp 2009-02-18 01:47:24.000000000 +1100
@@ -19,6 +19,7 @@
#include "BroadPhaseTest.h"
#include <cstdio>
+#include <cstring>
const float32 k_width = 1.0f;
inline void GetRandomAABB(b2AABB* aabb)
diff -ur Box2D_v2.0.1/Box2D/Examples/TestBed/Tests/PolyShapes.h Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Tests/PolyShapes.h
--- Box2D_v2.0.1/Box2D/Examples/TestBed/Tests/PolyShapes.h 2008-04-12 00:27:40.000000000 +1000
+++ Box2D_v2.0.1-modified/Box2D/Examples/TestBed/Tests/PolyShapes.h 2009-02-18 01:47:37.000000000 +1100
@@ -21,6 +21,8 @@
#include "../Framework/Render.h"
+#include <cstring>
+
const int32 k_maxBodies = 256;
class PolyShapes : public Test
diff -ur Box2D_v2.0.1/Box2D/Source/Collision/b2BroadPhase.cpp Box2D_v2.0.1-modified/Box2D/Source/Collision/b2BroadPhase.cpp
--- Box2D_v2.0.1/Box2D/Source/Collision/b2BroadPhase.cpp 2008-03-10 21:42:36.000000000 +1100
+++ Box2D_v2.0.1-modified/Box2D/Source/Collision/b2BroadPhase.cpp 2009-02-18 01:46:09.000000000 +1100
@@ -18,6 +18,7 @@
#include "b2BroadPhase.h"
#include <algorithm>
+#include <cstring>
// Notes:
// - we use bound arrays instead of linked lists for cache coherence.
diff -ur Box2D_v2.0.1/Box2D/Source/Common/b2BlockAllocator.cpp Box2D_v2.0.1-modified/Box2D/Source/Common/b2BlockAllocator.cpp
--- Box2D_v2.0.1/Box2D/Source/Common/b2BlockAllocator.cpp 2007-11-24 11:25:02.000000000 +1100
+++ Box2D_v2.0.1-modified/Box2D/Source/Common/b2BlockAllocator.cpp 2009-02-18 01:45:50.000000000 +1100
@@ -20,6 +20,7 @@
#include <cstdlib>
#include <memory>
#include <climits>
+#include <cstring>
int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] =
{
diff -ur Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp
--- Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp 2008-04-10 23:37:08.000000000 +1000
+++ Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2CircleContact.cpp 2009-02-18 01:44:47.000000000 +1100
@@ -22,6 +22,7 @@
#include "../../Common/b2BlockAllocator.h"
#include <new>
+#include <cstring>
b2Contact* b2CircleContact::Create(b2Shape* shape1, b2Shape* shape2, b2BlockAllocator* allocator)
{
diff -ur Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp
--- Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp 2008-04-12 14:29:14.000000000 +1000
+++ Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2PolyAndCircleContact.cpp 2009-02-18 01:45:06.000000000 +1100
@@ -22,6 +22,7 @@
#include "../../Common/b2BlockAllocator.h"
#include <new>
+#include <cstring>
b2Contact* b2PolyAndCircleContact::Create(b2Shape* shape1, b2Shape* shape2, b2BlockAllocator* allocator)
{
diff -ur Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp
--- Box2D_v2.0.1/Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp 2008-04-10 23:38:38.000000000 +1000
+++ Box2D_v2.0.1-modified/Box2D/Source/Dynamics/Contacts/b2PolyContact.cpp 2009-02-18 01:44:34.000000000 +1100
@@ -23,6 +23,7 @@
#include <memory>
#include <new>
+#include <cstring>
b2Contact* b2PolygonContact::Create(b2Shape* shape1, b2Shape* shape2, b2BlockAllocator* allocator)
{