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
30200117
Commit
30200117
authored
Apr 29, 2021
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Import yn implementation from musl.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a105999
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
33 deletions
+65
-33
configure
configure
+1
-2
configure.ac
configure.ac
+1
-2
math.c
dlls/msvcrt/math.c
+62
-10
unixlib.c
dlls/msvcrt/unixlib.c
+1
-15
unixlib.h
dlls/msvcrt/unixlib.h
+0
-1
config.h.in
include/config.h.in
+0
-3
No files found.
configure
View file @
30200117
...
@@ -19660,8 +19660,7 @@ for ac_func in \
...
@@ -19660,8 +19660,7 @@ for ac_func in \
tgamma
\
tgamma
\
tgammaf
\
tgammaf
\
trunc
\
trunc
\
truncf
\
truncf
yn
do
:
do
:
as_ac_var
=
`
$as_echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
as_ac_var
=
`
$as_echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
...
...
configure.ac
View file @
30200117
...
@@ -2703,8 +2703,7 @@ AC_CHECK_FUNCS(\
...
@@ -2703,8 +2703,7 @@ AC_CHECK_FUNCS(\
tgamma \
tgamma \
tgammaf \
tgammaf \
trunc \
trunc \
truncf \
truncf
yn
)
)
LIBS="$ac_save_LIBS"
LIBS="$ac_save_LIBS"
...
...
dlls/msvcrt/math.c
View file @
30200117
...
@@ -3135,19 +3135,71 @@ double CDECL _y1(double x)
...
@@ -3135,19 +3135,71 @@ double CDECL _y1(double x)
/*********************************************************************
/*********************************************************************
* _yn (MSVCRT.@)
* _yn (MSVCRT.@)
*
* Copied from musl: src/math/jn.c
*/
*/
double
CDECL
_yn
(
int
order
,
double
num
)
double
CDECL
_yn
(
int
n
,
double
x
)
{
{
double
retval
;
static
const
double
invsqrtpi
=
5.64189583547756279280e-01
;
if
(
!
isfinite
(
num
))
*
_errno
()
=
EDOM
;
unsigned
int
ix
,
lx
,
ib
;
retval
=
unix_funcs
->
yn
(
order
,
num
);
int
nm1
,
sign
,
i
;
if
(
_fpclass
(
retval
)
==
_FPCLASS_NINF
)
double
a
,
b
,
temp
;
{
*
_errno
()
=
EDOM
;
ix
=
*
(
ULONGLONG
*
)
&
x
>>
32
;
retval
=
NAN
;
lx
=
*
(
ULONGLONG
*
)
&
x
;
}
sign
=
ix
>>
31
;
return
retval
;
ix
&=
0x7fffffff
;
if
((
ix
|
(
lx
|
-
lx
)
>>
31
)
>
0x7ff00000
)
/* nan */
return
x
;
if
(
sign
&&
(
ix
|
lx
)
!=
0
)
/* x < 0 */
return
math_error
(
_DOMAIN
,
"_y1"
,
x
,
0
,
0
/
(
x
-
x
));
if
(
ix
==
0x7ff00000
)
return
0
.
0
;
if
(
n
==
0
)
return
y0
(
x
);
if
(
n
<
0
)
{
nm1
=
-
(
n
+
1
);
sign
=
n
&
1
;
}
else
{
nm1
=
n
-
1
;
sign
=
0
;
}
if
(
nm1
==
0
)
return
sign
?
-
y1
(
x
)
:
y1
(
x
);
if
(
ix
>=
0x52d00000
)
{
/* x > 2**302 */
switch
(
nm1
&
3
)
{
case
0
:
temp
=
-
sin
(
x
)
-
cos
(
x
);
break
;
case
1
:
temp
=
-
sin
(
x
)
+
cos
(
x
);
break
;
case
2
:
temp
=
sin
(
x
)
+
cos
(
x
);
break
;
default
:
temp
=
sin
(
x
)
-
cos
(
x
);
break
;
}
b
=
invsqrtpi
*
temp
/
sqrt
(
x
);
}
else
{
a
=
y0
(
x
);
b
=
y1
(
x
);
/* quit if b is -inf */
ib
=
*
(
ULONGLONG
*
)
&
b
>>
32
;
for
(
i
=
0
;
i
<
nm1
&&
ib
!=
0xfff00000
;)
{
i
++
;
temp
=
b
;
b
=
(
2
.
0
*
i
/
x
)
*
b
-
a
;
ib
=
*
(
ULONGLONG
*
)
&
b
>>
32
;
a
=
temp
;
}
}
return
sign
?
-
b
:
b
;
}
}
#if _MSVCR_VER>=120
#if _MSVCR_VER>=120
...
...
dlls/msvcrt/unixlib.c
View file @
30200117
...
@@ -939,19 +939,6 @@ static float CDECL unix_tgammaf(float x)
...
@@ -939,19 +939,6 @@ static float CDECL unix_tgammaf(float x)
#endif
#endif
}
}
/*********************************************************************
* yn
*/
static
double
CDECL
unix_yn
(
int
order
,
double
num
)
{
#ifdef HAVE_YN
return
yn
(
order
,
num
);
#else
FIXME
(
"not implemented
\n
"
);
return
0
;
#endif
}
static
const
struct
unix_funcs
funcs
=
static
const
struct
unix_funcs
funcs
=
{
{
unix_acosh
,
unix_acosh
,
...
@@ -1038,8 +1025,7 @@ static const struct unix_funcs funcs =
...
@@ -1038,8 +1025,7 @@ static const struct unix_funcs funcs =
unix_tgamma
,
unix_tgamma
,
unix_tgammaf
,
unix_tgammaf
,
unix_trunc
,
unix_trunc
,
unix_truncf
,
unix_truncf
unix_yn
};
};
NTSTATUS
CDECL
__wine_init_unix_lib
(
HMODULE
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
)
NTSTATUS
CDECL
__wine_init_unix_lib
(
HMODULE
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
)
...
...
dlls/msvcrt/unixlib.h
View file @
30200117
...
@@ -108,7 +108,6 @@ struct unix_funcs
...
@@ -108,7 +108,6 @@ struct unix_funcs
float
(
CDECL
*
tgammaf
)(
float
x
);
float
(
CDECL
*
tgammaf
)(
float
x
);
double
(
CDECL
*
trunc
)(
double
x
);
double
(
CDECL
*
trunc
)(
double
x
);
float
(
CDECL
*
truncf
)(
float
x
);
float
(
CDECL
*
truncf
)(
float
x
);
double
(
CDECL
*
yn
)(
int
order
,
double
num
);
};
};
#endif
/* __UNIXLIB_H */
#endif
/* __UNIXLIB_H */
include/config.h.in
View file @
30200117
...
@@ -1166,9 +1166,6 @@
...
@@ -1166,9 +1166,6 @@
/* Define if Xrandr has the XRRGetProviderResources function */
/* Define if Xrandr has the XRRGetProviderResources function */
#undef HAVE_XRRGETPROVIDERRESOURCES
#undef HAVE_XRRGETPROVIDERRESOURCES
/* Define to 1 if you have the `yn' function. */
#undef HAVE_YN
/* Define to 1 if you have the `_spawnvp' function. */
/* Define to 1 if you have the `_spawnvp' function. */
#undef HAVE__SPAWNVP
#undef HAVE__SPAWNVP
...
...
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