[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    [PATCH 2/2] msvcp140: add sprintf (try 2)
From:       Daniel Lehman <dlehman () esri ! com>
Date:       2016-07-29 22:54:52
Message-ID: 7353aa92110b48c5877e975f326db57c () RED-INF-MXMB-P1 ! esri ! com
[Download RAW message or body]

Try 2:
- use #define
- move sprint to same #if block as others

["0002-msvcp140-add-sprintf.txt" (text/plain)]

From 88389bf9f8f3dfc4083ab615518d9b9dcdb72224 Mon Sep 17 00:00:00 2001
From: Daniel Lehman <dlehman@esri.com>
Date: Fri, 8 Apr 2016 16:14:28 -0700
Subject: [PATCH 2/2] msvcp140: add sprintf

so that it doesn't redirect to glibc

Signed-off-by: Daniel Lehman <dlehman@esri.com>
---
 dlls/msvcp90/msvcp_main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dlls/msvcp90/msvcp_main.c b/dlls/msvcp90/msvcp_main.c
index a60c4b6..c9a72d2 100644
--- a/dlls/msvcp90/msvcp_main.c
+++ b/dlls/msvcp90/msvcp_main.c
@@ -117,6 +117,16 @@ int __cdecl _scprintf(const char* fmt, ...)
     __ms_va_end(valist);
     return ret;
 }
+
+int __cdecl sprintf(char *buf, const char *fmt, ...)
+{
+    int ret;
+    __ms_va_list valist;
+    __ms_va_start(valist, fmt);
+    ret = __stdio_common_vsprintf(UCRTBASE_PRINTF_STANDARD_SNPRINTF_BEHAVIOUR, buf, \
-1, fmt, NULL, valist); +    __ms_va_end(valist);
+    return ret;
+}
 #endif
 
 static void init_cxx_funcs(void)
-- 
1.9.5


[Attachment #4 (text/plain)]




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic