From e243cc91579f8df5e51518a5cfae75cc995d39ec Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Mon, 23 Nov 2009 21:34:40 -0200 Subject: Fix location of tr1's hash functions and namespace on msvc. Reviewed by Luciano Wolf --- ext/sparsehash/google/sparsehash/sparseconfig.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'ext/sparsehash/google') diff --git a/ext/sparsehash/google/sparsehash/sparseconfig.h b/ext/sparsehash/google/sparsehash/sparseconfig.h index 29e0bf867..d86a2bb7a 100644 --- a/ext/sparsehash/google/sparsehash/sparseconfig.h +++ b/ext/sparsehash/google/sparsehash/sparseconfig.h @@ -6,18 +6,25 @@ /* Namespace for Google classes */ #define GOOGLE_NAMESPACE ::google -/* the location of the header defining hash functions */ -#define HASH_FUN_H - -/* the namespace of the hash<> function */ -#define HASH_NAMESPACE std::tr1 +#ifdef _WIN32 + /* the location of the header defining hash functions */ + #define HASH_FUN_H + /* the namespace of the hash<> function */ + #define HASH_NAMESPACE stdext + /* The system-provided hash function including the namespace. */ + #define SPARSEHASH_HASH HASH_NAMESPACE::hash_compare +#else + /* the location of the header defining hash functions */ + #define HASH_FUN_H + /* the namespace of the hash<> function */ + #define HASH_NAMESPACE std::tr1 + /* The system-provided hash function including the namespace. */ + #define SPARSEHASH_HASH HASH_NAMESPACE::hash +#endif /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 -/* The system-provided hash function including the namespace. */ -#define SPARSEHASH_HASH HASH_NAMESPACE::hash - /* the namespace where STL code like vector<> is defined */ #define STL_NAMESPACE std -- cgit v1.2.3