From 77ad8a477e48c77f97e0335e9457f24f42fdedaa Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Mon, 22 Aug 2016 10:40:58 -0700 Subject: [PATCH] include/msvcrt: Include calling convention with function pointers. Signed-off-by: Daniel Lehman Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- include/msvcrt/search.h | 14 ++++++++------ include/msvcrt/stdlib.h | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/msvcrt/search.h b/include/msvcrt/search.h index 16a0850eaf6..458d860127e 100644 --- a/include/msvcrt/search.h +++ b/include/msvcrt/search.h @@ -26,17 +26,19 @@ extern "C" { #endif -void* __cdecl _lfind(const void*,const void*,unsigned int*,unsigned int,int (*)(const void*,const void*)); -void* __cdecl _lsearch(const void*,void*,unsigned int*,unsigned int,int (*)(const void*,const void*)); -void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*)); -void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*)); +void* __cdecl _lfind(const void*,const void*,unsigned int*,unsigned int,int (__cdecl *)(const void*,const void*)); +void* __cdecl _lsearch(const void*,void*,unsigned int*,unsigned int,int (__cdecl *)(const void*,const void*)); +void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); +void __cdecl qsort(void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); #ifdef __cplusplus } #endif -static inline void* lfind(const void* match, const void* start, unsigned int* array_size, unsigned int elem_size, int (*cf)(const void*,const void*)) { return _lfind(match, start, array_size, elem_size, cf); } -static inline void* lsearch(const void* match, void* start, unsigned int* array_size, unsigned int elem_size, int (*cf)(const void*,const void*) ) { return _lsearch(match, start, array_size, elem_size, cf); } +static inline void* lfind(const void* match, const void* start, unsigned int* array_size, unsigned int elem_size, int (__cdecl *cf)(const void*,const void*)) + { return _lfind(match, start, array_size, elem_size, cf); } +static inline void* lsearch(const void* match, void* start, unsigned int* array_size, unsigned int elem_size, int (__cdecl *cf)(const void*,const void*) ) + { return _lsearch(match, start, array_size, elem_size, cf); } #endif /* __WINE_SEARCH_H */ diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 2db48c592ab..e8ca2fa04d2 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -188,7 +188,7 @@ void __cdecl _Exit(int); void __cdecl _exit(int); void __cdecl abort(void); int __cdecl abs(int); -int __cdecl atexit(void (*)(void)); +int __cdecl atexit(void (__cdecl *)(void)); double __cdecl atof(const char*); int __cdecl atoi(const char*); int __cdecl _atoi_l(const char*,_locale_t); @@ -226,8 +226,8 @@ __int64 __cdecl _strtoi64_l(const char*,char**,int,_locale_t); unsigned __int64 __cdecl _strtoui64(const char*,char**,int); unsigned __int64 __cdecl _strtoui64_l(const char*,char**,int,_locale_t); int __cdecl system(const char*); -void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (*)(const void*,const void*)); -void __cdecl qsort(void*,size_t,size_t,int (*)(const void*,const void*)); +void* __cdecl bsearch(const void*,const void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); +void __cdecl qsort(void*,size_t,size_t,int (__cdecl *)(const void*,const void*)); #ifndef _WSTDLIB_DEFINED #define _WSTDLIB_DEFINED