user32: Convert wvsprintfA/W to use an MS ABI vararg list for x86_64.
This commit is contained in:
parent
aa6f1c730a
commit
fb7acdcb28
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
static INT (WINAPI *pLoadStringA)(HINSTANCE, UINT, LPSTR, INT);
|
||||
static INT (WINAPI *pwvsprintfA)(LPSTR, LPCSTR, va_list);
|
||||
static INT (WINAPI *pwvsprintfA)(LPSTR, LPCSTR, __ms_va_list);
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -118,7 +118,7 @@ INT WINAPI k32LoadStringA(HINSTANCE instance, UINT resource_id,
|
|||
/***********************************************************************
|
||||
* k32wvsprintfA (KERNEL32.16)
|
||||
*/
|
||||
INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, va_list args)
|
||||
INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, __ms_va_list args)
|
||||
{
|
||||
if(!pwvsprintfA) pwvsprintfA = user32_proc_address("wvsprintfA");
|
||||
return (*pwvsprintfA)(buffer, spec, args);
|
||||
|
@ -130,12 +130,12 @@ INT WINAPI k32wvsprintfA(LPSTR buffer, LPCSTR spec, va_list args)
|
|||
*/
|
||||
INT WINAPIV k32wsprintfA(LPSTR buffer, LPCSTR spec, ...)
|
||||
{
|
||||
va_list args;
|
||||
__ms_va_list args;
|
||||
INT res;
|
||||
|
||||
va_start(args, spec);
|
||||
__ms_va_start(args, spec);
|
||||
res = k32wvsprintfA(buffer, spec, args);
|
||||
va_end(args);
|
||||
__ms_va_end(args);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@ static INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec, VA_LIST16 a
|
|||
/***********************************************************************
|
||||
* wvsnprintfA (internal)
|
||||
*/
|
||||
static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
|
||||
static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, __ms_va_list args )
|
||||
{
|
||||
WPRINTF_FORMAT format;
|
||||
LPSTR p = buffer;
|
||||
|
@ -488,7 +488,7 @@ static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
|
|||
/***********************************************************************
|
||||
* wvsnprintfW (internal)
|
||||
*/
|
||||
static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, va_list args )
|
||||
static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, __ms_va_list args )
|
||||
{
|
||||
WPRINTF_FORMAT format;
|
||||
LPWSTR p = buffer;
|
||||
|
@ -603,7 +603,7 @@ INT16 WINAPI wvsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 args )
|
|||
/***********************************************************************
|
||||
* wvsprintfA (USER32.@)
|
||||
*/
|
||||
INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, va_list args )
|
||||
INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, __ms_va_list args )
|
||||
{
|
||||
INT res = wvsnprintfA( buffer, 1024, spec, args );
|
||||
return ( res == -1 ) ? 1024 : res;
|
||||
|
@ -613,7 +613,7 @@ INT WINAPI wvsprintfA( LPSTR buffer, LPCSTR spec, va_list args )
|
|||
/***********************************************************************
|
||||
* wvsprintfW (USER32.@)
|
||||
*/
|
||||
INT WINAPI wvsprintfW( LPWSTR buffer, LPCWSTR spec, va_list args )
|
||||
INT WINAPI wvsprintfW( LPWSTR buffer, LPCWSTR spec, __ms_va_list args )
|
||||
{
|
||||
INT res = wvsnprintfW( buffer, 1024, spec, args );
|
||||
return ( res == -1 ) ? 1024 : res;
|
||||
|
@ -637,12 +637,12 @@ INT16 WINAPIV wsprintf16( LPSTR buffer, LPCSTR spec, VA_LIST16 valist )
|
|||
*/
|
||||
INT WINAPIV wsprintfA( LPSTR buffer, LPCSTR spec, ... )
|
||||
{
|
||||
va_list valist;
|
||||
__ms_va_list valist;
|
||||
INT res;
|
||||
|
||||
va_start( valist, spec );
|
||||
__ms_va_start( valist, spec );
|
||||
res = wvsnprintfA( buffer, 1024, spec, valist );
|
||||
va_end( valist );
|
||||
__ms_va_end( valist );
|
||||
return ( res == -1 ) ? 1024 : res;
|
||||
}
|
||||
|
||||
|
@ -652,11 +652,11 @@ INT WINAPIV wsprintfA( LPSTR buffer, LPCSTR spec, ... )
|
|||
*/
|
||||
INT WINAPIV wsprintfW( LPWSTR buffer, LPCWSTR spec, ... )
|
||||
{
|
||||
va_list valist;
|
||||
__ms_va_list valist;
|
||||
INT res;
|
||||
|
||||
va_start( valist, spec );
|
||||
__ms_va_start( valist, spec );
|
||||
res = wvsnprintfW( buffer, 1024, spec, valist );
|
||||
va_end( valist );
|
||||
__ms_va_end( valist );
|
||||
return ( res == -1 ) ? 1024 : res;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,18 @@ extern "C" {
|
|||
# endif
|
||||
#endif /* __cdecl */
|
||||
|
||||
#ifndef __ms_va_list
|
||||
# if defined(__x86_64__) && defined (__GNUC__)
|
||||
# define __ms_va_list __builtin_ms_va_list
|
||||
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
|
||||
# define __ms_va_end(list) __builtin_ms_va_end(list)
|
||||
# else
|
||||
# define __ms_va_list va_list
|
||||
# define __ms_va_start(list,arg) va_start(list,arg)
|
||||
# define __ms_va_end(list) va_end(list)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __WINESRC__
|
||||
#define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine
|
||||
#else
|
||||
|
|
|
@ -5068,8 +5068,8 @@ WINUSERAPI VOID WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR);
|
|||
WINUSERAPI INT WINAPIV wsprintfA(LPSTR,LPCSTR,...);
|
||||
WINUSERAPI INT WINAPIV wsprintfW(LPWSTR,LPCWSTR,...);
|
||||
#define wsprintf WINELIB_NAME_AW(wsprintf)
|
||||
WINUSERAPI INT WINAPI wvsprintfA(LPSTR,LPCSTR,va_list);
|
||||
WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,va_list);
|
||||
WINUSERAPI INT WINAPI wvsprintfA(LPSTR,LPCSTR,__ms_va_list);
|
||||
WINUSERAPI INT WINAPI wvsprintfW(LPWSTR,LPCWSTR,__ms_va_list);
|
||||
#define wvsprintf WINELIB_NAME_AW(wvsprintf)
|
||||
|
||||
/* Undocumented functions */
|
||||
|
|
Loading…
Reference in New Issue