mirror of git://sourceware.org/git/glibc.git
Make locale archive hash function architecture-independent.
This commit is contained in:
parent
5057e7ce82
commit
a3a6c3129f
|
@ -1,3 +1,8 @@
|
||||||
|
2013-09-23 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* locale/hashval.h (compute_hashval): Interpret bytes of key as
|
||||||
|
unsigned char.
|
||||||
|
|
||||||
2013-09-23 Maciej W. Rozycki <macro@codesourcery.com>
|
2013-09-23 Maciej W. Rozycki <macro@codesourcery.com>
|
||||||
|
|
||||||
* manual/threads.texi (POSIX Threads): Fix a typo.
|
* manual/threads.texi (POSIX Threads): Fix a typo.
|
||||||
|
|
|
@ -37,7 +37,7 @@ compute_hashval (const void *key, size_t keylen)
|
||||||
while (cnt < keylen)
|
while (cnt < keylen)
|
||||||
{
|
{
|
||||||
hval = (hval << 9) | (hval >> (sizeof hval * CHAR_BIT - 9));
|
hval = (hval << 9) | (hval >> (sizeof hval * CHAR_BIT - 9));
|
||||||
hval += (hashval_t) *(((char *) key) + cnt++);
|
hval += (hashval_t) ((const unsigned char *) key)[cnt++];
|
||||||
}
|
}
|
||||||
return hval != 0 ? hval : ~((hashval_t) 0);
|
return hval != 0 ? hval : ~((hashval_t) 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue