hash_bytes.cc: Compile load_bytes and shift_mix only when __SIZEOF_SIZE_T__ == 8.

2010-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash_bytes.cc: Compile load_bytes and shift_mix only when
	__SIZEOF_SIZE_T__ == 8.

From-SVN: r164410
This commit is contained in:
Paolo Carlini 2010-09-19 08:52:50 +00:00 committed by Paolo Carlini
parent 1f77459495
commit 61e60481d0
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-09-19 Paolo Carlini <paolo.carlini@oracle.com>
* src/hash_bytes.cc: Compile load_bytes and shift_mix only when
__SIZEOF_SIZE_T__ == 8.
2010-09-17 Luc Hermitte <hermitte@free.fr>
Paolo Carlini <paolo.carlini@oracle.com>

View File

@ -45,6 +45,7 @@ namespace
return result;
}
#if __SIZEOF_SIZE_T__ == 8
// Loads n bytes, where 1 <= n < 8.
inline std::size_t
load_bytes(const char* p, int n)
@ -60,6 +61,7 @@ namespace
inline std::size_t
shift_mix(std::size_t v)
{ return v ^ (v >> 47);}
#endif
}
namespace std