diff --git a/common/arch.h b/common/arch.h index e66b2479..3344d531 100644 --- a/common/arch.h +++ b/common/arch.h @@ -145,12 +145,10 @@ typedef bool_t tbool; typedef intptr_t tbus; typedef intptr_t tintptr; -/* wide char, socket */ +/* socket */ #if defined(_WIN32) -typedef unsigned short twchar; typedef unsigned int tsock; #else -typedef int twchar; typedef int tsock; #endif #endif /* DEFINED_Ts */ diff --git a/common/os_calls.c b/common/os_calls.c index 6739a647..644d685f 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -181,20 +181,6 @@ g_init(const char *app_name) WSAStartup(2, &wsadata); #endif - - /* In order to get g_mbstowcs and g_wcstombs to work properly with - UTF-8 non-ASCII characters, LC_CTYPE cannot be "C" or blank. - To select UTF-8 encoding without specifying any countries/languages, - "C.UTF-8" is used but provided in few systems. - - See also: https://sourceware.org/glibc/wiki/Proposals/C.UTF-8 */ - char *lc_ctype; - lc_ctype = setlocale(LC_CTYPE, "C.UTF-8"); - if (lc_ctype == NULL) - { - /* use en_US.UTF-8 instead if not available */ - setlocale(LC_CTYPE, "en_US.UTF-8"); - } } /*****************************************************************************/ diff --git a/common/string_calls.c b/common/string_calls.c index 0447c5da..16acc869 100644 --- a/common/string_calls.c +++ b/common/string_calls.c @@ -710,30 +710,6 @@ g_strstr(const char *haystack, const char *needle) return (char *)strstr(haystack, needle); } -/*****************************************************************************/ -int -g_mbstowcs(twchar *dest, const char *src, int n) -{ - wchar_t *ldest; - int rv; - - ldest = (wchar_t *)dest; - rv = mbstowcs(ldest, src, n); - return rv; -} - -/*****************************************************************************/ -int -g_wcstombs(char *dest, const twchar *src, int n) -{ - const wchar_t *lsrc; - int rv; - - lsrc = (const wchar_t *)src; - rv = wcstombs(dest, lsrc, n); - return rv; -} - /*****************************************************************************/ /* returns error */ int diff --git a/common/string_calls.h b/common/string_calls.h index c51f5515..a72f8efb 100644 --- a/common/string_calls.h +++ b/common/string_calls.h @@ -310,8 +310,6 @@ int g_bytes_to_hexstr(const void *bytes, int num_bytes, char *out_str, int bytes_out_str); int g_pos(const char *str, const char *to_find); char *g_strstr(const char *haystack, const char *needle); -int g_mbstowcs(twchar *dest, const char *src, int n); -int g_wcstombs(char *dest, const twchar *src, int n); /** trim spaces and tabs, anything <= space *