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
481a8036
Commit
481a8036
authored
Aug 31, 2012
by
Dan Kegel
Committed by
Alexandre Julliard
Sep 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr100: Add wmemmove_s and wmemcpy_s.
parent
7fec7678
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
2 deletions
+68
-2
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
msvcr100.c
dlls/msvcr100/msvcr100.c
+55
-0
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
Makefile.in
dlls/msvcr100/tests/Makefile.in
+9
-0
msvcr100.c
dlls/msvcr100/tests/msvcr100.c
+0
-0
No files found.
configure
View file @
481a8036
...
...
@@ -15483,6 +15483,7 @@ wine_fn_config_dll msvcp80 enable_msvcp80
wine_fn_config_dll msvcp90 enable_msvcp90
wine_fn_config_test dlls/msvcp90/tests msvcp90_test
wine_fn_config_dll msvcr100 enable_msvcr100
wine_fn_config_test dlls/msvcr100/tests msvcr100_test
wine_fn_config_dll msvcr70 enable_msvcr70 implib
wine_fn_config_dll msvcr71 enable_msvcr71 implib
wine_fn_config_dll msvcr80 enable_msvcr80
...
...
configure.ac
View file @
481a8036
...
...
@@ -2780,6 +2780,7 @@ WINE_CONFIG_DLL(msvcp80)
WINE_CONFIG_DLL(msvcp90)
WINE_CONFIG_TEST(dlls/msvcp90/tests)
WINE_CONFIG_DLL(msvcr100)
WINE_CONFIG_TEST(dlls/msvcr100/tests)
WINE_CONFIG_DLL(msvcr70,,[implib])
WINE_CONFIG_DLL(msvcr71,,[implib])
WINE_CONFIG_DLL(msvcr80)
...
...
dlls/msvcr100/msvcr100.c
View file @
481a8036
...
...
@@ -21,9 +21,64 @@
#include <stdarg.h>
#include "stdio.h"
#include "stdlib.h"
#include "errno.h"
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
#define INVALID_PMT(x,err) (*_errno() = (err), _invalid_parameter(NULL, NULL, NULL, 0, 0))
#define CHECK_PMT_ERR(x,err) ((x) || (INVALID_PMT( 0, (err) ), FALSE))
#define CHECK_PMT(x) CHECK_PMT_ERR((x), EINVAL)
/*********************************************************************
* wmemcpy_s (MSVCR100.@)
*/
int
CDECL
wmemcpy_s
(
wchar_t
*
dest
,
size_t
numberOfElements
,
const
wchar_t
*
src
,
size_t
count
)
{
TRACE
(
"(%p %lu %p %lu)
\n
"
,
dest
,
(
unsigned
long
)
numberOfElements
,
src
,
(
unsigned
long
)
count
);
if
(
!
count
)
return
0
;
if
(
!
CHECK_PMT
(
dest
!=
NULL
))
return
EINVAL
;
if
(
!
CHECK_PMT
(
src
!=
NULL
))
{
memset
(
dest
,
0
,
numberOfElements
*
sizeof
(
wchar_t
));
return
EINVAL
;
}
if
(
!
CHECK_PMT_ERR
(
count
<=
numberOfElements
,
ERANGE
))
{
memset
(
dest
,
0
,
numberOfElements
*
sizeof
(
wchar_t
));
return
ERANGE
;
}
memcpy
(
dest
,
src
,
sizeof
(
wchar_t
)
*
count
);
return
0
;
}
/*********************************************************************
* wmemmove_s (MSVCR100.@)
*/
int
CDECL
wmemmove_s
(
wchar_t
*
dest
,
size_t
numberOfElements
,
const
wchar_t
*
src
,
size_t
count
)
{
TRACE
(
"(%p %lu %p %lu)
\n
"
,
dest
,
(
unsigned
long
)
numberOfElements
,
src
,
(
unsigned
long
)
count
);
if
(
!
count
)
return
0
;
/* Native does not seem to conform to 6.7.1.2.3 in
* http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1225.pdf
* in that it does not zero the output buffer on constraint violation.
*/
if
(
!
CHECK_PMT
(
dest
!=
NULL
))
return
EINVAL
;
if
(
!
CHECK_PMT
(
src
!=
NULL
))
return
EINVAL
;
if
(
!
CHECK_PMT_ERR
(
count
<=
numberOfElements
,
ERANGE
))
return
ERANGE
;
memmove
(
dest
,
src
,
sizeof
(
wchar_t
)
*
count
);
return
0
;
}
/*********************************************************************
* DllMain (MSVCR100.@)
...
...
dlls/msvcr100/msvcr100.spec
View file @
481a8036
...
...
@@ -1876,8 +1876,8 @@
@ cdecl wctob(long) msvcrt.wctob
@ cdecl wctomb(ptr long) msvcrt.wctomb
@ stub wctomb_s
@
stub wmemcpy_s
@
stub wmemmove_s
@
cdecl wmemcpy_s(ptr long ptr long)
@
cdecl wmemmove_s(ptr long ptr long)
@ varargs wprintf(wstr) msvcrt.wprintf
@ varargs wprintf_s(wstr) msvcrt.wprintf_s
@ varargs wscanf(wstr) msvcrt.wscanf
...
...
dlls/msvcr100/tests/Makefile.in
0 → 100644
View file @
481a8036
TESTDLL
=
msvcr100.dll
APPMODE
=
-mno-cygwin
MODCFLAGS
=
@BUILTINFLAG@
EXTRAINCL
=
-I
$(top_srcdir)
/include/msvcrt
C_SRCS
=
\
msvcr100.c
@MAKE_TEST_RULES@
dlls/msvcr100/tests/msvcr100.c
0 → 100644
View file @
481a8036
This diff is collapsed.
Click to expand it.
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