diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/hsearch.c | 6 | ||||
-rw-r--r-- | misc/hsearch_r.c | 15 |
2 files changed, 12 insertions, 9 deletions
diff --git a/misc/hsearch.c b/misc/hsearch.c index 510f170885..7a0b0dc406 100644 --- a/misc/hsearch.c +++ b/misc/hsearch.c @@ -30,7 +30,7 @@ hsearch (item, action) { ENTRY *result; - (void) hsearch_r (item, action, &result, &htab); + (void) __hsearch_r (item, action, &result, &htab); return result; } @@ -40,14 +40,14 @@ int hcreate (nel) size_t nel; { - return hcreate_r (nel, &htab); + return __hcreate_r (nel, &htab); } void __hdestroy (void) { - hdestroy_r (&htab); + __hdestroy_r (&htab); } weak_alias (__hdestroy, hdestroy) diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c index 3a7c52682c..9f55e845cf 100644 --- a/misc/hsearch_r.c +++ b/misc/hsearch_r.c @@ -62,7 +62,7 @@ isprime (unsigned int number) The contents of the table is zeroed, especially the field used becomes zero. */ int -hcreate_r (nel, htab) +__hcreate_r (nel, htab) size_t nel; struct hsearch_data *htab; { @@ -97,13 +97,14 @@ hcreate_r (nel, htab) /* everything went alright */ return 1; } -libc_hidden_def (hcreate_r) +libc_hidden_def (__hcreate_r) +weak_alias (__hcreate_r, hcreate_r) /* After using the hash table it has to be destroyed. The used memory can be freed and the local static variable can be marked as not used. */ void -hdestroy_r (htab) +__hdestroy_r (htab) struct hsearch_data *htab; { /* Test for correct arguments. */ @@ -119,7 +120,8 @@ hdestroy_r (htab) /* the sign for an existing table is an value != NULL in htable */ htab->table = NULL; } -libc_hidden_def (hdestroy_r) +libc_hidden_def (__hdestroy_r) +weak_alias (__hdestroy_r, hdestroy_r) /* This is the search function. It uses double hashing with open addressing. @@ -136,7 +138,7 @@ libc_hidden_def (hdestroy_r) equality of the stored and the parameter value. This helps to prevent unnecessary expensive calls of strcmp. */ int -hsearch_r (item, action, retval, htab) +__hsearch_r (item, action, retval, htab) ENTRY item; ACTION action; ENTRY **retval; @@ -224,4 +226,5 @@ hsearch_r (item, action, retval, htab) *retval = NULL; return 0; } -libc_hidden_def (hsearch_r) +libc_hidden_def (__hsearch_r) +weak_alias (__hsearch_r, hsearch_r) |