diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-07-24 10:44:53 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-07-24 10:44:53 +0000 |
commit | 405550bf78acc8ce8885e4b30986035533d08267 (patch) | |
tree | 3da05c874d6fc47194f7bf47d1ad3a117e314406 /locale/hashval.h | |
parent | e155c80135043ce7582a5cb8623142c8ca14cbe5 (diff) | |
download | glibc-405550bf78acc8ce8885e4b30986035533d08267.zip glibc-405550bf78acc8ce8885e4b30986035533d08267.tar.gz glibc-405550bf78acc8ce8885e4b30986035533d08267.tar.bz2 |
Update.
2002-07-24 Ulrich Drepper <drepper@redhat.com>
* locale/hashval.h: Make more self-containedby defining LONG_BITS.
* locale/programs/simple-hash.c: Remove LONG_BITS definition.
* locale/programs/locarchive.c (add_locale_to_archive): Correct
test to detect duplicate locales.
* libio/fileops.c (_IO_new_file_seekoff): Fail if relative
position would be before beginning of file.
(_IO_file_seekoff_mmap): Likewise.
* libio/Makefile (tests): Add bug-fseek.
* libio/bug-fseek.c: New file.
* intl/explodename.c: Remove support for CEN-style locale variables.
It was never used and shouldn't be since it's not portable.
* intl/finddomain.c: Likewise.
* intl/l10nflist.c: Likewise.
* intl/loadinfo.h: Likewise.
* locale/findlocale.c: Likewise.
Diffstat (limited to 'locale/hashval.h')
-rw-r--r-- | locale/hashval.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/locale/hashval.h b/locale/hashval.h index 15ec124..e35957d 100644 --- a/locale/hashval.h +++ b/locale/hashval.h @@ -18,7 +18,13 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -unsigned long +#ifndef LONGBITS +# define LONGBITS (sizeof (long int) * BITSPERBYTE) +#endif + +unsigned long int compute_hashval (const void *key, size_t keylen); + +unsigned long int compute_hashval (key, keylen) const void *key; size_t keylen; @@ -37,5 +43,5 @@ compute_hashval (key, keylen) hval = (hval << 9) | (hval >> (LONGBITS - 9)); hval += (unsigned long int) *(((char *) key) + cnt++); } - return hval != 0 ? hval : ~((unsigned long) 0); + return hval != 0 ? hval : ~((unsigned long int) 0); } |