mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-09 19:00:20 +02:00
It is dangerous for FEX to rely on the system CRT as calls can have side effects that are also visible to the running application, and if patches are applied to any CRT exports used during compilation the call checker would trigger a reentry into the JIT to compile the patch and hence deadlock. Only functions that FEX actively uses are implemented, with the rest triggering an abort.
31 lines
616 B
C++
31 lines
616 B
C++
// SPDX-License-Identifier: MIT
|
|
#define _SECIMP
|
|
#define _CRTIMP
|
|
#include <cstdlib>
|
|
#include <cstdint>
|
|
#include <cmath>
|
|
|
|
long double tanl(long double X) {
|
|
return tan(static_cast<double>(X));
|
|
}
|
|
|
|
long double sinl(long double X) {
|
|
return sin(static_cast<double>(X));
|
|
}
|
|
|
|
long double cosl(long double X) {
|
|
return cos(static_cast<double>(X));
|
|
}
|
|
|
|
long double exp2l(long double N) {
|
|
return exp2(static_cast<double>(N));
|
|
}
|
|
|
|
long double log2l(long double N) {
|
|
return log2(static_cast<double>(N));
|
|
}
|
|
|
|
long double atan2l(long double X, long double Y) {
|
|
return atan2(static_cast<double>(X), static_cast<double>(Y));
|
|
}
|