Commit 5f36d023 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Convert FormatMessageA/W to use an MS ABI vararg list for x86_64.

parent 71de29b7
......@@ -135,7 +135,7 @@ DWORD WINAPI FormatMessageA(
DWORD dwLanguageId,
LPSTR lpBuffer,
DWORD nSize,
va_list* _args )
__ms_va_list* _args )
{
LPDWORD args=(LPDWORD)_args;
DWORD ret = 0;
......@@ -356,7 +356,7 @@ DWORD WINAPI FormatMessageW(
DWORD dwLanguageId,
LPWSTR lpBuffer,
DWORD nSize,
va_list* _args )
__ms_va_list* _args )
{
LPDWORD args=(LPDWORD)_args;
#if defined(__i386__) || defined(__sparc__)
......
......@@ -438,7 +438,7 @@ NTSTATUS WINAPI RtlFindMessage( HMODULE hmod, ULONG type, ULONG lang,
*/
NTSTATUS WINAPI RtlFormatMessage( LPWSTR Message, UCHAR MaxWidth,
BOOLEAN IgnoreInserts, BOOLEAN Ansi,
BOOLEAN ArgumentIsArray, va_list * Arguments,
BOOLEAN ArgumentIsArray, __ms_va_list * Arguments,
LPWSTR Buffer, ULONG BufferSize )
{
FIXME("(%s, %u, %s, %s, %s, %p, %p, %d)\n", debugstr_w(Message),
......
......@@ -356,10 +356,10 @@ int WINAPIV ShellMessageBoxW(
WCHAR szText[100],szTitle[100];
LPCWSTR pszText = szText, pszTitle = szTitle;
LPWSTR pszTemp;
va_list args;
__ms_va_list args;
int ret;
va_start(args, uType);
__ms_va_start(args, uType);
/* wvsprintfA(buf,fmt, args); */
TRACE("(%p,%p,%p,%p,%08x)\n",
......@@ -378,7 +378,7 @@ int WINAPIV ShellMessageBoxW(
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
va_end(args);
__ms_va_end(args);
ret = MessageBoxW(hWnd,pszTemp,pszTitle,uType);
LocalFree((HLOCAL)pszTemp);
......@@ -414,10 +414,10 @@ int WINAPIV ShellMessageBoxA(
char szText[100],szTitle[100];
LPCSTR pszText = szText, pszTitle = szTitle;
LPSTR pszTemp;
va_list args;
__ms_va_list args;
int ret;
va_start(args, uType);
__ms_va_start(args, uType);
/* wvsprintfA(buf,fmt, args); */
TRACE("(%p,%p,%p,%p,%08x)\n",
......@@ -436,7 +436,7 @@ int WINAPIV ShellMessageBoxA(
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
pszText, 0, 0, (LPSTR)&pszTemp, 0, &args);
va_end(args);
__ms_va_end(args);
ret = MessageBoxA(hWnd,pszTemp,pszTitle,uType);
LocalFree((HLOCAL)pszTemp);
......
......@@ -291,7 +291,7 @@ static BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir, FI
args[0] = (DWORD_PTR)szDir;
FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY,
szText, 0, 0, szBuffer, sizeof(szBuffer), (va_list*)args);
szText, 0, 0, szBuffer, sizeof(szBuffer), (__ms_va_list*)args);
hIcon = LoadIconW(ids.hIconInstance, (LPWSTR)MAKEINTRESOURCE(ids.icon_resource_id));
ret = SHELL_ConfirmMsgBox(hWnd, szBuffer, szCaption, hIcon, op && op->bManyItems);
......
......@@ -4309,10 +4309,10 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
WCHAR szText[100], szTitle[100];
LPCWSTR pszText = szText, pszTitle = szTitle;
LPWSTR pszTemp;
va_list args;
__ms_va_list args;
int ret;
va_start(args, uType);
__ms_va_start(args, uType);
TRACE("(%p,%p,%p,%p,%08x)\n", hInstance, hWnd, lpText, lpCaption, uType);
......@@ -4329,7 +4329,7 @@ INT WINAPIV ShellMessageBoxWrapW(HINSTANCE hInstance, HWND hWnd, LPCWSTR lpText,
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_STRING,
pszText, 0, 0, (LPWSTR)&pszTemp, 0, &args);
va_end(args);
__ms_va_end(args);
ret = MessageBoxW(hWnd, pszTemp, pszTitle, uType);
LocalFree(pszTemp);
......
......@@ -1533,8 +1533,8 @@ WINBASEAPI BOOL WINAPI FlsSetValue(DWORD,PVOID);
WINBASEAPI BOOL WINAPI FlushFileBuffers(HANDLE);
WINBASEAPI BOOL WINAPI FlushInstructionCache(HANDLE,LPCVOID,SIZE_T);
WINBASEAPI BOOL WINAPI FlushViewOfFile(LPCVOID,SIZE_T);
WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
WINBASEAPI DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
WINBASEAPI DWORD WINAPI FormatMessageA(DWORD,LPCVOID,DWORD,DWORD,LPSTR,DWORD,__ms_va_list*);
WINBASEAPI DWORD WINAPI FormatMessageW(DWORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,__ms_va_list*);
#define FormatMessage WINELIB_NAME_AW(FormatMessage)
WINBASEAPI BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
WINBASEAPI BOOL WINAPI FreeEnvironmentStringsW(LPWSTR);
......
......@@ -2331,7 +2331,7 @@ NTSYSAPI ULONG WINAPI RtlFindSetBitsAndClear(PRTL_BITMAP,ULONG,ULONG);
NTSYSAPI ULONG WINAPI RtlFindSetRuns(PCRTL_BITMAP,PRTL_BITMAP_RUN,ULONG,BOOLEAN);
NTSYSAPI BOOLEAN WINAPI RtlFirstFreeAce(PACL,PACE_HEADER *);
NTSYSAPI NTSTATUS WINAPI RtlFormatCurrentUserKeyPath(PUNICODE_STRING);
NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,va_list *,LPWSTR,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlFormatMessage(LPWSTR,UCHAR,BOOLEAN,BOOLEAN,BOOLEAN,__ms_va_list *,LPWSTR,ULONG);
NTSYSAPI void WINAPI RtlFreeAnsiString(PANSI_STRING);
NTSYSAPI BOOLEAN WINAPI RtlFreeHandle(RTL_HANDLE_TABLE *,RTL_HANDLE *);
NTSYSAPI BOOLEAN WINAPI RtlFreeHeap(HANDLE,ULONG,PVOID);
......
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