Files
Billy Laws 0e069f1e97 Windows: Introduce a minimal CRT replacement
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.
2024-08-07 15:49:41 +00:00

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));
}