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
cada88a6
Commit
cada88a6
authored
Nov 28, 2016
by
Daniel Lehman
Committed by
Alexandre Julliard
Nov 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add _lfind_s.
Signed-off-by:
Daniel Lehman
<
dlehman25@gmail.com
>
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ac02423
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
107 additions
and
9 deletions
+107
-9
api-ms-win-crt-utility-l1-1-0.spec
...win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+1
-1
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
misc.c
dlls/msvcrt/misc.c
+26
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
misc.c
dlls/msvcrt/tests/misc.c
+72
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+1
-1
No files found.
dlls/api-ms-win-crt-utility-l1-1-0/api-ms-win-crt-utility-l1-1-0.spec
View file @
cada88a6
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
@ cdecl _byteswap_ulong(long) ucrtbase._byteswap_ulong
@ cdecl _byteswap_ulong(long) ucrtbase._byteswap_ulong
@ cdecl _byteswap_ushort(long) ucrtbase._byteswap_ushort
@ cdecl _byteswap_ushort(long) ucrtbase._byteswap_ushort
@ cdecl _lfind(ptr ptr ptr long ptr) ucrtbase._lfind
@ cdecl _lfind(ptr ptr ptr long ptr) ucrtbase._lfind
@
stub
_lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr) ucrtbase.
_lfind_s
@ cdecl _lrotl(long long) ucrtbase._lrotl
@ cdecl _lrotl(long long) ucrtbase._lrotl
@ cdecl _lrotr(long long) ucrtbase._lrotr
@ cdecl _lrotr(long long) ucrtbase._lrotr
@ cdecl _lsearch(ptr ptr ptr long ptr) ucrtbase._lsearch
@ cdecl _lsearch(ptr ptr ptr long ptr) ucrtbase._lsearch
...
...
dlls/msvcr100/msvcr100.spec
View file @
cada88a6
...
@@ -1040,7 +1040,7 @@
...
@@ -1040,7 +1040,7 @@
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _kbhit()
@ cdecl _kbhit()
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl _loaddll(str)
@ cdecl _loaddll(str)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl -arch=i386 _local_unwind2(ptr long)
...
...
dlls/msvcr110/msvcr110.spec
View file @
cada88a6
...
@@ -1386,7 +1386,7 @@
...
@@ -1386,7 +1386,7 @@
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _kbhit()
@ cdecl _kbhit()
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
...
...
dlls/msvcr120/msvcr120.spec
View file @
cada88a6
...
@@ -1396,7 +1396,7 @@
...
@@ -1396,7 +1396,7 @@
@ cdecl _ldsign(double) MSVCR120__dsign
@ cdecl _ldsign(double) MSVCR120__dsign
@ cdecl _ldtest(ptr) MSVCR120__ldtest
@ cdecl _ldtest(ptr) MSVCR120__ldtest
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
...
...
dlls/msvcr120_app/msvcr120_app.spec
View file @
cada88a6
...
@@ -1260,7 +1260,7 @@
...
@@ -1260,7 +1260,7 @@
@ cdecl _ldsign(double) msvcr120._ldsign
@ cdecl _ldsign(double) msvcr120._ldsign
@ cdecl _ldtest(ptr) msvcr120._ldtest
@ cdecl _ldtest(ptr) msvcr120._ldtest
@ cdecl _lfind(ptr ptr ptr long ptr) msvcr120._lfind
@ cdecl _lfind(ptr ptr ptr long ptr) msvcr120._lfind
@
stub
_lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr) msvcr120.
_lfind_s
@ cdecl -arch=i386 _libm_sse2_acos_precise() msvcr120._libm_sse2_acos_precise
@ cdecl -arch=i386 _libm_sse2_acos_precise() msvcr120._libm_sse2_acos_precise
@ cdecl -arch=i386 _libm_sse2_asin_precise() msvcr120._libm_sse2_asin_precise
@ cdecl -arch=i386 _libm_sse2_asin_precise() msvcr120._libm_sse2_asin_precise
@ cdecl -arch=i386 _libm_sse2_atan_precise() msvcr120._libm_sse2_atan_precise
@ cdecl -arch=i386 _libm_sse2_atan_precise() msvcr120._libm_sse2_atan_precise
...
...
dlls/msvcr80/msvcr80.spec
View file @
cada88a6
...
@@ -712,7 +712,7 @@
...
@@ -712,7 +712,7 @@
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _kbhit()
@ cdecl _kbhit()
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl _loaddll(str)
@ cdecl _loaddll(str)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl -arch=i386 _local_unwind2(ptr long)
...
...
dlls/msvcr90/msvcr90.spec
View file @
cada88a6
...
@@ -690,7 +690,7 @@
...
@@ -690,7 +690,7 @@
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _kbhit()
@ cdecl _kbhit()
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl _loaddll(str)
@ cdecl _loaddll(str)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl -arch=i386 _local_unwind2(ptr long)
...
...
dlls/msvcrt/misc.c
View file @
cada88a6
...
@@ -103,6 +103,32 @@ void* CDECL _lfind(const void* match, const void* start,
...
@@ -103,6 +103,32 @@ void* CDECL _lfind(const void* match, const void* start,
}
}
/*********************************************************************
/*********************************************************************
* _lfind_s (MSVCRT.@)
*/
void
*
CDECL
_lfind_s
(
const
void
*
match
,
const
void
*
start
,
unsigned
int
*
array_size
,
unsigned
int
elem_size
,
int
(
CDECL
*
cf
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
context
)
{
unsigned
int
size
;
if
(
!
MSVCRT_CHECK_PMT
(
match
!=
NULL
))
return
NULL
;
if
(
!
MSVCRT_CHECK_PMT
(
array_size
!=
NULL
))
return
NULL
;
if
(
!
MSVCRT_CHECK_PMT
(
start
!=
NULL
||
*
array_size
==
0
))
return
NULL
;
if
(
!
MSVCRT_CHECK_PMT
(
cf
!=
NULL
))
return
NULL
;
if
(
!
MSVCRT_CHECK_PMT
(
elem_size
!=
0
))
return
NULL
;
size
=
*
array_size
;
if
(
size
)
do
{
if
(
cf
(
context
,
match
,
start
)
==
0
)
return
(
void
*
)
start
;
/* found */
start
=
(
const
char
*
)
start
+
elem_size
;
}
while
(
--
size
);
return
NULL
;
}
/*********************************************************************
* _lsearch (MSVCRT.@)
* _lsearch (MSVCRT.@)
*/
*/
void
*
CDECL
_lsearch
(
const
void
*
match
,
void
*
start
,
void
*
CDECL
_lsearch
(
const
void
*
match
,
void
*
start
,
...
...
dlls/msvcrt/msvcrt.spec
View file @
cada88a6
...
@@ -655,7 +655,7 @@
...
@@ -655,7 +655,7 @@
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _jn(long double) MSVCRT__jn
@ cdecl _kbhit()
@ cdecl _kbhit()
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
# stub
_lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl
_lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl _loaddll(str)
@ cdecl _loaddll(str)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=x86_64 _local_unwind(ptr ptr)
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl -arch=i386 _local_unwind2(ptr long)
...
...
dlls/msvcrt/tests/misc.c
View file @
cada88a6
...
@@ -59,6 +59,8 @@ static void (__cdecl *p_qsort_s)(void*, MSVCRT_size_t, MSVCRT_size_t,
...
@@ -59,6 +59,8 @@ static void (__cdecl *p_qsort_s)(void*, MSVCRT_size_t, MSVCRT_size_t,
static
double
(
__cdecl
*
p_atan
)(
double
);
static
double
(
__cdecl
*
p_atan
)(
double
);
static
double
(
__cdecl
*
p_exp
)(
double
);
static
double
(
__cdecl
*
p_exp
)(
double
);
static
double
(
__cdecl
*
p_tanh
)(
double
);
static
double
(
__cdecl
*
p_tanh
)(
double
);
static
void
*
(
__cdecl
*
p_lfind_s
)(
const
void
*
,
const
void
*
,
unsigned
int
*
,
size_t
,
int
(
__cdecl
*
)(
void
*
,
const
void
*
,
const
void
*
),
void
*
);
static
void
init
(
void
)
static
void
init
(
void
)
{
{
...
@@ -76,6 +78,7 @@ static void init(void)
...
@@ -76,6 +78,7 @@ static void init(void)
p_atan
=
(
void
*
)
GetProcAddress
(
hmod
,
"atan"
);
p_atan
=
(
void
*
)
GetProcAddress
(
hmod
,
"atan"
);
p_exp
=
(
void
*
)
GetProcAddress
(
hmod
,
"exp"
);
p_exp
=
(
void
*
)
GetProcAddress
(
hmod
,
"exp"
);
p_tanh
=
(
void
*
)
GetProcAddress
(
hmod
,
"tanh"
);
p_tanh
=
(
void
*
)
GetProcAddress
(
hmod
,
"tanh"
);
p_lfind_s
=
(
void
*
)
GetProcAddress
(
hmod
,
"_lfind_s"
);
}
}
static
void
test_rand_s
(
void
)
static
void
test_rand_s
(
void
)
...
@@ -597,6 +600,74 @@ static void test_thread_handle_close(void)
...
@@ -597,6 +600,74 @@ static void test_thread_handle_close(void)
ok
(
ret
,
"ret = %d
\n
"
,
ret
);
ok
(
ret
,
"ret = %d
\n
"
,
ret
);
}
}
static
int
__cdecl
_lfind_s_comp
(
void
*
ctx
,
const
void
*
l
,
const
void
*
r
)
{
*
(
int
*
)
ctx
=
0xdeadc0de
;
return
*
(
int
*
)
l
-
*
(
int
*
)
r
;
}
static
void
test__lfind_s
(
void
)
{
static
const
int
tests
[]
=
{
9000
,
8001
,
7002
,
6003
,
1003
,
5004
,
4005
,
3006
,
2007
};
unsigned
int
num
;
void
*
found
;
int
ctx
;
int
key
;
if
(
!
p_lfind_s
)
{
win_skip
(
"_lfind_s is not available
\n
"
);
return
;
}
key
=
1234
;
num
=
sizeof
(
tests
)
/
sizeof
(
tests
[
0
]);
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
NULL
,
tests
,
&
num
,
sizeof
(
int
),
_lfind_s_comp
,
NULL
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
ok
(
!
found
,
"Expected NULL, got %p
\n
"
,
found
);
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
NULL
,
&
num
,
sizeof
(
int
),
_lfind_s_comp
,
NULL
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
ok
(
!
found
,
"Expected NULL, got %p
\n
"
,
found
);
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
tests
,
&
num
,
0
,
_lfind_s_comp
,
NULL
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
ok
(
!
found
,
"Expected NULL, got %p
\n
"
,
found
);
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
tests
,
&
num
,
sizeof
(
int
),
NULL
,
NULL
);
ok
(
errno
==
EINVAL
,
"errno = %d
\n
"
,
errno
);
ok
(
!
found
,
"Expected NULL, got %p
\n
"
,
found
);
ctx
=
-
1
;
key
=
9000
;
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
tests
,
&
num
,
sizeof
(
int
),
_lfind_s_comp
,
&
ctx
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ok
(
found
==
tests
,
"Expected %p, got %p
\n
"
,
tests
,
found
);
ok
(
ctx
==
0xdeadc0de
,
"Expected 0xdeadc0de, got %x
\n
"
,
ctx
);
ctx
=
-
1
;
key
=
2007
;
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
tests
,
&
num
,
sizeof
(
int
),
_lfind_s_comp
,
&
ctx
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ok
(
found
==
tests
+
8
,
"Expected %p, got %p
\n
"
,
tests
+
8
,
found
);
ok
(
ctx
==
0xdeadc0de
,
"Expected 0xdeadc0de, got %x
\n
"
,
ctx
);
ctx
=
-
1
;
key
=
1234
;
errno
=
0xdeadbeef
;
found
=
p_lfind_s
(
&
key
,
tests
,
&
num
,
sizeof
(
int
),
_lfind_s_comp
,
&
ctx
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ok
(
!
found
,
"Expected NULL, got %p
\n
"
,
found
);
ok
(
ctx
==
0xdeadc0de
,
"Expected 0xdeadc0de, got %x
\n
"
,
ctx
);
}
START_TEST
(
misc
)
START_TEST
(
misc
)
{
{
int
arg_c
;
int
arg_c
;
...
@@ -626,4 +697,5 @@ START_TEST(misc)
...
@@ -626,4 +697,5 @@ START_TEST(misc)
test_qsort_s
();
test_qsort_s
();
test_math_functions
();
test_math_functions
();
test_thread_handle_close
();
test_thread_handle_close
();
test__lfind_s
();
}
}
dlls/ucrtbase/ucrtbase.spec
View file @
cada88a6
...
@@ -542,7 +542,7 @@
...
@@ -542,7 +542,7 @@
@ cdecl _ldtest(ptr) MSVCR120__ldtest
@ cdecl _ldtest(ptr) MSVCR120__ldtest
@ stub _ldunscale
@ stub _ldunscale
@ cdecl _lfind(ptr ptr ptr long ptr)
@ cdecl _lfind(ptr ptr ptr long ptr)
@
stub _lfind_s
@
cdecl _lfind_s(ptr ptr ptr long ptr ptr)
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_acos_precise() MSVCRT___libm_sse2_acos
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_asin_precise() MSVCRT___libm_sse2_asin
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
@ cdecl -arch=i386 _libm_sse2_atan_precise() MSVCRT___libm_sse2_atan
...
...
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