X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libhashkit%2Ffnv_64.cc;h=68e4dd07ef564084cf87b47a1994b7da41d428e2;hb=2eb14a59f3626073017de925929dcc7e3e9eb43d;hp=0cfce633047991a83047b529eece2a86281f06af;hpb=1170b1b371ce7bdb50e8e7ae887687f5a45f81b9;p=awesomized%2Flibmemcached diff --git a/libhashkit/fnv_64.cc b/libhashkit/fnv_64.cc index 0cfce633..68e4dd07 100644 --- a/libhashkit/fnv_64.cc +++ b/libhashkit/fnv_64.cc @@ -2,7 +2,7 @@ * * HashKit library * - * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ * Copyright (C) 2009 Brian Aker All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,6 +38,8 @@ #include +#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) + /* FNV hash'es lifted from Dustin Sallings work */ static uint64_t FNV_64_INIT= 0xcbf29ce484222325; static uint64_t FNV_64_PRIME= 0x100000001b3; @@ -69,3 +71,15 @@ uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *) return hash; } + +#else +uint32_t hashkit_fnv1_64(const char *, size_t, void *) +{ + return 0; +} + +uint32_t hashkit_fnv1a_64(const char *, size_t, void *) +{ + return 0; +} +#endif