-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
options/glibc: Implement hcreate_r/hdestroy_r/hsearch_r
- Loading branch information
Showing
4 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <bits/glibc/glibc_search.h> | ||
#include <mlibc/search.hpp> | ||
|
||
int hcreate_r(size_t num_entries, hsearch_data *htab) { | ||
return mlibc::hcreate_r(num_entries, htab); | ||
} | ||
|
||
void hdestroy_r(hsearch_data *htab) { | ||
mlibc::hdestroy_r(htab); | ||
} | ||
|
||
int hsearch_r(ENTRY item, ACTION action, ENTRY **ret, hsearch_data *htab) { | ||
return mlibc::hsearch_r(item, action, ret, htab); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef _GLIBC_SEARCH_H | ||
#define _GLIBC_SEARCH_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <bits/search.h> | ||
|
||
#ifndef __MLIBC_ABI_ONLY | ||
|
||
int hcreate_r(size_t num_entries, struct hsearch_data *htab); | ||
void hdestroy_r(struct hsearch_data *htab); | ||
int hsearch_r(ENTRY item, ACTION action, ENTRY **ret, struct hsearch_data *htab); | ||
|
||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* _GLIBC_SEARCH_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters