summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2021-06-16 16:43:06 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2021-06-16 17:07:16 +0200
commit9352e66ab84de33b0b805f3658a3bab1d19e4f67 (patch)
treec2085de3ac4173951e1e5b6144bdf875ebe9ca55
parentda2f90ba4bc438e39304666b170c3e199b281bb2 (diff)
downloadlibxslt-9352e66ab84de33b0b805f3658a3bab1d19e4f67.tar.gz
[win32] Call ANSI versions of WinAPI functions explicitly
Don't depend on Unicode setting.
-rw-r--r--libexslt/crypto.c4
-rw-r--r--libxslt/security.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/libexslt/crypto.c b/libexslt/crypto.c
index 35d1f4fe..a233771a 100644
--- a/libexslt/crypto.c
+++ b/libexslt/crypto.c
@@ -124,10 +124,10 @@ exsltCryptoCryptoApiReportError (xmlXPathParserContextPtr ctxt,
char *lpMsgBuf;
DWORD dw = GetLastError ();
- FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, dw,
MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) & lpMsgBuf, 0, NULL);
+ &lpMsgBuf, 0, NULL);
xsltTransformError (xsltXPathGetTransformContext (ctxt), NULL, NULL,
"exslt:crypto error (line %d). %s", line,
diff --git a/libxslt/security.c b/libxslt/security.c
index 550dc4e2..8e47d4b9 100644
--- a/libxslt/security.c
+++ b/libxslt/security.c
@@ -282,7 +282,7 @@ xsltCheckFilename (const char *path)
#if defined(_WIN32) && !defined(__CYGWIN__)
DWORD dwAttrs;
- dwAttrs = GetFileAttributes(path);
+ dwAttrs = GetFileAttributesA(path);
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
if (dwAttrs & FILE_ATTRIBUTE_DIRECTORY) {
return 2;