Finish porting hammer's library to windows
We port registry by importing the (public domain) openbsd implementation of the tfind/tsearch POSIX binary tree search functions. These are only necessary when building on non-posix platforms
This commit is contained in:
parent
206f5044a8
commit
9a7752b9a6
5 changed files with 192 additions and 2 deletions
15
src/search.h
Normal file
15
src/search.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#if defined(_MSC_VER)
|
||||
/* find or insert datum into search tree */
|
||||
void *tsearch(const void *vkey, void **vrootp,
|
||||
int (*compar)(const void *, const void *));
|
||||
|
||||
/* delete node with given key */
|
||||
void * tdelete(const void *vkey, void **vrootp,
|
||||
int (*compar)(const void *, const void *));
|
||||
|
||||
/* Walk the nodes of a tree */
|
||||
void twalk(const void *vroot, void (*action)(const void *, VISIT, int));
|
||||
|
||||
#else
|
||||
#include <search.h>
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue