diff options
Diffstat (limited to 'wince/missing')
-rw-r--r-- | wince/missing/missing.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/wince/missing/missing.cpp b/wince/missing/missing.cpp index d139584f54..5adabda22a 100644 --- a/wince/missing/missing.cpp +++ b/wince/missing/missing.cpp @@ -366,3 +366,12 @@ char* getenv(char* name) return ""; } +void *bsearch(const void *key, const void *base, size_t nmemb, + size_t size, int (*compar)(const void *, const void *)) { + size_t i; + + for (i=0; i<nmemb; i++) + if (compar(key, (void*)((size_t)base + size * i)) == 0) + return (void*)((size_t)base + size * i); + return NULL; +} |