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
d4450b91
Commit
d4450b91
authored
Jan 20, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Jan 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr110: Fix __lc_time_data definition.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9189eb22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
locale.c
dlls/msvcrt/locale.c
+9
-0
msvcrt.h
dlls/msvcrt/msvcrt.h
+5
-0
time.c
dlls/msvcrt/time.c
+18
-4
No files found.
dlls/msvcrt/locale.c
View file @
d4450b91
...
...
@@ -1528,6 +1528,9 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
size
+=
ret
*
sizeof
(
MSVCRT_wchar_t
);
}
}
#if _MSVCR_VER >= 110
size
+=
LCIDToLocaleName
(
lcid
[
MSVCRT_LC_TIME
],
NULL
,
0
,
0
)
*
sizeof
(
MSVCRT_wchar_t
);
#endif
locinfo
->
lc_time_curr
=
MSVCRT_malloc
(
size
);
if
(
!
locinfo
->
lc_time_curr
)
{
...
...
@@ -1568,7 +1571,13 @@ static MSVCRT_pthreadlocinfo create_locinfo(int category,
(
MSVCRT_wchar_t
*
)
&
locinfo
->
lc_time_curr
->
data
[
ret
],
size
-
ret
)
*
sizeof
(
MSVCRT_wchar_t
);
}
}
#if _MSVCR_VER >= 110
locinfo
->
lc_time_curr
->
locname
=
(
MSVCRT_wchar_t
*
)
&
locinfo
->
lc_time_curr
->
data
[
ret
];
LCIDToLocaleName
(
lcid
[
MSVCRT_LC_TIME
],
locinfo
->
lc_time_curr
->
locname
,
(
size
-
ret
)
/
sizeof
(
MSVCRT_wchar_t
),
0
);
#else
locinfo
->
lc_time_curr
->
lcid
=
lcid
[
MSVCRT_LC_TIME
];
#endif
}
return
locinfo
;
...
...
dlls/msvcrt/msvcrt.h
View file @
d4450b91
...
...
@@ -132,7 +132,9 @@ typedef struct {
char
*
time
;
}
names
;
}
str
;
#if _MSVCR_VER < 110
LCID
lcid
;
#endif
int
unk
[
2
];
union
{
MSVCRT_wchar_t
*
wstr
[
43
];
...
...
@@ -148,6 +150,9 @@ typedef struct {
MSVCRT_wchar_t
*
time
;
}
names
;
}
wstr
;
#if _MSVCR_VER >= 110
MSVCRT_wchar_t
*
locname
;
#endif
char
data
[
1
];
}
MSVCRT___lc_time_data
;
...
...
dlls/msvcrt/time.c
View file @
d4450b91
...
...
@@ -946,6 +946,7 @@ static inline BOOL strftime_date(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma
char
*
format
;
SYSTEMTIME
st
;
MSVCRT_size_t
ret
;
LCID
lcid
;
st
.
wYear
=
mstm
->
tm_year
+
1900
;
st
.
wMonth
=
mstm
->
tm_mon
+
1
;
...
...
@@ -956,10 +957,16 @@ static inline BOOL strftime_date(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma
st
.
wSecond
=
mstm
->
tm_sec
;
st
.
wMilliseconds
=
0
;
#if _MSVCR_VER < 110
lcid
=
time_data
->
lcid
;
#else
lcid
=
LocaleNameToLCID
(
time_data
->
locname
,
0
);
#endif
format
=
alternate
?
time_data
->
str
.
names
.
date
:
time_data
->
str
.
names
.
short_date
;
ret
=
GetDateFormatA
(
time_data
->
lcid
,
0
,
&
st
,
format
,
NULL
,
0
);
ret
=
GetDateFormatA
(
lcid
,
0
,
&
st
,
format
,
NULL
,
0
);
if
(
ret
&&
ret
<
max
-*
pos
)
ret
=
GetDateFormatA
(
time_data
->
lcid
,
0
,
&
st
,
format
,
str
+*
pos
,
max
-*
pos
);
ret
=
GetDateFormatA
(
lcid
,
0
,
&
st
,
format
,
str
+*
pos
,
max
-*
pos
);
if
(
!
ret
)
{
*
str
=
0
;
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
...
...
@@ -978,6 +985,7 @@ static inline BOOL strftime_time(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma
{
SYSTEMTIME
st
;
MSVCRT_size_t
ret
;
LCID
lcid
;
st
.
wYear
=
mstm
->
tm_year
+
1900
;
st
.
wMonth
=
mstm
->
tm_mon
+
1
;
...
...
@@ -988,9 +996,15 @@ static inline BOOL strftime_time(char *str, MSVCRT_size_t *pos, MSVCRT_size_t ma
st
.
wSecond
=
mstm
->
tm_sec
;
st
.
wMilliseconds
=
0
;
ret
=
GetTimeFormatA
(
time_data
->
lcid
,
0
,
&
st
,
time_data
->
str
.
names
.
time
,
NULL
,
0
);
#if _MSVCR_VER < 110
lcid
=
time_data
->
lcid
;
#else
lcid
=
LocaleNameToLCID
(
time_data
->
locname
,
0
);
#endif
ret
=
GetTimeFormatA
(
lcid
,
0
,
&
st
,
time_data
->
str
.
names
.
time
,
NULL
,
0
);
if
(
ret
&&
ret
<
max
-*
pos
)
ret
=
GetTimeFormatA
(
time_data
->
lcid
,
0
,
&
st
,
time_data
->
str
.
names
.
time
,
ret
=
GetTimeFormatA
(
lcid
,
0
,
&
st
,
time_data
->
str
.
names
.
time
,
str
+*
pos
,
max
-*
pos
);
if
(
!
ret
)
{
*
str
=
0
;
...
...
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