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
dd4c9358
Commit
dd4c9358
authored
Aug 17, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _wcreate_locale.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
48340bd1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
5 deletions
+79
-5
api-ms-win-crt-locale-l1-1-0.spec
...s-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+49
-0
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
locale.c
dlls/msvcrt/locale.c
+25
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-locale-l1-1-0/api-ms-win-crt-locale-l1-1-0.spec
View file @
dd4c9358
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
@ cdecl _lock_locales() ucrtbase._lock_locales
@ cdecl _lock_locales() ucrtbase._lock_locales
@ cdecl _setmbcp(long) ucrtbase._setmbcp
@ cdecl _setmbcp(long) ucrtbase._setmbcp
@ cdecl _unlock_locales() ucrtbase._unlock_locales
@ cdecl _unlock_locales() ucrtbase._unlock_locales
@
stub
_wcreate_locale
@
cdecl _wcreate_locale(long wstr) ucrtbase.
_wcreate_locale
@ cdecl _wsetlocale(long wstr) ucrtbase._wsetlocale
@ cdecl _wsetlocale(long wstr) ucrtbase._wsetlocale
@ cdecl localeconv() ucrtbase.localeconv
@ cdecl localeconv() ucrtbase.localeconv
@ cdecl setlocale(long str) ucrtbase.setlocale
@ cdecl setlocale(long str) ucrtbase.setlocale
dlls/msvcr110/msvcr110.spec
View file @
dd4c9358
...
@@ -1844,7 +1844,7 @@
...
@@ -1844,7 +1844,7 @@
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ extern _wcmdln MSVCRT__wcmdln
@ extern _wcmdln MSVCRT__wcmdln
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@
stub
_wcreate_locale
@
cdecl _wcreate_locale(long wstr) MSVCRT_
_wcreate_locale
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcserror(long) MSVCRT__wcserror
@ cdecl _wcserror(long) MSVCRT__wcserror
...
...
dlls/msvcr120/msvcr120.spec
View file @
dd4c9358
...
@@ -1862,7 +1862,7 @@
...
@@ -1862,7 +1862,7 @@
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ extern _wcmdln MSVCRT__wcmdln
@ extern _wcmdln MSVCRT__wcmdln
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@
stub
_wcreate_locale
@
cdecl _wcreate_locale(long wstr) MSVCRT_
_wcreate_locale
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcserror(long) MSVCRT__wcserror
@ cdecl _wcserror(long) MSVCRT__wcserror
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
dd4c9358
...
@@ -170,6 +170,8 @@ static double (CDECL *p_remainder)(double, double);
...
@@ -170,6 +170,8 @@ static double (CDECL *p_remainder)(double, double);
static
int
*
(
CDECL
*
p_errno
)(
void
);
static
int
*
(
CDECL
*
p_errno
)(
void
);
static
int
(
CDECL
*
p_fegetenv
)(
fenv_t
*
);
static
int
(
CDECL
*
p_fegetenv
)(
fenv_t
*
);
static
int
(
CDECL
*
p__clearfp
)(
void
);
static
int
(
CDECL
*
p__clearfp
)(
void
);
static
_locale_t
(
__cdecl
*
p_wcreate_locale
)(
int
,
const
wchar_t
*
);
static
void
(
__cdecl
*
p_free_locale
)(
_locale_t
);
/* make sure we use the correct errno */
/* make sure we use the correct errno */
#undef errno
#undef errno
...
@@ -215,6 +217,8 @@ static BOOL init(void)
...
@@ -215,6 +217,8 @@ static BOOL init(void)
p_wcstof
=
(
void
*
)
GetProcAddress
(
module
,
"wcstof"
);
p_wcstof
=
(
void
*
)
GetProcAddress
(
module
,
"wcstof"
);
p_remainder
=
(
void
*
)
GetProcAddress
(
module
,
"remainder"
);
p_remainder
=
(
void
*
)
GetProcAddress
(
module
,
"remainder"
);
p_errno
=
(
void
*
)
GetProcAddress
(
module
,
"_errno"
);
p_errno
=
(
void
*
)
GetProcAddress
(
module
,
"_errno"
);
p_wcreate_locale
=
(
void
*
)
GetProcAddress
(
module
,
"_wcreate_locale"
);
p_free_locale
=
(
void
*
)
GetProcAddress
(
module
,
"_free_locale"
);
SET
(
p_fegetenv
,
"fegetenv"
);
SET
(
p_fegetenv
,
"fegetenv"
);
SET
(
p__clearfp
,
"_clearfp"
);
SET
(
p__clearfp
,
"_clearfp"
);
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
if
(
sizeof
(
void
*
)
==
8
)
{
/* 64-bit initialization */
...
@@ -710,6 +714,50 @@ static void test_fegetenv(void)
...
@@ -710,6 +714,50 @@ static void test_fegetenv(void)
ok
(
!
env
.
status
,
"env.status = %x
\n
"
,
env
.
status
);
ok
(
!
env
.
status
,
"env.status = %x
\n
"
,
env
.
status
);
}
}
static
void
test__wcreate_locale
(
void
)
{
static
const
wchar_t
c_locale
[]
=
{
'C'
,
0
};
static
const
wchar_t
bogus
[]
=
{
'b'
,
'o'
,
'g'
,
'u'
,
's'
,
0
};
static
const
wchar_t
empty
[]
=
{
0
};
_locale_t
lcl
;
errno_t
e
;
/* simple success */
errno
=
-
1
;
lcl
=
p_wcreate_locale
(
LC_ALL
,
c_locale
);
e
=
errno
;
ok
(
!!
lcl
,
"expected success, but got NULL
\n
"
);
ok
(
errno
==
-
1
,
"expected errno -1, but got %i
\n
"
,
e
);
p_free_locale
(
lcl
);
errno
=
-
1
;
lcl
=
p_wcreate_locale
(
LC_ALL
,
empty
);
e
=
errno
;
ok
(
!!
lcl
,
"expected success, but got NULL
\n
"
);
ok
(
errno
==
-
1
,
"expected errno -1, but got %i
\n
"
,
e
);
p_free_locale
(
lcl
);
/* bogus category */
errno
=
-
1
;
lcl
=
p_wcreate_locale
(
-
1
,
c_locale
);
e
=
errno
;
ok
(
!
lcl
,
"expected failure, but got %p
\n
"
,
lcl
);
ok
(
errno
==
-
1
,
"expected errno -1, but got %i
\n
"
,
e
);
/* bogus names */
errno
=
-
1
;
lcl
=
p_wcreate_locale
(
LC_ALL
,
bogus
);
e
=
errno
;
ok
(
!
lcl
,
"expected failure, but got %p
\n
"
,
lcl
);
ok
(
errno
==
-
1
,
"expected errno -1, but got %i
\n
"
,
e
);
errno
=
-
1
;
lcl
=
p_wcreate_locale
(
LC_ALL
,
NULL
);
e
=
errno
;
ok
(
!
lcl
,
"expected failure, but got %p
\n
"
,
lcl
);
ok
(
errno
==
-
1
,
"expected errno -1, but got %i
\n
"
,
e
);
}
START_TEST
(
msvcr120
)
START_TEST
(
msvcr120
)
{
{
if
(
!
init
())
return
;
if
(
!
init
())
return
;
...
@@ -724,4 +772,5 @@ START_TEST(msvcr120)
...
@@ -724,4 +772,5 @@ START_TEST(msvcr120)
test_remainder
();
test_remainder
();
test_critical_section
();
test_critical_section
();
test_fegetenv
();
test_fegetenv
();
test__wcreate_locale
();
}
}
dlls/msvcr120_app/msvcr120_app.spec
View file @
dd4c9358
...
@@ -1555,7 +1555,7 @@
...
@@ -1555,7 +1555,7 @@
@ cdecl _wchmod(wstr long) msvcr120._wchmod
@ cdecl _wchmod(wstr long) msvcr120._wchmod
@ extern _wcmdln msvcr120._wcmdln
@ extern _wcmdln msvcr120._wcmdln
@ cdecl _wcreat(wstr long) msvcr120._wcreat
@ cdecl _wcreat(wstr long) msvcr120._wcreat
@
stub
_wcreate_locale
@
cdecl _wcreate_locale(long wstr) msvcr120.
_wcreate_locale
@ cdecl _wcscoll_l(wstr wstr ptr) msvcr120._wcscoll_l
@ cdecl _wcscoll_l(wstr wstr ptr) msvcr120._wcscoll_l
@ cdecl _wcsdup(wstr) msvcr120._wcsdup
@ cdecl _wcsdup(wstr) msvcr120._wcsdup
@ cdecl _wcserror(long) msvcr120._wcserror
@ cdecl _wcserror(long) msvcr120._wcserror
...
...
dlls/msvcrt/locale.c
View file @
dd4c9358
...
@@ -1634,6 +1634,31 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
...
@@ -1634,6 +1634,31 @@ MSVCRT__locale_t CDECL MSVCRT__create_locale(int category, const char *locale)
}
}
/*********************************************************************
/*********************************************************************
* _wcreate_locale (MSVCRT.@)
*/
MSVCRT__locale_t
CDECL
MSVCRT__wcreate_locale
(
int
category
,
const
MSVCRT_wchar_t
*
locale
)
{
MSVCRT__locale_t
loc
;
MSVCRT_size_t
len
;
char
*
str
;
if
(
category
<
MSVCRT_LC_MIN
||
category
>
MSVCRT_LC_MAX
||
!
locale
)
return
NULL
;
len
=
MSVCRT_wcstombs
(
NULL
,
locale
,
0
);
if
(
len
==
-
1
)
return
NULL
;
if
(
!
(
str
=
MSVCRT_malloc
(
++
len
)))
return
NULL
;
MSVCRT_wcstombs
(
str
,
locale
,
len
);
loc
=
MSVCRT__create_locale
(
category
,
str
);
MSVCRT_free
(
str
);
return
loc
;
}
/*********************************************************************
* setlocale (MSVCRT.@)
* setlocale (MSVCRT.@)
*/
*/
char
*
CDECL
MSVCRT_setlocale
(
int
category
,
const
char
*
locale
)
char
*
CDECL
MSVCRT_setlocale
(
int
category
,
const
char
*
locale
)
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
dd4c9358
...
@@ -2011,7 +2011,7 @@
...
@@ -2011,7 +2011,7 @@
@ cdecl _wchdir(wstr) MSVCRT__wchdir
@ cdecl _wchdir(wstr) MSVCRT__wchdir
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ cdecl _wchmod(wstr long) MSVCRT__wchmod
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@ cdecl _wcreat(wstr long) MSVCRT__wcreat
@
stub
_wcreate_locale
@
cdecl _wcreate_locale(long wstr) MSVCRT_
_wcreate_locale
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcscoll_l(wstr wstr ptr) MSVCRT__wcscoll_l
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcsdup(wstr) MSVCRT__wcsdup
@ cdecl _wcserror(long) MSVCRT__wcserror
@ cdecl _wcserror(long) MSVCRT__wcserror
...
...
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