summaryrefslogtreecommitdiff
path: root/lib/localename.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-05-28 02:31:53 +0200
committerBruno Haible <bruno@clisp.org>2020-05-28 02:31:53 +0200
commit278738f2881906b3a3efd2144ff8081a39c17587 (patch)
tree9627941ad0483af0da25cc4a30ab866af78fe01c /lib/localename.c
parente0dc0ffc6f2f2a4826156d7451e1dc6e80e53243 (diff)
downloadgnulib-278738f2881906b3a3efd2144ff8081a39c17587.tar.gz
Don't assume that UNICODE is not defined.
Some Windows types, such as TCHAR, LPTSTR, LPCTSTR, are defined differently if the application defines the macro UNICODE. Reported by Steve Lhomme <robux4@ycbcr.xyz> in <https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00184.html>. * lib/link.c (CreateHardLinkFuncType): Use LPCSTR, not LPCTSTR. * lib/localename.c (enum_locales_fn): Use LPSTR, not LPTSTR. * lib/stat-w32.c (GetFinalPathNameByHandleFuncType): Likewise.
Diffstat (limited to 'lib/localename.c')
-rw-r--r--lib/localename.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/localename.c b/lib/localename.c
index fe3d168c80..4046a0bb61 100644
--- a/lib/localename.c
+++ b/lib/localename.c
@@ -2564,7 +2564,7 @@ static char lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1];
/* Callback function for EnumLocales. */
static BOOL CALLBACK
-enum_locales_fn (LPTSTR locale_num_str)
+enum_locales_fn (LPSTR locale_num_str)
{
char *endp;
char locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1];