Permalink
Browse files

apply another osx patch

  • Loading branch information...
opencollada-sebastian committed Jul 28, 2010
1 parent 82a603a commit dd0a86959cf5d214ffb9fb89afb50a13bc3ac04a
@@ -16,17 +16,17 @@
#include <string>
#include <string.h>
+#include "COLLADABUPlatform.h"
namespace COLLADABU
{
typedef std::string String;
typedef std::wstring WideString;
}
-
#define COLLADABU_HAVE_TR1_UNORDERED_MAP
#ifndef WIN32
-#if __GNUC__ < 4 || (__GNUC__ == 4 && ( !defined( COLLADABU_OS_MAC ) && __GNUC_MINOR__ < 3) )
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
#undef COLLADABU_HAVE_TR1_UNORDERED_MAP
#else
#include <tr1/unordered_map>
@@ -71,4 +71,29 @@ namespace COLLADABU
# endif
#endif
+#ifndef COLLADABU_HAVE_TR1_UNORDERED_MAP
+ namespace __gnu_cxx {
+
+ template <>
+ struct hash<std::string>
+ {
+ size_t operator() (const std::string& x) const
+ {
+ return hash<const char*>()(x.c_str());
+ }
+ };
+
+ template < class _TYPE_ >
+ struct hash< _TYPE_ *>
+ {
+ typedef _TYPE_* TYPE_PTR;
+
+ size_t operator() ( TYPE_PTR x) const
+ {
+ return hash<intptr_t>()((intptr_t)x);
+ }
+ };
+ }
+#endif
+
#endif //__COLLADABU_PREREQUISITES_H__
@@ -202,7 +202,6 @@ namespace COLLADABU
//-----------------------------------------------------------------------
Vector3 Quaternion::xAxis( void ) const
{
- Real fTx = 2.0 * x;
Real fTy = 2.0 * y;
Real fTz = 2.0 * z;
Real fTwy = fTy * w;
@@ -2233,7 +2233,8 @@
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = include/COLLADASaxFWLStableHeaders.h;
GCC_PREPROCESSOR_DEFINITIONS = (
OSMac_,
REQUIRE_IOSTREAM,
@@ -2263,7 +2264,8 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "";
GCC_MODEL_TUNING = G5;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = include/COLLADASaxFWLStableHeaders.h;
GCC_PREPROCESSOR_DEFINITIONS = (
OSMac_,
REQUIRE_IOSTREAM,
@@ -2292,6 +2294,8 @@
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -2306,6 +2310,8 @@
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_PRECOMPILE_PREFIX_HEADER = NO;
+ GCC_PREFIX_HEADER = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
Oops, something went wrong.

0 comments on commit dd0a869

Please sign in to comment.