|
@@ -23,9 +23,6 @@
|
|
|
|
|
|
#include <search.h>
|
|
|
|
|
|
-libc_hidden_proto(hcreate_r)
|
|
|
-libc_hidden_proto(hdestroy_r)
|
|
|
-libc_hidden_proto(hsearch_r)
|
|
|
|
|
|
|
|
|
[Knuth] The Art of Computer Programming, part 3 (6.4) */
|
|
@@ -67,6 +64,7 @@ static int isprime (unsigned int number)
|
|
|
indexing as explained in the comment for the hsearch function.
|
|
|
The contents of the table is zeroed, especially the field used
|
|
|
becomes zero. */
|
|
|
+libc_hidden_proto(hcreate_r)
|
|
|
int hcreate_r (size_t nel, struct hsearch_data *htab)
|
|
|
{
|
|
|
|
|
@@ -102,6 +100,7 @@ libc_hidden_def(hcreate_r)
|
|
|
#ifdef L_hdestroy_r
|
|
|
|
|
|
be freed and the local static variable can be marked as not used. */
|
|
|
+libc_hidden_proto(hdestroy_r)
|
|
|
void hdestroy_r (struct hsearch_data *htab)
|
|
|
{
|
|
|
|
|
@@ -139,6 +138,7 @@ libc_hidden_def(hdestroy_r)
|
|
|
libc_hidden_proto(strcmp)
|
|
|
libc_hidden_proto(strlen)
|
|
|
|
|
|
+libc_hidden_proto(hsearch_r)
|
|
|
int hsearch_r (ENTRY item, ACTION action, ENTRY **retval,
|
|
|
struct hsearch_data *htab)
|
|
|
{
|
|
@@ -208,7 +208,7 @@ int hsearch_r (ENTRY item, ACTION action, ENTRY **retval,
|
|
|
{
|
|
|
|
|
|
with error. */
|
|
|
- if (action == ENTER && htab->filled == htab->size)
|
|
|
+ if (htab->filled == htab->size)
|
|
|
{
|
|
|
__set_errno (ENOMEM);
|
|
|
*retval = NULL;
|