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
7d41f9b3
Commit
7d41f9b3
authored
Jul 24, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _mktemp_s implementation.
parent
ce9d4b80
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
5 deletions
+45
-5
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
file.c
dlls/msvcrt/file.c
+39
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
io.h
include/msvcrt/io.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
7d41f9b3
...
...
@@ -1204,7 +1204,7 @@
@ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32
@ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64
@ cdecl _mktemp(str) msvcrt._mktemp
@
stub
_mktemp_s
@
cdecl _mktemp_s(str long) msvcrt.
_mktemp_s
@ cdecl _mktime32(ptr) msvcrt._mktime32
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
...
...
dlls/msvcr110/msvcr110.spec
View file @
7d41f9b3
...
...
@@ -1566,7 +1566,7 @@
@ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32
@ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64
@ cdecl _mktemp(str) msvcrt._mktemp
@
stub
_mktemp_s
@
cdecl _mktemp_s(str long) msvcrt.
_mktemp_s
@ cdecl _mktime32(ptr) msvcrt._mktime32
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
...
...
dlls/msvcr80/msvcr80.spec
View file @
7d41f9b3
...
...
@@ -875,7 +875,7 @@
@ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32
@ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64
@ cdecl _mktemp(str) msvcrt._mktemp
@
stub
_mktemp_s
@
cdecl _mktemp_s(str long) msvcrt.
_mktemp_s
@ cdecl _mktime32(ptr) msvcrt._mktime32
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
...
...
dlls/msvcr90/msvcr90.spec
View file @
7d41f9b3
...
...
@@ -853,7 +853,7 @@
@ cdecl _mkgmtime32(ptr) msvcrt._mkgmtime32
@ cdecl _mkgmtime64(ptr) msvcrt._mkgmtime64
@ cdecl _mktemp(str) msvcrt._mktemp
@
stub
_mktemp_s
@
cdecl _mktemp_s(str long) msvcrt.
_mktemp_s
@ cdecl _mktime32(ptr) msvcrt._mktime32
@ cdecl _mktime64(ptr) msvcrt._mktime64
@ cdecl _msize(ptr) msvcrt._msize
...
...
dlls/msvcrt/file.c
View file @
7d41f9b3
...
...
@@ -1682,6 +1682,45 @@ MSVCRT_intptr_t CDECL MSVCRT__get_osfhandle(int fd)
}
/*********************************************************************
* _mktemp_s (MSVCRT.@)
*/
int
CDECL
MSVCRT__mktemp_s
(
char
*
pattern
,
MSVCRT_size_t
size
)
{
DWORD
len
,
xno
,
id
;
if
(
!
MSVCRT_CHECK_PMT
(
pattern
!=
NULL
))
return
MSVCRT_EINVAL
;
for
(
len
=
0
;
len
<
size
;
len
++
)
if
(
!
pattern
[
len
])
break
;
if
(
!
MSVCRT_CHECK_PMT
(
len
!=
size
&&
len
>=
6
))
{
if
(
size
)
pattern
[
0
]
=
0
;
return
MSVCRT_EINVAL
;
}
for
(
xno
=
1
;
xno
<=
6
;
xno
++
)
if
(
!
MSVCRT_CHECK_PMT
(
pattern
[
len
-
xno
]
==
'X'
))
return
MSVCRT_EINVAL
;
id
=
GetCurrentProcessId
();
for
(
xno
=
1
;
xno
<
6
;
xno
++
)
{
pattern
[
len
-
xno
]
=
id
%
10
+
'0'
;
id
/=
10
;
}
for
(
pattern
[
len
-
6
]
=
'a'
;
pattern
[
len
-
6
]
<=
'z'
;
pattern
[
len
-
6
]
++
)
{
if
(
GetFileAttributesA
(
pattern
)
==
INVALID_FILE_ATTRIBUTES
)
return
0
;
}
pattern
[
0
]
=
0
;
*
MSVCRT__errno
()
=
MSVCRT_EEXIST
;
return
MSVCRT_EEXIST
;
}
/*********************************************************************
* _mktemp (MSVCRT.@)
*/
char
*
CDECL
MSVCRT__mktemp
(
char
*
pattern
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
7d41f9b3
...
...
@@ -830,7 +830,7 @@
@ cdecl _mkgmtime32(ptr) MSVCRT__mkgmtime32
@ cdecl _mkgmtime64(ptr) MSVCRT__mkgmtime64
@ cdecl _mktemp(str) MSVCRT__mktemp
# stub _mktemp_s(str long)
@ cdecl _mktemp_s(str long) MSVCRT__mktemp_s
@ cdecl _mktime32(ptr) MSVCRT__mktime32
@ cdecl _mktime64(ptr) MSVCRT__mktime64
@ cdecl _msize(ptr)
...
...
include/msvcrt/io.h
View file @
7d41f9b3
...
...
@@ -108,6 +108,7 @@ int __cdecl _locking(int,int,__msvcrt_long);
__msvcrt_long
__cdecl
_lseek
(
int
,
__msvcrt_long
,
int
);
__int64
__cdecl
_lseeki64
(
int
,
__int64
,
int
);
char
*
__cdecl
_mktemp
(
char
*
);
int
__cdecl
_mktemp_s
(
char
*
,
size_t
);
int
__cdecl
_open
(
const
char
*
,
int
,...);
int
__cdecl
_open_osfhandle
(
intptr_t
,
int
);
int
__cdecl
_pipe
(
int
*
,
unsigned
int
,
int
);
...
...
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