mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 20:49:43 +00:00
merge from gcc
This commit is contained in:
parent
e9e69f5a09
commit
8fc3479902
@ -1,3 +1,7 @@
|
||||
2001-08-16 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* hashtab.h (htab_hash_string): Declare.
|
||||
|
||||
2001-06-13 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* libiberty.h (lbasename): Change function declaration to return a
|
||||
|
@ -145,6 +145,9 @@ extern htab_hash htab_hash_pointer;
|
||||
/* An equality function for pointers. */
|
||||
extern htab_eq htab_eq_pointer;
|
||||
|
||||
/* A hash function for null-terminated strings. */
|
||||
extern hashval_t htab_hash_string PARAMS ((const PTR));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -1,3 +1,7 @@
|
||||
2001-08-16 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* hashtab.c (htab_hash_string): New.
|
||||
|
||||
2001-08-13 Andrew Cagney <ac131313@redhat.com>
|
||||
|
||||
* floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix
|
||||
|
@ -561,3 +561,19 @@ htab_collisions (htab)
|
||||
|
||||
return (double) htab->collisions / (double) htab->searches;
|
||||
}
|
||||
|
||||
/* Hash P as a null-terminated string. */
|
||||
|
||||
hashval_t
|
||||
htab_hash_string (p)
|
||||
const PTR p;
|
||||
{
|
||||
const unsigned char *str = (const unsigned char *) p;
|
||||
hashval_t r = 0;
|
||||
unsigned char c;
|
||||
|
||||
while ((c = *str++) != 0)
|
||||
r = r * 67 + c - 113;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user