Bug 1585356 - Back out changeset 149a759643fb reverting CityHash changes for mingw-gcc r=froydnj

The changes made to CityHash are no longer necessary with mingw-clang, so we
can revert them to the original upstream implementation.

Differential Revision: https://phabricator.services.mozilla.com/D56991

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Ritter 2019-12-12 21:50:20 +00:00
Родитель 7f4ece010f
Коммит aa7780103d
2 изменённых файлов: 6 добавлений и 2 удалений

4
other-licenses/nsis/Contrib/CityHash/CityHash.h Executable file → Normal file
Просмотреть файл

@ -29,3 +29,7 @@
#else
#define CITYHASH_API __declspec(dllimport)
#endif
#ifndef ssize_t
typedef int ssize_t;
#endif

Просмотреть файл

@ -217,13 +217,13 @@ uint64 CityHash64WithSeeds(const char *s, size_t len,
}
// A subroutine for CityHash128(). Returns a decent 128-bit hash for strings
// of any length representable in an int. Based on City and Murmur.
// of any length representable in ssize_t. Based on City and Murmur.
static uint128 CityMurmur(const char *s, size_t len, uint128 seed) {
uint64 a = Uint128Low64(seed);
uint64 b = Uint128High64(seed);
uint64 c = 0;
uint64 d = 0;
int l = len - 16;
ssize_t l = len - 16;
if (l <= 0) { // len <= 16
c = b * k1 + HashLen0to16(s, len);
d = Rotate(a + (len >= 8 ? UNALIGNED_LOAD64(s) : c), 32);