#1 Problems building on Mac OS X 10.3

open
nobody
None
5
2003-12-22
2003-12-22
No

I was building OpenThreads via a dependancy of
OpenSceneGraph and ran across a minor issue when building
on OS X 10.3. Attached are the changes I made, I'll leave it
into you guy's more capable hands to figure out how to
cleanly and more appropriately merge it in with all your
supported architectures. Below are unified format diffs for
your entertainment.

First problem was with OpenThreads, typedef for timespec
conflicted with the system (so I used the define in
pthread.h):

--- PThreadCondition.c++~ Thu Oct 2 10:56:31 2003
+++ PThreadCondition.c++ Mon Dec 22 15:13:48 2003
@@ -27,6 +27,8 @@
# include <sys/time.h>
#endif

+#include <pthread.h>
#include <assert.h>
#include <OpenThreads/Condition>
#include "PThreadConditionPrivateData.h"
@@ -34,8 +36,8 @@

using namespace OpenThreads;

-#ifdef __APPLE__
+#if 0
typedef ::timespec OpenThreads::timespec;
#endif

#if defined(_MSC_VER) || defined(__MINGW32__)

<<< END

That's it. The timespec typedef was interfering with another
definition elsewhere (and they didn't match) -- including the
definition from pthread.h, and all was better.

Cheers!

Discussion


Log in to post a comment.