Commit 4134c57a authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix compilation error (x86_64-pc-mingw32).

parent 2c07791c
...@@ -572,7 +572,7 @@ int CDECL ___lc_collate_cp_func(void) ...@@ -572,7 +572,7 @@ int CDECL ___lc_collate_cp_func(void)
} }
/* _free_locale - not exported in native msvcrt */ /* _free_locale - not exported in native msvcrt */
void CDECL _free_locale(MSVCRT__locale_t locale) void CDECL MSVCRT__free_locale(MSVCRT__locale_t locale)
{ {
int i; int i;
...@@ -610,7 +610,7 @@ void CDECL _free_locale(MSVCRT__locale_t locale) ...@@ -610,7 +610,7 @@ void CDECL _free_locale(MSVCRT__locale_t locale)
} }
/* _create_locale - not exported in native msvcrt */ /* _create_locale - not exported in native msvcrt */
MSVCRT__locale_t _create_locale(int category, const char *locale) MSVCRT__locale_t MSVCRT__create_locale(int category, const char *locale)
{ {
static const char collate[] = "COLLATE="; static const char collate[] = "COLLATE=";
static const char ctype[] = "CTYPE="; static const char ctype[] = "CTYPE=";
...@@ -705,7 +705,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -705,7 +705,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->lconv = MSVCRT_malloc(sizeof(struct MSVCRT_lconv)); loc->locinfo->lconv = MSVCRT_malloc(sizeof(struct MSVCRT_lconv));
if(!loc->locinfo->lconv) { if(!loc->locinfo->lconv) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
memset(loc->locinfo->lconv, 0, sizeof(struct MSVCRT_lconv)); memset(loc->locinfo->lconv, 0, sizeof(struct MSVCRT_lconv));
...@@ -713,7 +713,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -713,7 +713,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->pclmap = MSVCRT_malloc(sizeof(char[256])); loc->locinfo->pclmap = MSVCRT_malloc(sizeof(char[256]));
loc->locinfo->pcumap = MSVCRT_malloc(sizeof(char[256])); loc->locinfo->pcumap = MSVCRT_malloc(sizeof(char[256]));
if(!loc->locinfo->pclmap || !loc->locinfo->pcumap) { if(!loc->locinfo->pclmap || !loc->locinfo->pcumap) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -721,7 +721,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -721,7 +721,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(lcid[MSVCRT_LC_COLLATE] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_COLLATE)) { if(lcid[MSVCRT_LC_COLLATE] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_COLLATE)) {
if(update_threadlocinfo_category(lcid[MSVCRT_LC_COLLATE], loc, MSVCRT_LC_COLLATE)) { if(update_threadlocinfo_category(lcid[MSVCRT_LC_COLLATE], loc, MSVCRT_LC_COLLATE)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
} else } else
...@@ -731,7 +731,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -731,7 +731,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
CPINFO cp; CPINFO cp;
if(update_threadlocinfo_category(lcid[MSVCRT_LC_CTYPE], loc, MSVCRT_LC_CTYPE)) { if(update_threadlocinfo_category(lcid[MSVCRT_LC_CTYPE], loc, MSVCRT_LC_CTYPE)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -739,7 +739,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -739,7 +739,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->lc_collate_cp = loc->locinfo->lc_codepage; loc->locinfo->lc_collate_cp = loc->locinfo->lc_codepage;
loc->locinfo->lc_clike = 1; loc->locinfo->lc_clike = 1;
if(!GetCPInfo(loc->locinfo->lc_codepage, &cp)) { if(!GetCPInfo(loc->locinfo->lc_codepage, &cp)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
loc->locinfo->mb_cur_max = cp.MaxCharSize; loc->locinfo->mb_cur_max = cp.MaxCharSize;
...@@ -747,7 +747,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -747,7 +747,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->ctype1_refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->ctype1_refcount = MSVCRT_malloc(sizeof(int));
loc->locinfo->ctype1 = MSVCRT_malloc(sizeof(short[257])); loc->locinfo->ctype1 = MSVCRT_malloc(sizeof(short[257]));
if(!loc->locinfo->ctype1_refcount || !loc->locinfo->ctype1) { if(!loc->locinfo->ctype1_refcount || !loc->locinfo->ctype1) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -793,14 +793,14 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -793,14 +793,14 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(lcid[MSVCRT_LC_MONETARY] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_MONETARY)) { if(lcid[MSVCRT_LC_MONETARY] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_MONETARY)) {
if(update_threadlocinfo_category(lcid[MSVCRT_LC_MONETARY], loc, MSVCRT_LC_MONETARY)) { if(update_threadlocinfo_category(lcid[MSVCRT_LC_MONETARY], loc, MSVCRT_LC_MONETARY)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int));
loc->locinfo->lconv_mon_refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->lconv_mon_refcount = MSVCRT_malloc(sizeof(int));
if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_mon_refcount) { if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_mon_refcount) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -812,7 +812,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -812,7 +812,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->int_curr_symbol = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->int_curr_symbol, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->int_curr_symbol, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -821,7 +821,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -821,7 +821,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->currency_symbol = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->currency_symbol, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->currency_symbol, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -830,7 +830,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -830,7 +830,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->mon_decimal_point = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->mon_decimal_point, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->mon_decimal_point, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -839,7 +839,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -839,7 +839,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->mon_thousands_sep = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->mon_thousands_sep, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->mon_thousands_sep, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -854,7 +854,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -854,7 +854,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(buf[i] != '0') if(buf[i] != '0')
loc->locinfo->lconv->mon_grouping[i/2+1] = 127; loc->locinfo->lconv->mon_grouping[i/2+1] = 127;
} else { } else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -863,7 +863,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -863,7 +863,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->positive_sign = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->positive_sign = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->positive_sign, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->positive_sign, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -872,7 +872,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -872,7 +872,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->negative_sign = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->negative_sign = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->negative_sign, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->negative_sign, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -880,7 +880,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -880,7 +880,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->int_frac_digits = atoi(buf); loc->locinfo->lconv->int_frac_digits = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -888,7 +888,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -888,7 +888,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->frac_digits = atoi(buf); loc->locinfo->lconv->frac_digits = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -896,7 +896,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -896,7 +896,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_cs_precedes = atoi(buf); loc->locinfo->lconv->p_cs_precedes = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -904,7 +904,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -904,7 +904,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_sep_by_space = atoi(buf); loc->locinfo->lconv->p_sep_by_space = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -912,7 +912,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -912,7 +912,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_cs_precedes = atoi(buf); loc->locinfo->lconv->n_cs_precedes = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -920,7 +920,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -920,7 +920,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_sep_by_space = atoi(buf); loc->locinfo->lconv->n_sep_by_space = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -928,7 +928,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -928,7 +928,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->p_sign_posn = atoi(buf); loc->locinfo->lconv->p_sign_posn = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -936,7 +936,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -936,7 +936,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|LOCALE_NOUSEROVERRIDE, buf, 256)) |LOCALE_NOUSEROVERRIDE, buf, 256))
loc->locinfo->lconv->n_sign_posn = atoi(buf); loc->locinfo->lconv->n_sign_posn = atoi(buf);
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
} else { } else {
...@@ -952,7 +952,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -952,7 +952,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
|| !loc->locinfo->lconv->mon_decimal_point || !loc->locinfo->lconv->mon_thousands_sep || !loc->locinfo->lconv->mon_decimal_point || !loc->locinfo->lconv->mon_thousands_sep
|| !loc->locinfo->lconv->mon_grouping || !loc->locinfo->lconv->positive_sign || !loc->locinfo->lconv->mon_grouping || !loc->locinfo->lconv->positive_sign
|| !loc->locinfo->lconv->negative_sign) { || !loc->locinfo->lconv->negative_sign) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -977,7 +977,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -977,7 +977,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(lcid[MSVCRT_LC_NUMERIC] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_NUMERIC)) { if(lcid[MSVCRT_LC_NUMERIC] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_NUMERIC)) {
if(update_threadlocinfo_category(lcid[MSVCRT_LC_NUMERIC], loc, MSVCRT_LC_NUMERIC)) { if(update_threadlocinfo_category(lcid[MSVCRT_LC_NUMERIC], loc, MSVCRT_LC_NUMERIC)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -985,7 +985,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -985,7 +985,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->lconv_intl_refcount = MSVCRT_malloc(sizeof(int));
loc->locinfo->lconv_num_refcount = MSVCRT_malloc(sizeof(int)); loc->locinfo->lconv_num_refcount = MSVCRT_malloc(sizeof(int));
if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_num_refcount) { if(!loc->locinfo->lconv_intl_refcount || !loc->locinfo->lconv_num_refcount) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -997,7 +997,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -997,7 +997,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->decimal_point = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->decimal_point = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->decimal_point, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->decimal_point, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -1006,7 +1006,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -1006,7 +1006,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(i && (loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(sizeof(char[i])))) if(i && (loc->locinfo->lconv->thousands_sep = MSVCRT_malloc(sizeof(char[i]))))
memcpy(loc->locinfo->lconv->thousands_sep, buf, sizeof(char[i])); memcpy(loc->locinfo->lconv->thousands_sep, buf, sizeof(char[i]));
else { else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -1021,7 +1021,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -1021,7 +1021,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(buf[i] != '0') if(buf[i] != '0')
loc->locinfo->lconv->grouping[i/2+1] = 127; loc->locinfo->lconv->grouping[i/2+1] = 127;
} else { } else {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
} else { } else {
...@@ -1030,7 +1030,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -1030,7 +1030,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
loc->locinfo->lconv->grouping = MSVCRT_malloc(sizeof(char)); loc->locinfo->lconv->grouping = MSVCRT_malloc(sizeof(char));
if(!loc->locinfo->lconv->decimal_point || !loc->locinfo->lconv->thousands_sep if(!loc->locinfo->lconv->decimal_point || !loc->locinfo->lconv->thousands_sep
|| !loc->locinfo->lconv->grouping) { || !loc->locinfo->lconv->grouping) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
...@@ -1044,7 +1044,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale) ...@@ -1044,7 +1044,7 @@ MSVCRT__locale_t _create_locale(int category, const char *locale)
if(lcid[MSVCRT_LC_TIME] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_TIME)) { if(lcid[MSVCRT_LC_TIME] && (category==MSVCRT_LC_ALL || category==MSVCRT_LC_TIME)) {
if(update_threadlocinfo_category(lcid[MSVCRT_LC_TIME], loc, MSVCRT_LC_TIME)) { if(update_threadlocinfo_category(lcid[MSVCRT_LC_TIME], loc, MSVCRT_LC_TIME)) {
_free_locale(loc); MSVCRT__free_locale(loc);
return NULL; return NULL;
} }
} else } else
...@@ -1067,7 +1067,7 @@ int CDECL _configthreadlocale(int type) ...@@ -1067,7 +1067,7 @@ int CDECL _configthreadlocale(int type)
if(type == MSVCRT__ENABLE_PER_THREAD_LOCALE) { if(type == MSVCRT__ENABLE_PER_THREAD_LOCALE) {
if(!data->locale) { if(!data->locale) {
/* Copy current global locale */ /* Copy current global locale */
data->locale = _create_locale(MSVCRT_LC_ALL, MSVCRT_setlocale(MSVCRT_LC_ALL, NULL)); data->locale = MSVCRT__create_locale(MSVCRT_LC_ALL, MSVCRT_setlocale(MSVCRT_LC_ALL, NULL));
if(!data->locale) if(!data->locale)
return -1; return -1;
} }
...@@ -1077,7 +1077,7 @@ int CDECL _configthreadlocale(int type) ...@@ -1077,7 +1077,7 @@ int CDECL _configthreadlocale(int type)
if(type == MSVCRT__DISABLE_PER_THREAD_LOCALE) { if(type == MSVCRT__DISABLE_PER_THREAD_LOCALE) {
if(data->locale) { if(data->locale) {
_free_locale(data->locale); MSVCRT__free_locale(data->locale);
data->locale = NULL; data->locale = NULL;
} }
...@@ -1109,7 +1109,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale) ...@@ -1109,7 +1109,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
return cur->locinfo->lc_category[category].locale; return cur->locinfo->lc_category[category].locale;
} }
loc = _create_locale(category, locale); loc = MSVCRT__create_locale(category, locale);
if(!loc) { if(!loc) {
WARN("%d %s failed\n", category, locale); WARN("%d %s failed\n", category, locale);
return NULL; return NULL;
...@@ -1220,7 +1220,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale) ...@@ -1220,7 +1220,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
if(!cur) if(!cur)
MSVCRT_locale = cur = loc; MSVCRT_locale = cur = loc;
else else
_free_locale(loc); MSVCRT__free_locale(loc);
UNLOCK_LOCALE; UNLOCK_LOCALE;
......
...@@ -69,7 +69,7 @@ static inline void msvcrt_free_tls_mem(void) ...@@ -69,7 +69,7 @@ static inline void msvcrt_free_tls_mem(void)
HeapFree(GetProcessHeap(),0,tls->asctime_buffer); HeapFree(GetProcessHeap(),0,tls->asctime_buffer);
HeapFree(GetProcessHeap(),0,tls->wasctime_buffer); HeapFree(GetProcessHeap(),0,tls->wasctime_buffer);
HeapFree(GetProcessHeap(),0,tls->strerror_buffer); HeapFree(GetProcessHeap(),0,tls->strerror_buffer);
_free_locale(tls->locale); MSVCRT__free_locale(tls->locale);
} }
HeapFree(GetProcessHeap(), 0, tls); HeapFree(GetProcessHeap(), 0, tls);
} }
...@@ -113,7 +113,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -113,7 +113,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msvcrt_free_tls_mem(); msvcrt_free_tls_mem();
if (!msvcrt_free_tls()) if (!msvcrt_free_tls())
return FALSE; return FALSE;
_free_locale(MSVCRT_locale); MSVCRT__free_locale(MSVCRT_locale);
TRACE("finished process free\n"); TRACE("finished process free\n");
break; break;
case DLL_THREAD_DETACH: case DLL_THREAD_DETACH:
......
...@@ -800,7 +800,7 @@ typedef struct MSVCRT_localeinfo_struct ...@@ -800,7 +800,7 @@ typedef struct MSVCRT_localeinfo_struct
extern MSVCRT__locale_t MSVCRT_locale; extern MSVCRT__locale_t MSVCRT_locale;
MSVCRT__locale_t get_locale(void); MSVCRT__locale_t get_locale(void);
void __cdecl _free_locale(MSVCRT__locale_t); void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
#ifndef __WINE_MSVCRT_TEST #ifndef __WINE_MSVCRT_TEST
int __cdecl MSVCRT__write(int,const void*,unsigned int); int __cdecl MSVCRT__write(int,const void*,unsigned int);
......
...@@ -1432,8 +1432,8 @@ ...@@ -1432,8 +1432,8 @@
# Functions not exported in native dll: # Functions not exported in native dll:
@ cdecl _get_invalid_parameter_handler() @ cdecl _get_invalid_parameter_handler()
@ cdecl _set_invalid_parameter_handler(ptr) @ cdecl _set_invalid_parameter_handler(ptr)
@ cdecl _create_locale(long str) @ cdecl _create_locale(long str) MSVCRT__create_locale
@ cdecl _free_locale(ptr) @ cdecl _free_locale(ptr) MSVCRT__free_locale
@ cdecl _configthreadlocale(long) @ cdecl _configthreadlocale(long)
@ cdecl _wcstod_l(wstr ptr) MSVCRT__wcstod_l @ cdecl _wcstod_l(wstr ptr) MSVCRT__wcstod_l
@ cdecl ___mb_cur_max_l_func(ptr) @ cdecl ___mb_cur_max_l_func(ptr)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment