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
1cff65b6
Commit
1cff65b6
authored
Apr 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Use the logb()/logbf() implementation from the bundled musl library.
parent
d1ba9a30
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
37 additions
and
62 deletions
+37
-62
crtdll.spec
dlls/crtdll/crtdll.spec
+1
-1
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+2
-2
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+5
-5
msvcr70.spec
dlls/msvcr70/msvcr70.spec
+1
-1
msvcr71.spec
dlls/msvcr71/msvcr71.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
math.c
dlls/msvcrt/math.c
+1
-31
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
msvcrtd.spec
dlls/msvcrtd/msvcrtd.spec
+1
-1
ucrtbase.spec
dlls/ucrtbase/ucrtbase.spec
+10
-10
libm.h
libs/musl/src/internal/libm.h
+2
-0
logb.c
libs/musl/src/math/logb.c
+1
-1
logbf.c
libs/musl/src/math/logbf.c
+4
-1
No files found.
dlls/crtdll/crtdll.spec
View file @
1cff65b6
...
...
@@ -179,7 +179,7 @@
@ cdecl _loaddll(str)
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl _logb(double)
logb
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
@ cdecl _lsearch(ptr ptr ptr long ptr)
...
...
dlls/msvcr100/msvcr100.spec
View file @
1cff65b6
...
...
@@ -1052,8 +1052,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcr110/msvcr110.spec
View file @
1cff65b6
...
...
@@ -1409,8 +1409,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcr120/msvcr120.spec
View file @
1cff65b6
...
...
@@ -1420,8 +1420,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
@@ -2266,9 +2266,9 @@
@ cdecl log2(double)
@ cdecl log2f(float)
@ cdecl log2l(double) log2
@ cdecl logb(double)
_logb
@ cdecl logbf(float)
_logbf
@ cdecl logbl(double)
_
logb
@ cdecl logb(double)
@ cdecl logbf(float)
@ cdecl logbl(double) logb
@ cdecl -arch=i386,x86_64,arm,arm64 longjmp(ptr long) MSVCRT_longjmp
@ cdecl lrint(double)
@ cdecl lrintf(float)
...
...
dlls/msvcr70/msvcr70.spec
View file @
1cff65b6
...
...
@@ -408,7 +408,7 @@
@ cdecl _localtime64(ptr)
@ cdecl _lock(long)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl _logb(double)
logb
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcr71/msvcr71.spec
View file @
1cff65b6
...
...
@@ -403,7 +403,7 @@
@ cdecl _localtime64(ptr)
@ cdecl _lock(long)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl _logb(double)
logb
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcr80/msvcr80.spec
View file @
1cff65b6
...
...
@@ -724,8 +724,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcr90/msvcr90.spec
View file @
1cff65b6
...
...
@@ -702,8 +702,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcrt/math.c
View file @
1cff65b6
...
...
@@ -131,7 +131,7 @@ int CDECL _matherr(struct _exception *e)
}
static
double
math_error
(
int
type
,
const
char
*
name
,
double
arg1
,
double
arg2
,
double
retval
)
double
math_error
(
int
type
,
const
char
*
name
,
double
arg1
,
double
arg2
,
double
retval
)
{
struct
_exception
exception
=
{
type
,
(
char
*
)
name
,
arg1
,
arg2
,
retval
};
...
...
@@ -259,22 +259,6 @@ float CDECL _nextafterf( float x, float y )
return
y
;
}
/*********************************************************************
* _logbf (MSVCRT.@)
*
* Copied from musl: src/math/logbf.c
*/
float
CDECL
_logbf
(
float
x
)
{
if
(
!
isfinite
(
x
))
return
x
*
x
;
if
(
x
==
0
)
{
*
_errno
()
=
ERANGE
;
return
-
1
/
(
x
*
x
);
}
return
ilogbf
(
x
);
}
#endif
/* Copied from musl: src/math/__rem_pio2_large.c */
...
...
@@ -4505,20 +4489,6 @@ __int64 CDECL _abs64( __int64 n )
}
/*********************************************************************
* _logb (MSVCRT.@)
*
* Copied from musl: src/math/logb.c
*/
double
CDECL
_logb
(
double
x
)
{
if
(
!
isfinite
(
x
))
return
x
*
x
;
if
(
x
==
0
)
return
math_error
(
_SING
,
"_logb"
,
x
,
0
,
-
1
/
(
x
*
x
));
return
ilogb
(
x
);
}
/*********************************************************************
* ceil (MSVCRT.@)
*
* Based on musl: src/math/ceilf.c
...
...
dlls/msvcrt/msvcrt.spec
View file @
1cff65b6
...
...
@@ -670,8 +670,8 @@
@ cdecl _lock(long)
@ cdecl _lock_file(ptr)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/msvcrtd/msvcrtd.spec
View file @
1cff65b6
...
...
@@ -385,7 +385,7 @@
@ cdecl -arch=i386 _local_unwind2(ptr long)
@ cdecl _lock(long)
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl _logb(double)
logb
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
dlls/ucrtbase/ucrtbase.spec
View file @
1cff65b6
...
...
@@ -568,8 +568,8 @@
@ cdecl _lock_file(ptr)
@ cdecl _lock_locales()
@ cdecl _locking(long long long)
@ cdecl _logb(double)
@ cdecl -arch=!i386 _logbf(float)
@ cdecl _logb(double)
logb
@ cdecl -arch=!i386 _logbf(float)
logbf
@ cdecl -arch=i386 _longjmpex(ptr long) MSVCRT_longjmp
@ cdecl _lrotl(long long) MSVCRT__lrotl
@ cdecl _lrotr(long long) MSVCRT__lrotr
...
...
@@ -1142,8 +1142,8 @@
@ cdecl _o__localtime64_s(ptr ptr) _localtime64_s
@ cdecl _o__lock_file(ptr) _lock_file
@ cdecl _o__locking(long long long) _locking
@ cdecl _o__logb(double)
_
logb
@ cdecl -arch=!i386 _o__logbf(float)
_
logbf
@ cdecl _o__logb(double) logb
@ cdecl -arch=!i386 _o__logbf(float) logbf
@ cdecl _o__lsearch(ptr ptr ptr long ptr) _lsearch
@ stub _o__lsearch_s
@ cdecl _o__lseek(long long long) _lseek
...
...
@@ -1699,9 +1699,9 @@
@ cdecl _o_log2(double) log2
@ cdecl _o_log2f(float) log2f
@ cdecl _o_log2l(double) log2
@ cdecl _o_logb(double)
_
logb
@ cdecl _o_logbf(float)
_
logbf
@ cdecl _o_logbl(double)
_
logb
@ cdecl _o_logb(double) logb
@ cdecl _o_logbf(float) logbf
@ cdecl _o_logbl(double) logb
@ cdecl -arch=!i386 _o_logf(float) logf
@ cdecl _o_lrint(double) lrint
@ cdecl _o_lrintf(float) lrintf
...
...
@@ -2401,9 +2401,9 @@
@ cdecl log2(double)
@ cdecl log2f(float)
@ cdecl log2l(double) log2
@ cdecl logb(double)
_logb
@ cdecl logbf(float)
_logbf
@ cdecl logbl(double)
_
logb
@ cdecl logb(double)
@ cdecl logbf(float)
@ cdecl logbl(double) logb
@ cdecl -arch=!i386 logf(float)
@ cdecl -arch=i386,x86_64,arm,arm64 longjmp(ptr long) MSVCRT_longjmp
@ cdecl lrint(double)
...
...
libs/musl/src/internal/libm.h
View file @
1cff65b6
...
...
@@ -10,6 +10,8 @@
typedef
float
float_t
;
typedef
double
double_t
;
hidden
double
math_error
(
int
type
,
const
char
*
name
,
double
arg1
,
double
arg2
,
double
retval
);
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 && __BYTE_ORDER == __LITTLE_ENDIAN
union
ldshape
{
...
...
libs/musl/src/math/logb.c
View file @
1cff65b6
...
...
@@ -13,6 +13,6 @@ double __cdecl logb(double x)
if
(
!
isfinite
(
x
))
return
x
*
x
;
if
(
x
==
0
)
return
-
1
/
(
x
*
x
);
return
math_error
(
_SING
,
"_logb"
,
x
,
0
,
-
1
/
(
x
*
x
)
);
return
ilogb
(
x
);
}
libs/musl/src/math/logbf.c
View file @
1cff65b6
#include <math.h>
#include "libm.h"
float
__cdecl
logbf
(
float
x
)
{
if
(
!
isfinite
(
x
))
return
x
*
x
;
if
(
x
==
0
)
if
(
x
==
0
)
{
errno
=
ERANGE
;
return
-
1
/
(
x
*
x
);
}
return
ilogbf
(
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