Alexandre Julliard : wintrust: Build with msvcrt.
Alexandre Julliard
julliard at winehq.org
Thu Jun 27 15:34:07 CDT 2019
Module: wine
Branch: master
Commit: 8a281038afd24fcfef3b95c1543e1d73c3876e6a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8a281038afd24fcfef3b95c1543e1d73c3876e6a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jun 27 09:08:07 2019 +0200
wintrust: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wintrust/Makefile.in | 2 ++
dlls/wintrust/asn.c | 3 ---
dlls/wintrust/crypt.c | 51 +++++++++++++++++++++----------------------
dlls/wintrust/wintrust_main.c | 2 --
4 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/dlls/wintrust/Makefile.in b/dlls/wintrust/Makefile.in
index 244f17f..c486083 100644
--- a/dlls/wintrust/Makefile.in
+++ b/dlls/wintrust/Makefile.in
@@ -3,6 +3,8 @@ IMPORTLIB = wintrust
IMPORTS = crypt32 user32 advapi32
DELAYIMPORTS = cryptui imagehlp
+EXTRADLLFLAGS = -mno-cygwin
+
C_SRCS = \
asn.c \
crypt.c \
diff --git a/dlls/wintrust/asn.c b/dlls/wintrust/asn.c
index 46525f0..72536e8 100644
--- a/dlls/wintrust/asn.c
+++ b/dlls/wintrust/asn.c
@@ -18,9 +18,6 @@
*
*/
-#include "config.h"
-#include "wine/port.h"
-
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
diff --git a/dlls/wintrust/crypt.c b/dlls/wintrust/crypt.c
index 1a36965..b454c8b 100644
--- a/dlls/wintrust/crypt.c
+++ b/dlls/wintrust/crypt.c
@@ -33,7 +33,6 @@
#include "winternl.h"
#include "wine/debug.h"
-#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
@@ -75,7 +74,7 @@ static HCATINFO create_catinfo(const WCHAR *filename)
SetLastError(ERROR_OUTOFMEMORY);
return INVALID_HANDLE_VALUE;
}
- strcpyW(ci->file, filename);
+ lstrcpyW(ci->file, filename);
ci->magic = CATINFO_MAGIC;
return ci;
}
@@ -125,13 +124,13 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
}
GetSystemDirectoryW(catroot_dir, MAX_PATH);
- strcatW(catroot_dir, catroot);
+ lstrcatW(catroot_dir, catroot);
/* create the directory if it doesn't exist */
CreateDirectoryW(catroot_dir, NULL);
if (!sys) sys = &defsys;
- sprintfW(ca->path, fmt, catroot_dir, sys->Data1, sys->Data2,
+ swprintf(ca->path, ARRAY_SIZE(ca->path), fmt, catroot_dir, sys->Data1, sys->Data2,
sys->Data3, sys->Data4[0], sys->Data4[1], sys->Data4[2],
sys->Data4[3], sys->Data4[4], sys->Data4[5], sys->Data4[6],
sys->Data4[7]);
@@ -184,15 +183,15 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
return NULL;
}
- len = strlenW(ca->path) + strlenW(selectBaseName) + 2;
+ len = lstrlenW(ca->path) + lstrlenW(selectBaseName) + 2;
if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
{
SetLastError(ERROR_OUTOFMEMORY);
return NULL;
}
- strcpyW(target, ca->path);
- strcatW(target, slashW);
- strcatW(target, selectBaseName);
+ lstrcpyW(target, ca->path);
+ lstrcatW(target, slashW);
+ lstrcatW(target, selectBaseName);
if (!CopyFileW(catalogFile, target, FALSE))
{
@@ -208,7 +207,7 @@ HCATINFO WINAPI CryptCATAdminAddCatalog(HCATADMIN catAdmin, PWSTR catalogFile,
return NULL;
}
ci->magic = CATINFO_MAGIC;
- strcpyW(ci->file, target);
+ lstrcpyW(ci->file, target);
HeapFree(GetProcessHeap(), 0, target);
return ci;
@@ -308,15 +307,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
{
WCHAR *path;
- size = strlenW(ca->path) * sizeof(WCHAR) + sizeof(globW);
+ size = lstrlenW(ca->path) * sizeof(WCHAR) + sizeof(globW);
if (!(path = HeapAlloc(GetProcessHeap(), 0, size)))
{
CryptReleaseContext(prov, 0);
SetLastError(ERROR_OUTOFMEMORY);
return NULL;
}
- strcpyW(path, ca->path);
- strcatW(path, globW);
+ lstrcpyW(path, ca->path);
+ lstrcatW(path, globW);
FindClose(ca->find);
ca->find = FindFirstFileW(path, &data);
@@ -342,15 +341,15 @@ HCATINFO WINAPI CryptCATAdminEnumCatalogFromHash(HCATADMIN hCatAdmin, BYTE* pbHa
struct catinfo *ci;
HANDLE hcat;
- size = (strlenW(ca->path) + strlenW(data.cFileName) + 2) * sizeof(WCHAR);
+ size = (lstrlenW(ca->path) + lstrlenW(data.cFileName) + 2) * sizeof(WCHAR);
if (!(filename = HeapAlloc(GetProcessHeap(), 0, size)))
{
SetLastError(ERROR_OUTOFMEMORY);
return NULL;
}
- strcpyW(filename, ca->path);
- strcatW(filename, slashW);
- strcatW(filename, data.cFileName);
+ lstrcpyW(filename, ca->path);
+ lstrcatW(filename, slashW);
+ lstrcatW(filename, data.cFileName);
hcat = CryptCATOpen(filename, CRYPTCAT_OPEN_EXISTING, prov, 0, 0);
if (hcat == INVALID_HANDLE_VALUE)
@@ -487,22 +486,22 @@ BOOL WINAPI CryptCATAdminRemoveCatalog(HCATADMIN hCatAdmin, LPCWSTR pwszCatalogF
/* Only delete when there is a filename and no path */
if (pwszCatalogFile && pwszCatalogFile[0] != 0 &&
- !strchrW(pwszCatalogFile, '\\') && !strchrW(pwszCatalogFile, '/') &&
- !strchrW(pwszCatalogFile, ':'))
+ !wcschr(pwszCatalogFile, '\\') && !wcschr(pwszCatalogFile, '/') &&
+ !wcschr(pwszCatalogFile, ':'))
{
static const WCHAR slashW[] = {'\\',0};
WCHAR *target;
DWORD len;
- len = strlenW(ca->path) + strlenW(pwszCatalogFile) + 2;
+ len = lstrlenW(ca->path) + lstrlenW(pwszCatalogFile) + 2;
if (!(target = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR))))
{
SetLastError(ERROR_OUTOFMEMORY);
return FALSE;
}
- strcpyW(target, ca->path);
- strcatW(target, slashW);
- strcatW(target, pwszCatalogFile);
+ lstrcpyW(target, ca->path);
+ lstrcatW(target, slashW);
+ lstrcatW(target, pwszCatalogFile);
DeleteFileW(target);
@@ -528,9 +527,9 @@ BOOL WINAPI CryptCATAdminResolveCatalogPath(HCATADMIN hcatadmin, WCHAR *catalog_
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- strcpyW(info->wszCatalogFile, ca->path);
- strcatW(info->wszCatalogFile, slashW);
- strcatW(info->wszCatalogFile, catalog_file);
+ lstrcpyW(info->wszCatalogFile, ca->path);
+ lstrcatW(info->wszCatalogFile, slashW);
+ lstrcatW(info->wszCatalogFile, catalog_file);
return TRUE;
}
@@ -845,7 +844,7 @@ BOOL WINAPI CryptCATCatalogInfoFromContext(HCATINFO hcatinfo, CATALOG_INFO *info
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- strcpyW(info->wszCatalogFile, ci->file);
+ lstrcpyW(info->wszCatalogFile, ci->file);
return TRUE;
}
diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c
index 7db0b47..a0b8a13 100644
--- a/dlls/wintrust/wintrust_main.c
+++ b/dlls/wintrust/wintrust_main.c
@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "config.h"
-
#include <stdarg.h>
#define NONAMELESSUNION
More information about the wine-cvs
mailing list