[libxslt] [win32] Call ANSI versions of WinAPI functions explicitly



commit 9352e66ab84de33b0b805f3658a3bab1d19e4f67
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Wed Jun 16 16:43:06 2021 +0200

    [win32] Call ANSI versions of WinAPI functions explicitly
    
    Don't depend on Unicode setting.

 libexslt/crypto.c  | 4 ++--
 libxslt/security.c | 2 +-
 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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]