Alexandre Julliard : xcopy: Fix varargs handling for 64-bit.

Alexandre Julliard julliard at winehq.org
Thu Oct 20 14:25:11 CDT 2011


Module: wine
Branch: master
Commit: 6b59b05244534608a8ab71ef943f84d4568206e0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6b59b05244534608a8ab71ef943f84d4568206e0

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 20 14:31:29 2011 +0200

xcopy: Fix varargs handling for 64-bit.

---

 programs/xcopy/xcopy.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/programs/xcopy/xcopy.c b/programs/xcopy/xcopy.c
index cfe58f3..f1c011f 100644
--- a/programs/xcopy/xcopy.c
+++ b/programs/xcopy/xcopy.c
@@ -93,7 +93,7 @@ static WCHAR *XCOPY_LoadMessage(UINT id) {
  *  and hence required WriteConsoleW to output it, however if file i/o is
  *  redirected, it needs to be WriteFile'd using OEM (not ANSI) format
  * ========================================================================= */
-static int XCOPY_wprintf(const WCHAR *format, ...) {
+static int __cdecl XCOPY_wprintf(const WCHAR *format, ...) {
 
     static WCHAR *output_bufW = NULL;
     static char  *output_bufA = NULL;
@@ -101,7 +101,7 @@ static int XCOPY_wprintf(const WCHAR *format, ...) {
     static BOOL  traceOutput  = FALSE;
 #define MAX_WRITECONSOLE_SIZE 65535
 
-    va_list parms;
+    __ms_va_list parms;
     DWORD   nOut;
     int len;
     DWORD   res = 0;
@@ -119,11 +119,11 @@ static int XCOPY_wprintf(const WCHAR *format, ...) {
       return 0;
     }
 
-    va_start(parms, format);
+    __ms_va_start(parms, format);
     SetLastError(NO_ERROR);
     len = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, format, 0, 0, output_bufW,
                    MAX_WRITECONSOLE_SIZE/sizeof(*output_bufW), &parms);
-    va_end(parms);
+    __ms_va_end(parms);
     if (len == 0 && GetLastError() != NO_ERROR) {
       WINE_FIXME("Could not format string: le=%u, fmt=%s\n", GetLastError(), wine_dbgstr_w(format));
       return 0;




More information about the wine-cvs mailing list