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
81c4f2a2
Commit
81c4f2a2
authored
Jan 28, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Forward _realloc_crt to realloc.
parent
7f184144
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
3 deletions
+40
-3
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
msvcr90.c
dlls/msvcr90/tests/msvcr90.c
+37
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
81c4f2a2
...
...
@@ -1042,7 +1042,7 @@
@ cdecl _putws(wstr) msvcrt._putws
@ stub _pwctype
@ cdecl _read(long ptr long) msvcrt._read
@
stub _realloc_crt
@
cdecl _realloc_crt(ptr long) msvcrt.realloc
@ cdecl _recalloc(ptr long long) msvcr90._recalloc
@ stub _recalloc_crt
@ stub _resetstkoflw
...
...
dlls/msvcr80/msvcr80.spec
View file @
81c4f2a2
...
...
@@ -890,7 +890,7 @@
@ cdecl _putws(wstr) msvcrt._putws
@ stub _pwctype
@ cdecl _read(long ptr long) msvcrt._read
@
stub _realloc_crt
@
cdecl _realloc_crt(ptr long) msvcrt.realloc
@ cdecl _recalloc(ptr long long) msvcr90._recalloc
@ stub _recalloc_crt
@ stub _resetstkoflw
...
...
dlls/msvcr90/msvcr90.spec
View file @
81c4f2a2
...
...
@@ -876,7 +876,7 @@
@ cdecl _putws(wstr) msvcrt._putws
@ stub _pwctype
@ cdecl _read(long ptr long) msvcrt._read
@
stub _realloc_crt
@
cdecl _realloc_crt(ptr long) msvcrt.realloc
@ cdecl _recalloc(ptr long long)
@ stub _recalloc_crt
@ stub _resetstkoflw
...
...
dlls/msvcr90/tests/msvcr90.c
View file @
81c4f2a2
...
...
@@ -75,6 +75,9 @@ static int (__cdecl *p_atoflt)(_CRT_FLOAT *, char *);
static
unsigned
int
(
__cdecl
*
p_set_abort_behavior
)(
unsigned
int
,
unsigned
int
);
static
int
(
__cdecl
*
p_sopen_s
)(
int
*
,
const
char
*
,
int
,
int
,
int
);
static
int
(
__cdecl
*
p_wsopen_s
)(
int
*
,
const
wchar_t
*
,
int
,
int
,
int
);
static
void
*
(
__cdecl
*
p_realloc_crt
)(
void
*
,
size_t
);
static
void
*
(
__cdecl
*
p_malloc
)(
size_t
);
static
void
(
__cdecl
*
p_free
)(
void
*
);
static
void
*
(
WINAPI
*
pEncodePointer
)(
void
*
);
...
...
@@ -753,6 +756,36 @@ static void test__wsopen_s(void)
ok
(
fd
==
-
1
,
"got %d
\n
"
,
fd
);
}
static
void
test__realloc_crt
(
void
)
{
void
*
mem
;
if
(
!
p_realloc_crt
)
{
win_skip
(
"_realloc_crt not found
\n
"
);
return
;
}
if
(
0
)
{
/* crashes on some systems starting Vista */
mem
=
p_realloc_crt
(
NULL
,
10
);
}
mem
=
p_malloc
(
10
);
ok
(
mem
!=
NULL
,
"memory not allocated
\n
"
);
mem
=
p_realloc_crt
(
mem
,
20
);
ok
(
mem
!=
NULL
,
"memory not reallocated
\n
"
);
mem
=
p_realloc_crt
(
mem
,
0
);
ok
(
mem
==
NULL
,
"memory not freed
\n
"
);
mem
=
p_realloc_crt
(
NULL
,
0
);
ok
(
mem
!=
NULL
,
"memory not (re)allocated for size 0
\n
"
);
p_free
(
mem
);
}
START_TEST
(
msvcr90
)
{
HMODULE
hcrt
;
...
...
@@ -788,6 +821,9 @@ START_TEST(msvcr90)
p_set_abort_behavior
=
(
void
*
)
GetProcAddress
(
hcrt
,
"_set_abort_behavior"
);
p_sopen_s
=
(
void
*
)
GetProcAddress
(
hcrt
,
"_sopen_s"
);
p_wsopen_s
=
(
void
*
)
GetProcAddress
(
hcrt
,
"_wsopen_s"
);
p_realloc_crt
=
(
void
*
)
GetProcAddress
(
hcrt
,
"_realloc_crt"
);
p_malloc
=
(
void
*
)
GetProcAddress
(
hcrt
,
"malloc"
);
p_free
=
(
void
*
)
GetProcAddress
(
hcrt
,
"free"
);
hkernel32
=
GetModuleHandleA
(
"kernel32.dll"
);
pEncodePointer
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"EncodePointer"
);
...
...
@@ -804,4 +840,5 @@ START_TEST(msvcr90)
test__set_abort_behavior
();
test__sopen_s
();
test__wsopen_s
();
test__realloc_crt
();
}
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