https://git.reactos.org/?p=reactos.git;a=commitdiff;h=20e6e17070aee00a80568…
commit 20e6e17070aee00a80568345959431cd887063ab
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Jul 10 16:46:04 2022 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Dec 1 15:21:59 2022 +0200
[FREELDR] Add stubs for pow and log to avoid pulling in the data from CRT (maybe fix
printf functions instead?)
---
boot/freeldr/freeldr/freeldr.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/boot/freeldr/freeldr/freeldr.c b/boot/freeldr/freeldr/freeldr.c
index c31f5eab3a2..16af2375097 100644
--- a/boot/freeldr/freeldr/freeldr.c
+++ b/boot/freeldr/freeldr/freeldr.c
@@ -98,3 +98,29 @@ int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)
{
return _isctype((char)wc, wctypeFlags);
}
+
+#ifdef _MSC_VER
+#pragma warning(disable:4164)
+#pragma function(pow)
+#pragma function(log)
+#pragma function(log10)
+#endif
+
+// Stubs to avoid pulling in data from CRT
+double pow(double x, double y)
+{
+ __debugbreak();
+ return 0.0;
+}
+
+double log(double x)
+{
+ __debugbreak();
+ return 0.0;
+}
+
+double log10(double x)
+{
+ __debugbreak();
+ return 0.0;
+}