[MLton-commit] r4725: Statically-linked wrapper functions for Intel Mac

Matthew Fluet fluet at mlton.org
Wed Oct 18 14:17:37 PDT 2006


MAIL Statically-linked wrapper functions for Intel Mac

Added wrapper functions for "cosh", "pow", "sinh", and "tanh".  This
should avoid problems with Mac OS dynamic linking.


----------------------------------------------------------------------

U   mlton/trunk/basis-library/misc/primitive.sml
U   mlton/trunk/runtime/basis/Real/Math.c

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/misc/primitive.sml
===================================================================
--- mlton/trunk/basis-library/misc/primitive.sml	2006-10-18 20:49:01 UTC (rev 4724)
+++ mlton/trunk/basis-library/misc/primitive.sml	2006-10-18 21:17:36 UTC (rev 4725)
@@ -1325,18 +1325,18 @@
                   val atan = _prim "Real64_Math_atan": real -> real;
                   val atan2 = _prim "Real64_Math_atan2": real * real -> real;
                   val cos = _prim "Real64_Math_cos": real -> real;
-                  val cosh = _import "cosh": real -> real;
+                  val cosh = _import "Real64_Math_cosh": real -> real;
                   val e = #1 _symbol "Real64_Math_e": real GetSet.t; ()
                   val exp = _prim "Real64_Math_exp": real -> real;
                   val ln = _prim "Real64_Math_ln": real -> real;
                   val log10 = _prim "Real64_Math_log10": real -> real;
                   val pi = #1 _symbol "Real64_Math_pi": real GetSet.t; ()
-                  val pow = _import "pow": real * real -> real;
+                  val pow = _import "Real64_Math_pow": real * real -> real;
                   val sin = _prim "Real64_Math_sin": real -> real;
-                  val sinh = _import "sinh": real -> real;
+                  val sinh = _import "Real64_Math_sinh": real -> real;
                   val sqrt = _prim "Real64_Math_sqrt": real -> real;
                   val tan = _prim "Real64_Math_tan": real -> real;
-                  val tanh = _import "tanh": real -> real;
+                  val tanh = _import "Real64_Math_tanh": real -> real;
                end
 
             val * = _prim "Real64_mul": real * real -> real;

Modified: mlton/trunk/runtime/basis/Real/Math.c
===================================================================
--- mlton/trunk/runtime/basis/Real/Math.c	2006-10-18 20:49:01 UTC (rev 4724)
+++ mlton/trunk/runtime/basis/Real/Math.c	2006-10-18 21:17:36 UTC (rev 4725)
@@ -21,6 +21,7 @@
                 return (Real32)(Real64_Math_##f ((Real64)x, (Real64)y));        \
         }
 binaryReal(atan2, atan2)
+binaryReal(pow, pow)
 #undef binaryReal
 
 #define unaryReal(f, g)                                         \
@@ -35,12 +36,15 @@
 unaryReal(asin, asin)
 unaryReal(atan, atan)
 unaryReal(cos, cos)
+unaryReal(cosh, cosh)
 unaryReal(exp, exp)
 unaryReal(ln, log)
 unaryReal(log10, log10)
 unaryReal(sin, sin)
+unaryReal(sinh, sinh)
 unaryReal(sqrt, sqrt)
 unaryReal(tan, tan)
+unaryReal(tanh, tanh)
 #undef unaryReal
 
 double ldexp (double x, int i);




More information about the MLton-commit mailing list