Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
cf27cb49
Commit
cf27cb49
authored
Oct 12, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't overwrite mbcinfo inside setlocale.
parent
e24438c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
locale.c
dlls/msvcrt/locale.c
+2
-3
main.c
dlls/msvcrt/main.c
+0
-1
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/msvcrt/locale.c
View file @
cf27cb49
...
...
@@ -364,7 +364,7 @@ MSVCRT_pthreadlocinfo get_locinfo(void) {
}
/* INTERNAL: returns pthreadlocinfo struct */
static
MSVCRT_pthreadmbcinfo
get_mbcinfo
(
void
)
{
MSVCRT_pthreadmbcinfo
get_mbcinfo
(
void
)
{
thread_data_t
*
data
=
msvcrt_get_thread_data
();
if
(
!
data
||
!
data
->
have_locale
)
...
...
@@ -1172,8 +1172,6 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
swap_pointers
((
void
**
)
&
locinfo
->
pclmap
,
(
void
**
)
&
loc
->
locinfo
->
pclmap
);
swap_pointers
((
void
**
)
&
locinfo
->
pcumap
,
(
void
**
)
&
loc
->
locinfo
->
pcumap
);
memcpy
(
get_mbcinfo
(),
loc
->
mbcinfo
,
sizeof
(
MSVCRT_threadmbcinfo
));
if
(
category
!=
MSVCRT_LC_ALL
)
break
;
/* fall through */
...
...
@@ -1323,5 +1321,6 @@ BOOL msvcrt_init_locale(void)
MSVCRT__pctype
=
MSVCRT_locale
->
locinfo
->
pctype
;
for
(
i
=
MSVCRT_LC_MIN
;
i
<=
MSVCRT_LC_MAX
;
i
++
)
MSVCRT___lc_handle
[
i
]
=
MSVCRT_locale
->
locinfo
->
lc_handle
[
i
];
_setmbcp
(
_MB_CP_ANSI
);
return
TRUE
;
}
dlls/msvcrt/main.c
View file @
cf27cb49
...
...
@@ -110,7 +110,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
msvcrt_init_console
();
msvcrt_init_args
();
msvcrt_init_signals
();
_setmbcp
(
_MB_CP_LOCALE
);
/* don't allow unloading msvcrt, we can't setup file handles twice */
LdrAddRefDll
(
0
,
hinstDLL
);
TRACE
(
"finished process init
\n
"
);
...
...
dlls/msvcrt/msvcrt.h
View file @
cf27cb49
...
...
@@ -883,6 +883,7 @@ int __cdecl MSVCRT_raise(int sig);
extern
MSVCRT__locale_t
MSVCRT_locale
;
MSVCRT_pthreadlocinfo
get_locinfo
(
void
);
MSVCRT_pthreadmbcinfo
get_mbcinfo
(
void
);
void
__cdecl
MSVCRT__free_locale
(
MSVCRT__locale_t
);
void
free_locinfo
(
MSVCRT_pthreadlocinfo
);
void
free_mbcinfo
(
MSVCRT_pthreadmbcinfo
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment