Commit 5fce0724 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Don't forward bsearch to ntdll.

parent 3868bf06
......@@ -151,6 +151,20 @@ void* CDECL MSVCRT_bsearch_s(const void *key, const void *base,
return NULL;
}
static int CDECL compare_wrapper(void *ctx, const void *e1, const void *e2)
{
int (__cdecl *compare)(const void *, const void *) = ctx;
return compare(e1, e2);
}
/*********************************************************************
* bsearch (msvcrt.@)
*/
void* CDECL MSVCRT_bsearch(const void *key, const void *base, MSVCRT_size_t nmemb,
MSVCRT_size_t size, int (__cdecl *compar)(const void *, const void *))
{
return MSVCRT_bsearch_s(key, base, nmemb, size, compare_wrapper, compar);
}
/*********************************************************************
* _chkesp (MSVCRT.@)
*
......
......@@ -1257,7 +1257,7 @@
@ cdecl atof(str) MSVCRT_atof
@ cdecl atoi(str) MSVCRT_atoi
@ cdecl atol(str) ntdll.atol
@ cdecl bsearch(ptr ptr long long ptr) ntdll.bsearch
@ cdecl bsearch(ptr ptr long long ptr) MSVCRT_bsearch
@ cdecl bsearch_s(ptr ptr long long ptr ptr) MSVCRT_bsearch_s
@ cdecl btowc(long) MSVCRT_btowc
@ cdecl calloc(long long) MSVCRT_calloc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment