diff --git a/Demos/MultiThreadedDemo/MultiThreadedDemo.cpp b/Demos/MultiThreadedDemo/MultiThreadedDemo.cpp index fc586e7ca..f618c9f06 100644 --- a/Demos/MultiThreadedDemo/MultiThreadedDemo.cpp +++ b/Demos/MultiThreadedDemo/MultiThreadedDemo.cpp @@ -254,7 +254,7 @@ int maxNumOutstandingTasks = 4; #ifdef USE_WIN32_THREADING - m_threadSupportCollision = new Win32ThreadSupport(Win32ThreadSupport::Win32ThreadConstructionInfo( +m_threadSupportCollision = new Win32ThreadSupport(Win32ThreadSupport::Win32ThreadConstructionInfo( "collision", processCollisionTask, createCollisionLocalStoreMemory, diff --git a/Extras/BulletMultiThreaded/PlatformDefinitions.h b/Extras/BulletMultiThreaded/PlatformDefinitions.h index 1147c00d9..9e7a13ce3 100644 --- a/Extras/BulletMultiThreaded/PlatformDefinitions.h +++ b/Extras/BulletMultiThreaded/PlatformDefinitions.h @@ -12,6 +12,8 @@ typedef union void *p; } addr64; +#define USE_WIN32_THREADING 1 + #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300) #else #endif //__MINGW32__ @@ -26,7 +28,7 @@ typedef union #include //memcpy - #define USE_WIN32_THREADING 1 + #include #define spu_printf printf diff --git a/Extras/BulletMultiThreaded/Win32ThreadSupport.cpp b/Extras/BulletMultiThreaded/Win32ThreadSupport.cpp index 842f3d6c9..c89e32433 100644 --- a/Extras/BulletMultiThreaded/Win32ThreadSupport.cpp +++ b/Extras/BulletMultiThreaded/Win32ThreadSupport.cpp @@ -17,17 +17,20 @@ subject to the following restrictions: #ifdef USE_WIN32_THREADING +#include + #include "SpuCollisionTaskProcess.h" + #include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h" -#include + ///The number of threads should be equal to the number of available cores ///Todo: each worker should be linked to a single core, using SetThreadIdealProcessor. ///Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication ///Setup and initialize SPU/CELL/Libspe2 -Win32ThreadSupport::Win32ThreadSupport(Win32ThreadConstructionInfo& threadConstructionInfo) +Win32ThreadSupport::Win32ThreadSupport(const Win32ThreadConstructionInfo & threadConstructionInfo) { startThreads(threadConstructionInfo); } @@ -173,7 +176,7 @@ void Win32ThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned in -void Win32ThreadSupport::startThreads(Win32ThreadConstructionInfo& threadConstructionInfo) +void Win32ThreadSupport::startThreads(const Win32ThreadConstructionInfo& threadConstructionInfo) { m_activeSpuStatus.resize(threadConstructionInfo.m_numThreads); diff --git a/Extras/BulletMultiThreaded/Win32ThreadSupport.h b/Extras/BulletMultiThreaded/Win32ThreadSupport.h index dadf645dd..b82d94868 100644 --- a/Extras/BulletMultiThreaded/Win32ThreadSupport.h +++ b/Extras/BulletMultiThreaded/Win32ThreadSupport.h @@ -67,8 +67,6 @@ private: public: ///Setup and initialize SPU/CELL/Libspe2 - - struct Win32ThreadConstructionInfo { Win32ThreadConstructionInfo(char* uniqueName, @@ -94,12 +92,14 @@ public: }; - Win32ThreadSupport(Win32ThreadConstructionInfo& threadConstructionInfo); + + + Win32ThreadSupport(const Win32ThreadConstructionInfo& threadConstructionInfo); ///cleanup/shutdown Libspe2 virtual ~Win32ThreadSupport(); - void startThreads(Win32ThreadConstructionInfo& threadInfo); + void startThreads(const Win32ThreadConstructionInfo& threadInfo); ///send messages to SPUs diff --git a/Extras/COLLADA_DOM/src/dae/daeMetaElement.cpp b/Extras/COLLADA_DOM/src/dae/daeMetaElement.cpp index 26e765e30..d88d62992 100644 --- a/Extras/COLLADA_DOM/src/dae/daeMetaElement.cpp +++ b/Extras/COLLADA_DOM/src/dae/daeMetaElement.cpp @@ -225,7 +225,7 @@ void daeMetaElement::validate() { if (_createFunc == NULL) - _createFunc = DAECreateElement; + _createFunc = (daeElementConstructFunctionPtr) DAECreateElement; if (_elementSize == 0) { daeInt place=0; diff --git a/Extras/LibXML/xmlmodule.c b/Extras/LibXML/xmlmodule.c index 15bcf077c..f46531bfd 100644 --- a/Extras/LibXML/xmlmodule.c +++ b/Extras/LibXML/xmlmodule.c @@ -190,6 +190,7 @@ xmlModuleFree(xmlModulePtr module) return (0); } +#if 0 #ifdef HAVE_DLOPEN #ifdef HAVE_DLFCN_H #include @@ -287,6 +288,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) #endif /* HAVE_SHLLOAD */ #endif /* ! HAVE_DLOPEN */ +#endif //0 #ifdef _WIN32 diff --git a/Glut/GL/glut.h b/Glut/GL/glut.h index 1c821d74d..188ccb0ab 100644 --- a/Glut/GL/glut.h +++ b/Glut/GL/glut.h @@ -40,7 +40,10 @@ # endif /* XXX This is from Win32's */ # ifndef _WCHAR_T_DEFINED -typedef unsigned short wchar_t; +/* MinGW32 chokes on the next line */ +#ifndef __MINGW32__ +typedef unsigned short int wchar_t; +#endif //__MINGW32__ # define _WCHAR_T_DEFINED # endif # endif