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
1b4bacea
Commit
1b4bacea
authored
Apr 19, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added fopen_s implementation.
parent
8adfd63c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
4 deletions
+32
-4
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
file.c
dlls/msvcrt/file.c
+29
-1
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
No files found.
dlls/msvcr80/msvcr80.spec
View file @
1b4bacea
...
...
@@ -1259,7 +1259,7 @@
@ cdecl floor(double) msvcrt.floor
@ cdecl fmod(double double) msvcrt.fmod
@ cdecl fopen(str str) msvcrt.fopen
@
stub
fopen_s
@
cdecl fopen_s(ptr str str) msvcrt.
fopen_s
@ varargs fprintf(ptr str) msvcrt.fprintf
@ stub fprintf_s
@ cdecl fputc(long ptr) msvcrt.fputc
...
...
dlls/msvcr90/msvcr90.spec
View file @
1b4bacea
...
...
@@ -1243,7 +1243,7 @@
@ cdecl floor(double) msvcrt.floor
@ cdecl fmod(double double) msvcrt.fmod
@ cdecl fopen(str str) msvcrt.fopen
@
stub
fopen_s
@
cdecl fopen_s(ptr str str) msvcrt.
fopen_s
@ varargs fprintf(ptr str) msvcrt.fprintf
@ stub fprintf_s
@ cdecl fputc(long ptr) msvcrt.fputc
...
...
dlls/msvcrt/file.c
View file @
1b4bacea
...
...
@@ -218,6 +218,7 @@ static int msvcrt_alloc_fd_from(HANDLE hand, int flag, int fd)
if
(
fd
>=
MSVCRT_MAX_FILES
)
{
WARN
(
":files exhausted!
\n
"
);
*
MSVCRT__errno
()
=
MSVCRT_ENFILE
;
return
-
1
;
}
MSVCRT_fdesc
[
fd
].
handle
=
hand
;
...
...
@@ -1033,6 +1034,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
*
stream_flags
=
plus
?
MSVCRT__IORW
:
MSVCRT__IOWRT
;
break
;
default:
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
-
1
;
}
...
...
@@ -2649,10 +2652,16 @@ MSVCRT_FILE * CDECL MSVCRT__fsopen(const char *path, const char *mode, int share
MSVCRT_FILE
*
ret
;
MSVCRT_wchar_t
*
pathW
=
NULL
,
*
modeW
=
NULL
;
if
(
path
&&
!
(
pathW
=
msvcrt_wstrdupa
(
path
)))
return
NULL
;
if
(
path
&&
!
(
pathW
=
msvcrt_wstrdupa
(
path
)))
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
if
(
mode
&&
!
(
modeW
=
msvcrt_wstrdupa
(
mode
)))
{
MSVCRT_free
(
pathW
);
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
NULL
;
}
...
...
@@ -2672,6 +2681,25 @@ MSVCRT_FILE * CDECL MSVCRT_fopen(const char *path, const char *mode)
}
/*********************************************************************
* fopen_s (MSVCRT.@)
*/
int
CDECL
MSVCRT_fopen_s
(
MSVCRT_FILE
**
pFile
,
const
char
*
filename
,
const
char
*
mode
)
{
if
(
!
pFile
)
{
MSVCRT__invalid_parameter
(
NULL
,
NULL
,
NULL
,
0
,
0
);
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
*
pFile
=
MSVCRT_fopen
(
filename
,
mode
);
if
(
!*
pFile
)
return
*
MSVCRT__errno
();
return
0
;
}
/*********************************************************************
* _wfopen (MSVCRT.@)
*/
MSVCRT_FILE
*
CDECL
MSVCRT__wfopen
(
const
MSVCRT_wchar_t
*
path
,
const
MSVCRT_wchar_t
*
mode
)
...
...
dlls/msvcrt/msvcrt.spec
View file @
1b4bacea
...
...
@@ -1190,7 +1190,7 @@
@ cdecl floor(double) MSVCRT_floor
@ cdecl fmod(double double) MSVCRT_fmod
@ cdecl fopen(str str) MSVCRT_fopen
# stub
fopen_s
@ cdecl fopen_s(ptr str str) MSVCRT_
fopen_s
@ varargs fprintf(ptr str) MSVCRT_fprintf
# stub fprintf_s
@ cdecl fputc(long ptr) MSVCRT_fputc
...
...
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