diff options
Diffstat (limited to 'src/stdlib/bsearch.c')
| -rw-r--r-- | src/stdlib/bsearch.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/stdlib/bsearch.c b/src/stdlib/bsearch.c index 39bf7694..a7531672 100644 --- a/src/stdlib/bsearch.c +++ b/src/stdlib/bsearch.c @@ -1,6 +1,5 @@ -#if 0 - #include <stdlib.h> +#include "_stdlib.h" /** binary search **/ @@ -12,6 +11,8 @@ void * bsearch(const void * key, const void * base, size_t nmemb, size_t size, i unsigned int trip = 1; const char *addr = base; + SIGNAL_SAFE(0); + while (ret == NULL) { int comp = compar(key, addr + (i * size)); if (comp == 0) { @@ -44,6 +45,3 @@ RETURN_FAILURE(CONSTANT(NULL)) RETURN_SUCCESS(a pointer to the matching element) STDC(1) */ - - -#endif |
