Commit 7e082f66 authored by Alexandre Julliard's avatar Alexandre Julliard

msvcrt/tests: Make all msvcrt function pointers cdecl.

parent ac760a47
......@@ -55,10 +55,10 @@ typedef struct __type_info
/* Function pointers. We need to use these to call these funcs as __thiscall */
static HMODULE hMsvcrt;
static void* (*poperator_new)(unsigned int);
static void (*poperator_delete)(void*);
static void* (*pmalloc)(unsigned int);
static void (*pfree)(void*);
static void* (__cdecl *poperator_new)(unsigned int);
static void (__cdecl *poperator_delete)(void*);
static void* (__cdecl *pmalloc)(unsigned int);
static void (__cdecl *pfree)(void*);
/* exception */
static void (WINAPI *pexception_ctor)(exception*,LPCSTR*);
......@@ -113,12 +113,12 @@ static int (WINAPI *ptype_info_opequals_equals)(type_info*,type_info*);
static int (WINAPI *ptype_info_opnot_equals)(type_info*,type_info*);
/* RTTI */
static type_info* (*p__RTtypeid)(void*);
static void* (*p__RTCastToVoid)(void*);
static void* (*p__RTDynamicCast)(void*,int,void*,void*,int);
static type_info* (__cdecl *p__RTtypeid)(void*);
static void* (__cdecl *p__RTCastToVoid)(void*);
static void* (__cdecl *p__RTDynamicCast)(void*,int,void*,void*,int);
/*Demangle*/
static char* (*p__unDName)(char*,const char*,int,void*,void*,unsigned short int);
static char* (__cdecl *p__unDName)(char*,const char*,int,void*,void*,unsigned short int);
/* _very_ early native versions have serious RTTI bugs, so we check */
......
......@@ -31,12 +31,12 @@
#include <process.h>
#include <errno.h>
typedef void (*_INITTERMFUN)(void);
static void (*p_initterm)(_INITTERMFUN *start, _INITTERMFUN *end);
typedef void (__cdecl *_INITTERMFUN)(void);
static void (__cdecl *p_initterm)(_INITTERMFUN *start, _INITTERMFUN *end);
static int callbacked;
static void initcallback(void)
static void __cdecl initcallback(void)
{
callbacked++;
}
......
......@@ -23,11 +23,11 @@
#include <errno.h>
#include "wine/test.h"
static void (*p_aligned_free)(void*) = NULL;
static void * (*p_aligned_malloc)(size_t,size_t) = NULL;
static void * (*p_aligned_offset_malloc)(size_t,size_t,size_t) = NULL;
static void * (*p_aligned_realloc)(void*,size_t,size_t) = NULL;
static void * (*p_aligned_offset_realloc)(void*,size_t,size_t,size_t) = NULL;
static void (__cdecl *p_aligned_free)(void*) = NULL;
static void * (__cdecl *p_aligned_malloc)(size_t,size_t) = NULL;
static void * (__cdecl *p_aligned_offset_malloc)(size_t,size_t,size_t) = NULL;
static void * (__cdecl *p_aligned_realloc)(void*,size_t,size_t) = NULL;
static void * (__cdecl *p_aligned_offset_realloc)(void*,size_t,size_t,size_t) = NULL;
static void test_aligned_malloc(unsigned int size, unsigned int alignment)
{
......
......@@ -782,7 +782,7 @@ static void test_xcvt(void)
}
}
static int _vsnwprintf_wrapper(wchar_t *str, size_t len, const wchar_t *format, ...)
static int __cdecl _vsnwprintf_wrapper(wchar_t *str, size_t len, const wchar_t *format, ...)
{
int ret;
__ms_va_list valist;
......@@ -810,8 +810,8 @@ static void test_vsnwprintf(void)
ok( !strcmp(buf, "onetwothree"), "got %s expected 'onetwothree'\n", buf );
}
static int (*p__vscprintf)(const char *format, __ms_va_list valist);
static int (*p__vscwprintf)(const wchar_t *format, __ms_va_list valist);
static int (__cdecl *p__vscprintf)(const char *format, __ms_va_list valist);
static int (__cdecl *p__vscwprintf)(const wchar_t *format, __ms_va_list valist);
static int __cdecl _vscprintf_wrapper(const char *format, ...)
{
......
......@@ -45,12 +45,12 @@ static char *buf_to_string(const unsigned char *bin, int len, int nr)
#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); }
#define expect_bin(buf, value, len) { ok(memcmp((buf), value, len) == 0, "Binary buffer mismatch - expected %s, got %s\n", buf_to_string((unsigned char *)value, len, 1), buf_to_string((buf), len, 0)); }
static void* (*pmemcpy)(void *, const void *, size_t n);
static int* (*pmemcmp)(void *, const void *, size_t n);
static int (*pstrcpy_s)(char *dst, size_t len, const char *src);
static int (*pstrcat_s)(char *dst, size_t len, const char *src);
static int (*p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count);
static int (*p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc);
static void* (__cdecl *pmemcpy)(void *, const void *, size_t n);
static int* (__cdecl *pmemcmp)(void *, const void *, size_t n);
static int (__cdecl *pstrcpy_s)(char *dst, size_t len, const char *src);
static int (__cdecl *pstrcat_s)(char *dst, size_t len, const char *src);
static int (__cdecl *p_mbsnbcpy_s)(unsigned char * dst, size_t size, const unsigned char * src, size_t count);
static int (__cdecl *p_wcscpy_s)(wchar_t *wcDest, size_t size, const wchar_t *wcSrc);
static int *p__mb_cur_max;
static unsigned char *p_mbctype;
......
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