[tbb-commits] [tor-browser/tor-browser-60.0.1esr-8.0-1] Bug 1448483 - Remove reference and use of ssize_t in CityHash to avoid conflicting definitions in MinGW x64. r=froydnj, a=jcristau

gk at torproject.org gk at torproject.org
Thu Jun 14 12:19:10 UTC 2018


commit 9b6eeae6e3a2aa909de97617d93c9dbf3d02ceca
Author: Tom Ritter <tom at mozilla.com>
Date:   Fri Mar 23 16:27:49 2018 -0500

    Bug 1448483 - Remove reference and use of ssize_t in CityHash to avoid conflicting definitions in MinGW x64. r=froydnj, a=jcristau
    
    MozReview-Commit-ID: ErQGSPNk4Bg
    
    --HG--
    extra : rebase_source : 36015874d1abb0699e952d514e85d7a7b84c63b5
    extra : source : 149a759643fbf35d45d4ffbc86706db8ba2d4ffd
---
 other-licenses/nsis/Contrib/CityHash/CityHash.h        | 4 ----
 other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp | 4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/other-licenses/nsis/Contrib/CityHash/CityHash.h b/other-licenses/nsis/Contrib/CityHash/CityHash.h
old mode 100644
new mode 100755
index d74f30feb64a..4daa91d29498
--- a/other-licenses/nsis/Contrib/CityHash/CityHash.h
+++ b/other-licenses/nsis/Contrib/CityHash/CityHash.h
@@ -29,7 +29,3 @@
 #else
 #define CITYHASH_API __declspec(dllimport)
 #endif
-
-#ifndef ssize_t
-typedef int ssize_t;
-#endif
diff --git a/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp b/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
old mode 100644
new mode 100755
index 8ac4b5234914..b155241f6a28
--- a/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
+++ b/other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
@@ -202,13 +202,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 ssize_t.  Based on City and Murmur.
+// of any length representable in an int.  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;
-  ssize_t l = len - 16;
+  int l = len - 16;
   if (l <= 0) {  // len <= 16
     c = b * k1 + HashLen0to16(s, len);
     d = Rotate(a + (len >= 8 ? UNALIGNED_LOAD64(s) : c), 32);





More information about the tbb-commits mailing list