summaryrefslogtreecommitdiff
path: root/StdLib/LibC/gdtoa/Ipf/strtold.c
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/LibC/gdtoa/Ipf/strtold.c')
-rw-r--r--StdLib/LibC/gdtoa/Ipf/strtold.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/StdLib/LibC/gdtoa/Ipf/strtold.c b/StdLib/LibC/gdtoa/Ipf/strtold.c
new file mode 100644
index 0000000000..0cddae36f4
--- /dev/null
+++ b/StdLib/LibC/gdtoa/Ipf/strtold.c
@@ -0,0 +1,18 @@
+/** @file
+ Wrapper for strtold so that it just calls strtod(). This is because the IPF implementation doesn't have
+ long double. (actually MS VC++ makes long double a distinct type that is identical to double.) VC++
+ also doesn't support the {strong, weak}_alias feature so we actually have to have an object.
+
+**/
+#include <LibConfig.h>
+#include <sys/EfiCdefs.h>
+
+#include "namespace.h"
+#include "../gdtoaimp.h"
+#include "../gdtoa.h"
+
+long double
+strtold(const char * __restrict nptr, char ** __restrict endptr)
+{
+ return (long double)strtod( nptr, endptr);
+}