Skip to content

Commit

Permalink
Linux compile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jushar committed Aug 1, 2016
1 parent 2423115 commit fc21b71
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Shared/sdk/SharedUtil.HashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,24 @@ struct std::hash<SString>
}
};

#if defined(WIN32)
inline size_t hash_value ( const SString& strString ) // Required for sparsehash
{
std::hash<std::string> hashFunction;
return hashFunction ( strString );
}
#elif defined(__GNUC__) && (__GNUC__ >= 3)
namespace __gnu_cxx
{
template<>
struct hash < SString >
{
size_t operator () ( const SString& strString ) const
{
return __stl_hash_string ( strString );
}
};
}
#endif

#endif // WITH_ALLOC_TRACKING
132 changes: 132 additions & 0 deletions vendor/sparsehash/current/src/google/sparsehash/sparseconfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */

/* Namespace for Google classes */
#define GOOGLE_NAMESPACE ::google

/* the location of <hash_fun.h>/<stl_hash_fun.h> */
#define HASH_FUN_H <hash_fun.h>

/* the location of <hash_map> */
#define HASH_MAP_H <ext/hash_map>

/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE __gnu_cxx

/* the location of <hash_set> */
#define HASH_SET_H <ext/hash_set>

/* Define to 1 if you have the <google/malloc_extension.h> header file. */
/* #undef HAVE_GOOGLE_MALLOC_EXTENSION_H */

/* define if the compiler has hash_map */
#define HAVE_HASH_MAP 1

/* define if the compiler has hash_set */
#define HAVE_HASH_SET 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1

/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1

/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* define if the compiler implements namespaces */
#define HAVE_NAMESPACES 1

/* Define if you have POSIX threads libraries and header files. */
/* #undef HAVE_PTHREAD */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <sys/utsname.h> header file. */
#define HAVE_SYS_UTSNAME_H 1

/* Define to 1 if the system has the type `uint16_t'. */
#define HAVE_UINT16_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if the system has the type `u_int16_t'. */
#define HAVE_U_INT16_T 1

/* Define to 1 if the system has the type `__uint16'. */
/* #undef HAVE___UINT16 */

/* Name of package */
#define PACKAGE "sparsehash"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "opensource@google.com"

/* Define to the full name of this package. */
#define PACKAGE_NAME "sparsehash"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "sparsehash 1.4"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "sparsehash"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.4"

/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef PTHREAD_CREATE_JOINABLE */

/* The system-provided hash function including the namespace. */
#define SPARSEHASH_HASH HASH_NAMESPACE::hash

/* The system-provided hash function, in namespace HASH_NAMESPACE. */
#define SPARSEHASH_HASH_NO_NAMESPACE hash

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std

/* Version number of package */
#define VERSION "1.4"

/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }

/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {

0 comments on commit fc21b71

Please sign in to comment.