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
d9a0c55e
Commit
d9a0c55e
authored
Apr 05, 2016
by
Daniel Lehman
Committed by
Alexandre Julliard
Apr 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr120: Add remainder.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5bf43458
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
110 additions
and
12 deletions
+110
-12
configure
configure
+2
-0
configure.ac
configure.ac
+2
-0
api-ms-win-crt-math-l1-1-0.spec
...pi-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
+3
-3
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+3
-3
msvcr120.c
dlls/msvcr120/tests/msvcr120.c
+48
-0
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+3
-3
math.c
dlls/msvcrt/math.c
+40
-0
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+3
-3
config.h.in
include/config.h.in
+6
-0
No files found.
configure
View file @
d9a0c55e
...
...
@@ -16876,6 +16876,8 @@ for ac_func in \
lrintf
\
lround
\
lroundf
\
remainder
\
remainderf
\
rint
\
rintf
\
round
\
...
...
configure.ac
View file @
d9a0c55e
...
...
@@ -2534,6 +2534,8 @@ AC_CHECK_FUNCS(\
lrintf \
lround \
lroundf \
remainder \
remainderf \
rint \
rintf \
round \
...
...
dlls/api-ms-win-crt-math-l1-1-0/api-ms-win-crt-math-l1-1-0.spec
View file @
d9a0c55e
...
...
@@ -304,9 +304,9 @@
@ stub norml
@ cdecl pow(double double) ucrtbase.pow
@ cdecl -arch=arm,x86_64 powf(float float) ucrtbase.powf
@
stub
remainder
@
stub
remainderf
@
stub
remainderl
@
cdecl remainder(double double) ucrtbase.
remainder
@
cdecl remainderf(float float) ucrtbase.
remainderf
@
cdecl remainderl(double double) ucrtbase.
remainderl
@ stub remquo
@ stub remquof
@ stub remquol
...
...
dlls/msvcr120/msvcr120.spec
View file @
d9a0c55e
...
...
@@ -2324,9 +2324,9 @@
@ cdecl rand() MSVCRT_rand
@ cdecl rand_s(ptr) MSVCRT_rand_s
@ cdecl realloc(ptr long) MSVCRT_realloc
@
stub
remainder
@
stub
remainderf
@
stub
remainderl
@
cdecl remainder(double double) MSVCR120_
remainder
@
cdecl remainderf(float float) MSVCR120_
remainderf
@
cdecl remainderl(double double) MSVCR120_
remainderl
@ cdecl remove(str) MSVCRT_remove
@ stub remquo
@ stub remquof
...
...
dlls/msvcr120/tests/msvcr120.c
View file @
d9a0c55e
...
...
@@ -88,6 +88,12 @@ static void (CDECL *p_free)(void*);
static
float
(
CDECL
*
p_strtof
)(
const
char
*
,
char
**
);
static
int
(
CDECL
*
p__finite
)(
double
);
static
float
(
CDECL
*
p_wcstof
)(
const
wchar_t
*
,
wchar_t
**
);
static
double
(
CDECL
*
p_remainder
)(
double
,
double
);
static
int
*
(
CDECL
*
p_errno
)(
void
);
/* make sure we use the correct errno */
#undef errno
#define errno (*p_errno())
static
BOOL
init
(
void
)
{
...
...
@@ -113,6 +119,8 @@ static BOOL init(void)
p_strtof
=
(
void
*
)
GetProcAddress
(
module
,
"strtof"
);
p__finite
=
(
void
*
)
GetProcAddress
(
module
,
"_finite"
);
p_wcstof
=
(
void
*
)
GetProcAddress
(
module
,
"wcstof"
);
p_remainder
=
(
void
*
)
GetProcAddress
(
module
,
"remainder"
);
p_errno
=
(
void
*
)
GetProcAddress
(
module
,
"_errno"
);
return
TRUE
;
}
...
...
@@ -389,6 +397,45 @@ static void test__strtof(void)
p_setlocale
(
LC_ALL
,
"C"
);
}
static
void
test_remainder
(
void
)
{
struct
{
double
x
,
y
,
r
;
errno_t
e
;
}
tests
[]
=
{
{
3
.
0
,
2
.
0
,
-
1
.
0
,
-
1
},
{
1
.
0
,
1
.
0
,
0
.
0
,
-
1
},
{
INFINITY
,
0
.
0
,
NAN
,
EDOM
},
{
INFINITY
,
42
.
0
,
NAN
,
EDOM
},
{
NAN
,
0
.
0
,
NAN
,
EDOM
},
{
NAN
,
42
.
0
,
NAN
,
EDOM
},
{
0
.
0
,
INFINITY
,
0
.
0
,
-
1
},
{
42
.
0
,
INFINITY
,
42
.
0
,
-
1
},
{
0
.
0
,
NAN
,
NAN
,
EDOM
},
{
42
.
0
,
NAN
,
NAN
,
EDOM
},
{
1
.
0
,
0
.
0
,
NAN
,
EDOM
},
{
INFINITY
,
INFINITY
,
NAN
,
EDOM
},
};
errno_t
e
;
double
r
;
int
i
;
if
(
sizeof
(
void
*
)
!=
8
)
/* errno handling slightly different on 32-bit */
return
;
for
(
i
=
0
;
i
<
sizeof
(
tests
)
/
sizeof
(
*
tests
);
i
++
)
{
errno
=
-
1
;
r
=
p_remainder
(
tests
[
i
].
x
,
tests
[
i
].
y
);
e
=
errno
;
ok
(
tests
[
i
].
e
==
e
,
"expected errno %i, but got %i
\n
"
,
tests
[
i
].
e
,
e
);
if
(
_isnan
(
tests
[
i
].
r
))
ok
(
_isnan
(
r
),
"expected NAN, but got %f
\n
"
,
r
);
else
ok
(
tests
[
i
].
r
==
r
,
"expected result %f, but got %f
\n
"
,
tests
[
i
].
r
,
r
);
}
}
START_TEST
(
msvcr120
)
{
if
(
!
init
())
return
;
...
...
@@ -400,4 +447,5 @@ START_TEST(msvcr120)
test__GetConcurrency
();
test__W_Gettnames
();
test__strtof
();
test_remainder
();
}
dlls/msvcr120_app/msvcr120_app.spec
View file @
d9a0c55e
...
...
@@ -1987,9 +1987,9 @@
@ cdecl rand() msvcr120.rand
@ cdecl rand_s(ptr) msvcr120.rand_s
@ cdecl realloc(ptr long) msvcr120.realloc
@
stub
remainder
@
stub
remainderf
@
stub
remainderl
@
cdecl remainder(double double) msvcr120.
remainder
@
cdecl remainderf(float float) msvcr120.
remainderf
@
cdecl remainderl(double double) msvcr120.
remainderl
@ cdecl remove(str) msvcr120.remove
@ stub remquo
@ stub remquof
...
...
dlls/msvcrt/math.c
View file @
d9a0c55e
...
...
@@ -2790,3 +2790,43 @@ LDOUBLE CDECL MSVCR120_scalbnl(LDOUBLE num, MSVCRT_long power)
{
return
MSVCRT__scalb
(
num
,
power
);
}
/*********************************************************************
* remainder (MSVCR120.@)
*/
double
CDECL
MSVCR120_remainder
(
double
x
,
double
y
)
{
#ifdef HAVE_REMAINDER
/* this matches 64-bit Windows. 32-bit Windows is slightly different */
if
(
!
finite
(
x
))
*
MSVCRT__errno
()
=
MSVCRT_EDOM
;
if
(
isnan
(
y
)
||
y
==
0
.
0
)
*
MSVCRT__errno
()
=
MSVCRT_EDOM
;
return
remainder
(
x
,
y
);
#else
FIXME
(
"not implemented
\n
"
);
return
0
.
0
;
#endif
}
/*********************************************************************
* remainderf (MSVCR120.@)
*/
float
CDECL
MSVCR120_remainderf
(
float
x
,
float
y
)
{
#ifdef HAVE_REMAINDERF
/* this matches 64-bit Windows. 32-bit Windows is slightly different */
if
(
!
finitef
(
x
))
*
MSVCRT__errno
()
=
MSVCRT_EDOM
;
if
(
isnanf
(
y
)
||
y
==
0
.
0
f
)
*
MSVCRT__errno
()
=
MSVCRT_EDOM
;
return
remainderf
(
x
,
y
);
#else
FIXME
(
"not implemented
\n
"
);
return
0
.
0
f
;
#endif
}
/*********************************************************************
* remainderl (MSVCR120.@)
*/
LDOUBLE
CDECL
MSVCR120_remainderl
(
LDOUBLE
x
,
LDOUBLE
y
)
{
return
MSVCR120_remainder
(
x
,
y
);
}
dlls/ucrtbase/ucrtbase.spec
View file @
d9a0c55e
...
...
@@ -2458,9 +2458,9 @@
@ cdecl rand() MSVCRT_rand
@ cdecl rand_s(ptr) MSVCRT_rand_s
@ cdecl realloc(ptr long) MSVCRT_realloc
@
stub
remainder
@
stub
remainderf
@
stub
remainderl
@
cdecl remainder(double double) MSVCR120_
remainder
@
cdecl remainderf(float float) MSVCR120_
remainderf
@
cdecl remainderl(double double) MSVCR120_
remainderl
@ cdecl remove(str) MSVCRT_remove
@ stub remquo
@ stub remquof
...
...
include/config.h.in
View file @
d9a0c55e
...
...
@@ -726,6 +726,12 @@
/* Define to 1 if you have the `readlink' function. */
#undef HAVE_READLINK
/* Define to 1 if you have the `remainder' function. */
#undef HAVE_REMAINDER
/* Define to 1 if you have the `remainderf' function. */
#undef HAVE_REMAINDERF
/* Define to 1 if the system has the type `request_sense'. */
#undef HAVE_REQUEST_SENSE
...
...
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