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
bba43bd6
Commit
bba43bd6
authored
May 17, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
May 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import ceilf implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2a5e68ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
math.c
dlls/msvcrt/math.c
+22
-1
unixlib.c
dlls/msvcrt/unixlib.c
+0
-9
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
No files found.
dlls/msvcrt/math.c
View file @
bba43bd6
...
...
@@ -798,10 +798,31 @@ float CDECL tanhf( float x )
/*********************************************************************
* ceilf (MSVCRT.@)
*
* Copied from musl: src/math/ceilf.c
*/
float
CDECL
ceilf
(
float
x
)
{
return
unix_funcs
->
ceilf
(
x
);
union
{
float
f
;
UINT32
i
;}
u
=
{
x
};
int
e
=
(
int
)(
u
.
i
>>
23
&
0xff
)
-
0x7f
;
UINT32
m
;
if
(
e
>=
23
)
return
x
;
if
(
e
>=
0
)
{
m
=
0x007fffff
>>
e
;
if
((
u
.
i
&
m
)
==
0
)
return
x
;
if
(
u
.
i
>>
31
==
0
)
u
.
i
+=
m
;
u
.
i
&=
~
m
;
}
else
{
if
(
u
.
i
>>
31
)
return
-
0
.
0
;
else
if
(
u
.
i
<<
1
)
return
1
.
0
;
}
return
u
.
f
;
}
/*********************************************************************
...
...
dlls/msvcrt/unixlib.c
View file @
bba43bd6
...
...
@@ -122,14 +122,6 @@ static float CDECL unix_atanhf(float x)
}
/*********************************************************************
* ceilf
*/
static
float
CDECL
unix_ceilf
(
float
x
)
{
return
ceilf
(
x
);
}
/*********************************************************************
* cos
*/
static
double
CDECL
unix_cos
(
double
x
)
...
...
@@ -705,7 +697,6 @@ static const struct unix_funcs funcs =
unix_asinhf
,
unix_atanh
,
unix_atanhf
,
unix_ceilf
,
unix_cos
,
unix_cosf
,
unix_cosh
,
...
...
dlls/msvcrt/unixlib.h
View file @
bba43bd6
...
...
@@ -29,7 +29,6 @@ struct unix_funcs
float
(
CDECL
*
asinhf
)(
float
x
);
double
(
CDECL
*
atanh
)(
double
x
);
float
(
CDECL
*
atanhf
)(
float
x
);
float
(
CDECL
*
ceilf
)(
float
x
);
double
(
CDECL
*
cos
)(
double
x
);
float
(
CDECL
*
cosf
)(
float
x
);
double
(
CDECL
*
cosh
)(
double
x
);
...
...
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