Skip to content

Commit 540bfc6

Browse files
committed
Fix build failure on Windows.
1 parent 61e02bf commit 540bfc6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/locale_charset.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,16 @@ _CPPP_API const char *locale_charset()
120120
if (p == NULL)
121121
{
122122
// No dot.
123-
return DEFAULT_CHARSET;
123+
return REICONV_DEFAULT_CHARSET;
124124
}
125125

126126
// Split the locale into two parts.
127127
codeset = p + 1;
128128
return codeset;
129129

130+
#if locale_table_defined
130131
done_table_lookup:
132+
#endif
131133

132134
#if IS_DARWIN7
133135
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"

lib/localecharset/lc_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef _LC_TYPES_H_
2525
#define _LC_TYPES_H_
2626

27-
#define DEFAULT_CHARSET "UTF-8"
27+
#define REICONV_DEFAULT_CHARSET "UTF-8"
2828

2929
struct locale_table_entry
3030
{

lib/localecharset/windows_getcp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
#include <Windows.h>
3434

35-
static const char *windows_getcp(char *resultbuf)
35+
static const char *windows_getcp()
3636
{
3737
#ifdef _CONSOLE
3838
UINT cp = GetConsoleOutputCP();

0 commit comments

Comments
 (0)