Module: wine Branch: master Commit: 4dd9f585acee66bad289a3822884156e095778ef URL: https://source.winehq.org/git/wine.git/?a=commit;h=4dd9f585acee66bad289a3822...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 24 10:10:05 2019 +0200
tapi32: Build with msvcrt.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/tapi32/Makefile.in | 2 ++ dlls/tapi32/assisted.c | 8 ++------ dlls/tapi32/line.c | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/dlls/tapi32/Makefile.in b/dlls/tapi32/Makefile.in index e8c5e58..1184e79 100644 --- a/dlls/tapi32/Makefile.in +++ b/dlls/tapi32/Makefile.in @@ -2,6 +2,8 @@ MODULE = tapi32.dll IMPORTLIB = tapi32 IMPORTS = advapi32
+EXTRADLLFLAGS = -mno-cygwin + C_SRCS = \ assisted.c \ line.c \ diff --git a/dlls/tapi32/assisted.c b/dlls/tapi32/assisted.c index 0d707db..298087d 100644 --- a/dlls/tapi32/assisted.c +++ b/dlls/tapi32/assisted.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
-#include "config.h" -#include "wine/port.h" - #include <stdarg.h> #include <stdio.h> #include "windef.h" @@ -30,7 +27,6 @@ #include "winreg.h" #include "objbase.h" #include "tapi.h" -#include "wine/unicode.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi); @@ -65,7 +61,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) && type == REG_DWORD) { /* find a subkey called Location1, Location2... */ - sprintfW( szlockey, locationW, currid); + swprintf( szlockey, ARRAY_SIZE(szlockey), locationW, currid); if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) { if( citycode) { bufsize=sizeof(buf); @@ -79,7 +75,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) bufsize=sizeof(buf); if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf, &bufsize) && type == REG_DWORD) - snprintfW( countrycode, 8, fmtW, *(LPDWORD) buf ); + swprintf( countrycode, 8, fmtW, *(LPDWORD) buf ); else countrycode[0] = '\0'; } diff --git a/dlls/tapi32/line.c b/dlls/tapi32/line.c index d21fd91..a44ac1a 100644 --- a/dlls/tapi32/line.c +++ b/dlls/tapi32/line.c @@ -32,7 +32,6 @@ #include "objbase.h" #include "tapi.h" #include "wine/debug.h" -#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi);
@@ -539,7 +538,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) HKEY hsubkey;
if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS) continue; - if (id && (atoiW(subkey_name) != id)) continue; + if (id && (wcstol(subkey_name, NULL, 10) != id)) continue; if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue;
RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int); @@ -566,7 +565,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY);
if (id) i = 0; - entry[i].dwCountryID = atoiW(subkey_name); + entry[i].dwCountryID = wcstol(subkey_name, NULL, 10); size = sizeof(DWORD); RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE *)&entry[i].dwCountryCode, &size); entry[i].dwNextCountryID = 0;