Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1edd0f4d
Commit
1edd0f4d
authored
Jun 16, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Get rid of the LOCK_LOCALE macros.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c044cf41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
locale.c
dlls/msvcrt/locale.c
+8
-12
No files found.
dlls/msvcrt/locale.c
View file @
1edd0f4d
...
...
@@ -49,10 +49,6 @@ LCID MSVCRT___lc_handle[MSVCRT_LC_MAX - MSVCRT_LC_MIN + 1] = { 0 };
int
MSVCRT___mb_cur_max
=
1
;
static
unsigned
char
charmax
=
CHAR_MAX
;
/* MT */
#define LOCK_LOCALE _mlock(_SETLOCALE_LOCK);
#define UNLOCK_LOCALE _munlock(_SETLOCALE_LOCK);
#define MSVCRT_LEADBYTE 0x8000
#define MSVCRT_C1_DEFINED 0x200
...
...
@@ -1596,7 +1592,7 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
*/
void
CDECL
_lock_locales
(
void
)
{
LOCK_LOCALE
_mlock
(
_SETLOCALE_LOCK
);
}
/*********************************************************************
...
...
@@ -1604,7 +1600,7 @@ void CDECL _lock_locales(void)
*/
void
CDECL
_unlock_locales
(
void
)
{
UNLOCK_LOCALE
_munlock
(
_SETLOCALE_LOCK
);
}
/*********************************************************************
...
...
@@ -1661,7 +1657,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
return
NULL
;
}
LOCK_LOCALE
;
_lock_locales
()
;
if
(
locinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
]
!=
newlocinfo
->
lc_handle
[
MSVCRT_LC_COLLATE
]
||
locinfo
->
lc_id
[
MSVCRT_LC_COLLATE
].
wCodePage
!=
newlocinfo
->
lc_id
[
MSVCRT_LC_COLLATE
].
wCodePage
)
{
...
...
@@ -1816,7 +1812,7 @@ char* CDECL MSVCRT_setlocale(int category, const char* locale)
}
free_locinfo
(
newlocinfo
);
UNLOCK_LOCALE
;
_unlock_locales
()
;
if
(
locinfo
==
MSVCRT_locale
->
locinfo
)
{
int
i
;
...
...
@@ -1858,14 +1854,14 @@ MSVCRT_wchar_t* CDECL MSVCRT__wsetlocale(int category, const MSVCRT_wchar_t* wlo
MSVCRT_wcstombs
(
locale
,
wlocale
,
len
);
}
LOCK_LOCALE
;
_lock_locales
()
;
ret
=
MSVCRT_setlocale
(
category
,
locale
);
MSVCRT_free
(
locale
);
if
(
ret
&&
MSVCRT_mbstowcs
(
current_lc_all
,
ret
,
MAX_LOCALE_LENGTH
)
==-
1
)
ret
=
NULL
;
UNLOCK_LOCALE
;
_unlock_locales
()
;
return
ret
?
current_lc_all
:
NULL
;
}
...
...
@@ -1921,9 +1917,9 @@ BOOL msvcrt_init_locale(void)
{
int
i
;
LOCK_LOCALE
;
_lock_locales
()
;
MSVCRT_locale
=
MSVCRT__create_locale
(
0
,
"C"
);
UNLOCK_LOCALE
;
_unlock_locales
()
;
if
(
!
MSVCRT_locale
)
return
FALSE
;
...
...
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