bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* [PATCH 1/2] stat: use a CHAR instead of TCHAR with GetFinalPathNameByHandleA
@ 2020-05-19  6:26 Steve Lhomme
  2020-05-19  6:26 ` [PATCH 2/2] stat: do not use LoadLibrary when built for Windows Store apps Steve Lhomme
  2020-05-28  0:43 ` [PATCH 1/2] stat: use a CHAR instead of TCHAR with GetFinalPathNameByHandleA Bruno Haible
  0 siblings, 2 replies; 13+ messages in thread
From: Steve Lhomme @ 2020-05-19  6:26 UTC (permalink / raw)
  To: bug-gnulib; +Cc: Steve Lhomme

The GetProcAddress uses the ANSI version of the API so the proper type for the
string is LPSTR, as found here:

https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlea
---
 lib/stat-w32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/stat-w32.c b/lib/stat-w32.c
index 296ccf18c..106d25120 100644
--- a/lib/stat-w32.c
+++ b/lib/stat-w32.c
@@ -52,7 +52,7 @@ static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = N
 #endif
 /* GetFinalPathNameByHandle was introduced only in Windows Vista.  */
 typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile,
-                                                           LPTSTR lpFilePath,
+                                                           LPSTR lpFilePath,
                                                            DWORD lenFilePath,
                                                            DWORD dwFlags);
 static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL;
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-05-30 15:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19  6:26 [PATCH 1/2] stat: use a CHAR instead of TCHAR with GetFinalPathNameByHandleA Steve Lhomme
2020-05-19  6:26 ` [PATCH 2/2] stat: do not use LoadLibrary when built for Windows Store apps Steve Lhomme
2020-05-28  6:26   ` Steve Lhomme
2020-05-30  9:21   ` Bruno Haible
2020-05-28  0:43 ` [PATCH 1/2] stat: use a CHAR instead of TCHAR with GetFinalPathNameByHandleA Bruno Haible
2020-05-28  1:07   ` Jeffrey Walton
2020-05-30  9:16   ` Don't assume that UNICODE is not defined Bruno Haible
2020-05-30 10:57     ` Jeffrey Walton
2020-05-30 12:43       ` Steve Lhomme
2020-05-30 12:46     ` Steve Lhomme
2020-05-30 14:31       ` Bruno Haible
2020-05-30 14:46         ` Steve Lhomme
2020-05-30 15:43           ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).