Skip to content

Commit

Permalink
apply another osx patch
Browse files Browse the repository at this point in the history
  • Loading branch information
opencollada-sebastian committed Jul 28, 2010
1 parent 82a603a commit dd0a869
Show file tree
Hide file tree
Showing 6 changed files with 582 additions and 7 deletions.
29 changes: 27 additions & 2 deletions COLLADABaseUtils/include/COLLADABUPrerequisites.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
#include <string> #include <string>
#include <string.h> #include <string.h>


#include "COLLADABUPlatform.h"


namespace COLLADABU namespace COLLADABU
{ {
typedef std::string String; typedef std::string String;
typedef std::wstring WideString; typedef std::wstring WideString;
} }



#define COLLADABU_HAVE_TR1_UNORDERED_MAP #define COLLADABU_HAVE_TR1_UNORDERED_MAP
#ifndef WIN32 #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 #undef COLLADABU_HAVE_TR1_UNORDERED_MAP
#else #else
#include <tr1/unordered_map> #include <tr1/unordered_map>
Expand Down Expand Up @@ -71,4 +71,29 @@ namespace COLLADABU
# endif # endif
#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__ #endif //__COLLADABU_PREREQUISITES_H__
1 change: 0 additions & 1 deletion COLLADABaseUtils/src/Math/COLLADABUMathQuaternion.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ namespace COLLADABU
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
Vector3 Quaternion::xAxis( void ) const Vector3 Quaternion::xAxis( void ) const
{ {
Real fTx = 2.0 * x;
Real fTy = 2.0 * y; Real fTy = 2.0 * y;
Real fTz = 2.0 * z; Real fTz = 2.0 * z;
Real fTwy = fTy * w; Real fTwy = fTy * w;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2233,7 +2233,8 @@
GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5; GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = include/COLLADASaxFWLStableHeaders.h;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
OSMac_, OSMac_,
REQUIRE_IOSTREAM, REQUIRE_IOSTREAM,
Expand Down Expand Up @@ -2263,7 +2264,8 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
GCC_MODEL_TUNING = G5; GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = include/COLLADASaxFWLStableHeaders.h;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
OSMac_, OSMac_,
REQUIRE_IOSTREAM, REQUIRE_IOSTREAM,
Expand Down Expand Up @@ -2292,6 +2294,8 @@
ARCHS = "$(NATIVE_ARCH_ACTUAL)"; ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_C_LANGUAGE_STANDARD = c99; GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
Expand All @@ -2306,6 +2310,8 @@
buildSettings = { buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)"; ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_C_LANGUAGE_STANDARD = c99; GCC_C_LANGUAGE_STANDARD = c99;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO; PREBINDING = NO;
Expand Down
Loading

0 comments on commit dd0a869

Please sign in to comment.