[MLton-commit] r4496
Stephen Weeks
MLton@mlton.org
Mon, 8 May 2006 19:11:42 -0700
Moved the prototypes for gdtoa_strto{d,f} into platform.h so they can
be used anywhere. Used gdtoa_strtof instead of strtof in gc/init.c
since some platforms (e.g SunOS 5.8) don't have strtof and we will
always have our own gdtoa_strtof.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-09 01:10:25 UTC (rev 4495)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-09 02:11:41 UTC (rev 4496)
@@ -1,8 +1,5 @@
#include "platform.h"
-Real32_t gdtoa_strtof (const char *s, char **endptr);
-Real64_t gdtoa_strtod (const char *s, char **endptr);
-
Real32_t Real32_strto (NullString8_t s) {
char *endptr;
Real32_t res;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-05-09 01:10:25 UTC (rev 4495)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-05-09 02:11:41 UTC (rev 4496)
@@ -24,7 +24,7 @@
char *endptr;
float f;
- f = strtof (s, &endptr);
+ f = gdtoa_strtof (s, &endptr);
if (s == endptr)
die ("Invalid @MLton float: %s.", s);
return f;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-09 01:10:25 UTC (rev 4495)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-09 02:11:41 UTC (rev 4496)
@@ -106,6 +106,13 @@
#include "basis-ffi.h"
/* ---------------------------------------------------------------- */
+/* gdtoa */
+/* ---------------------------------------------------------------- */
+
+Real32_t gdtoa_strtof (const char *s, char **endptr);
+Real64_t gdtoa_strtod (const char *s, char **endptr);
+
+/* ---------------------------------------------------------------- */
/* Runtime Init/Exit */
/* ---------------------------------------------------------------- */