Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-05-13 19:00:06 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-05-13 19:00:06 +0400
commitb6c6ea43f30ee958ca1f0af950af01f683f7b5c9 (patch)
tree16b5a88b3b3ae4bad7bbe8747a6873b7a9ed2c02 /winsup/cygwin/environ.cc
parent136033a8528352fb63fd25534de9fc10173a2576 (diff)
* cygheap.h (cwdstuff): Convert to class. Make posix and dir private.
(cwdstuff::get_posix): New method. (cwdstuff::reset_posix): New method. * dcrt0.cc (dll_crt0_1): Call setlocale rather than _setlocale_r. * environ.cc (environ_init): Ditto. Prefer "C" locale over current codepage default locale. * path.cc (chdir): Use cwdstuff::get_posix method instead of accessing cwdstuff::posix directly. (cwdstuff::set): Defer creating posix path to first usage. (cwdstuff::get_posix): Create posix path if it's empty, and return it. (cwdstuff::get): Create posix path if it's empty. * strfuncs.cc (sys_cp_wcstombs): Use UTF-8 conversion in the "C" locale. (sys_cp_mbstowcs): Ditto. * syscalls.cc (gen_full_path_at): Fetch CWD posix path locked. (setlocale): Implement here. Reset CWD posix path.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r--winsup/cygwin/environ.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 8124e68b2..161b9d98f 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -790,16 +790,13 @@ environ_init (char **envp, int envc)
{
char *buf = (char *) alloca (i);
GetEnvironmentVariableA (lc_arr[lc], buf, i);
- if (_setlocale_r (_GLOBAL_REENT, LC_CTYPE, buf))
+ if (setlocale (LC_CTYPE, buf))
{
got_lc = true;
break;
}
}
}
- /* No matching POSIX environment variable, use current codepage. */
- if (!got_lc)
- _setlocale_r (_GLOBAL_REENT, LC_CTYPE, "en_US");
/* We also need the CYGWIN variable early to know the value of the
CYGWIN=upcaseenv setting for the below loop. */
if ((i = GetEnvironmentVariableA ("CYGWIN", NULL, 0)))