123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef _GNU_SOURCE
- #define _GNU_SOURCE
- #endif
- #include <search.h>
- libc_hidden_proto(hdestroy_r)
- libc_hidden_proto(hsearch_r)
- libc_hidden_proto(hcreate_r)
- static struct hsearch_data htab;
- ENTRY *hsearch (ENTRY item, ACTION action)
- {
- ENTRY *result;
- (void) hsearch_r (item, action, &result, &htab);
- return result;
- }
- int hcreate (size_t nel)
- {
- return hcreate_r (nel, &htab);
- }
- void hdestroy (void)
- {
- hdestroy_r (&htab);
- }
|