From 4dd9f585acee66bad289a3822884156e095778ef Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 24 Jun 2019 10:10:05 +0200 Subject: [PATCH] tapi32: Build with msvcrt. Signed-off-by: Alexandre Julliard --- 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 e8c5e58cee0..1184e797917 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 0d707dbc749..298087de71e 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 #include #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 d21fd91c9ae..a44ac1a1a72 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;