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
5e9ee3b9
Commit
5e9ee3b9
authored
Jul 26, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fixed tmpnam and _wtmpname implementation.
parent
9fc0377f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
file.c
dlls/msvcrt/file.c
+2
-0
main.c
dlls/msvcrt/main.c
+2
-0
No files found.
dlls/msvcrt/file.c
View file @
5e9ee3b9
...
@@ -3683,6 +3683,7 @@ char * CDECL MSVCRT_tmpnam(char *s)
...
@@ -3683,6 +3683,7 @@ char * CDECL MSVCRT_tmpnam(char *s)
{
{
size
=
msvcrt_int_to_base32
(
tmpnam_unique
++
,
tmpstr
);
size
=
msvcrt_int_to_base32
(
tmpnam_unique
++
,
tmpstr
);
memcpy
(
p
,
tmpstr
,
size
);
memcpy
(
p
,
tmpstr
,
size
);
p
[
size
]
=
'\0'
;
if
(
GetFileAttributesA
(
s
)
==
INVALID_FILE_ATTRIBUTES
&&
if
(
GetFileAttributesA
(
s
)
==
INVALID_FILE_ATTRIBUTES
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
break
;
break
;
...
@@ -3714,6 +3715,7 @@ MSVCRT_wchar_t * CDECL MSVCRT_wtmpnam(MSVCRT_wchar_t *s)
...
@@ -3714,6 +3715,7 @@ MSVCRT_wchar_t * CDECL MSVCRT_wtmpnam(MSVCRT_wchar_t *s)
{
{
size
=
msvcrt_int_to_base32_w
(
tmpnam_unique
++
,
tmpstr
);
size
=
msvcrt_int_to_base32_w
(
tmpnam_unique
++
,
tmpstr
);
memcpy
(
p
,
tmpstr
,
size
*
sizeof
(
MSVCRT_wchar_t
));
memcpy
(
p
,
tmpstr
,
size
*
sizeof
(
MSVCRT_wchar_t
));
p
[
size
]
=
'\0'
;
if
(
GetFileAttributesW
(
s
)
==
INVALID_FILE_ATTRIBUTES
&&
if
(
GetFileAttributesW
(
s
)
==
INVALID_FILE_ATTRIBUTES
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
break
;
break
;
...
...
dlls/msvcrt/main.c
View file @
5e9ee3b9
...
@@ -74,6 +74,8 @@ static inline void msvcrt_free_tls_mem(void)
...
@@ -74,6 +74,8 @@ static inline void msvcrt_free_tls_mem(void)
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
strerror_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
strerror_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
wcserror_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
wcserror_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
time_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
time_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
tmpnam_buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
tls
->
wtmpnam_buffer
);
if
(
tls
->
have_locale
)
{
if
(
tls
->
have_locale
)
{
free_locinfo
(
tls
->
locinfo
);
free_locinfo
(
tls
->
locinfo
);
free_mbcinfo
(
tls
->
mbcinfo
);
free_mbcinfo
(
tls
->
mbcinfo
);
...
...
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