Skip to content

Commit 4d20df2

Browse files
committed
[MSVCRT] msvcrt.spec: Use our own math functions directly
Bypass the wine wrappers, and comment out _fpclass and ldexp in math.c, because our own functions work better.
1 parent 15adae7 commit 4d20df2

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

dll/win32/msvcrt/math.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ __ASM_GLOBAL_FUNC(_ftol,
588588

589589
#endif /* (defined(__GNUC__) || defined(__clang__)) && defined(__i386__) */
590590

591+
#ifndef __REACTOS__
591592
/*********************************************************************
592593
* _fpclass (MSVCRT.@)
593594
*/
@@ -609,6 +610,7 @@ int CDECL _fpclass(double num)
609610
return s ? _FPCLASS_NN : _FPCLASS_PN;
610611
}
611612
}
613+
#endif // __REACTOS__
612614

613615
/*********************************************************************
614616
* _rotl (MSVCRT.@)
@@ -1195,6 +1197,7 @@ int * CDECL __fpecode(void)
11951197
return &msvcrt_get_thread_data()->fpecode;
11961198
}
11971199

1200+
#ifndef __REACTOS__
11981201
/*********************************************************************
11991202
* ldexp (MSVCRT.@)
12001203
*/
@@ -1208,6 +1211,7 @@ double CDECL ldexp(double num, int exp)
12081211
return math_error(_UNDERFLOW, "ldexp", num, exp, z);
12091212
return z;
12101213
}
1214+
#endif // __REACTOS__
12111215

12121216
/*********************************************************************
12131217
* _cabs (MSVCRT.@)

dll/win32/msvcrt/msvcrt.spec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,12 +1257,12 @@
12571257
@ cdecl -arch=!i386 acosf(float)
12581258
@ cdecl asctime(ptr)
12591259
@ cdecl -version=0x600+ asctime_s(ptr long ptr)
1260-
@ cdecl asin(double) MSVCRT_asin
1260+
@ cdecl asin(double)
12611261
@ cdecl -arch=!i386 asinf(float)
1262-
@ cdecl atan(double) MSVCRT_atan
1262+
@ cdecl atan(double)
12631263
@ cdecl atan2(double double)
12641264
@ cdecl -arch=!i386 atan2f(float float)
1265-
@ cdecl -arch=!i386 atanf(float) MSVCRT_atanf
1265+
@ cdecl -arch=!i386 atanf(float)
12661266
@ cdecl -private atexit(ptr) MSVCRT_atexit # not imported to avoid conflicts with Mingw
12671267
@ cdecl atof(str)
12681268
@ cdecl atoi(str)
@@ -1286,7 +1286,7 @@
12861286
@ cdecl -arch=win64 difftime(long long) _difftime64
12871287
@ cdecl -ret64 div(long long)
12881288
@ cdecl exit(long)
1289-
@ cdecl exp(double) MSVCRT_exp
1289+
@ cdecl exp(double)
12901290
@ cdecl -arch=!i386 expf(float)
12911291
@ cdecl fabs(double)
12921292
@ cdecl -arch=arm,arm64 fabsf(float)
@@ -1425,8 +1425,8 @@
14251425
@ cdecl -arch=!i386 sinhf(float)
14261426
@ varargs sprintf(ptr str)
14271427
@ varargs -version=0x600+ sprintf_s(ptr long str)
1428-
@ cdecl sqrt(double) MSVCRT_sqrt
1429-
@ cdecl -arch=!i386 sqrtf(float) MSVCRT_sqrtf
1428+
@ cdecl sqrt(double)
1429+
@ cdecl -arch=!i386 sqrtf(float)
14301430
@ cdecl srand(long)
14311431
@ varargs sscanf(str str)
14321432
@ varargs -version=0x600+ sscanf_s(str str)
@@ -1464,9 +1464,9 @@
14641464
@ varargs -version=0x600+ swscanf_s(wstr wstr)
14651465
@ cdecl system(str)
14661466
@ cdecl tan(double)
1467-
@ cdecl tanh(double) MSVCRT_tanh
1467+
@ cdecl tanh(double)
14681468
@ cdecl -arch=!i386 tanf(float)
1469-
@ cdecl -arch=!i386 tanhf(float) MSVCRT_tanhf
1469+
@ cdecl -arch=!i386 tanhf(float)
14701470
@ cdecl -arch=win32 time(ptr) _time32
14711471
@ cdecl -arch=win64 time(ptr) _time64
14721472
@ cdecl tmpfile()

0 commit comments

Comments
 (0)