[MLton-commit] r7099

Ville Laurikari ville at mlton.org
Wed Apr 22 01:49:23 PDT 2009


Drop support for AIX 5.1.  AIX 5.2 is now the oldest supported
release.  This also gets rid of an old implementation of fesetround()
which didn't compile anymore that the return value is checked.

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

U   mlton/trunk/runtime/platform/aix.c
U   mlton/trunk/runtime/platform/aix.h

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

Modified: mlton/trunk/runtime/platform/aix.c
===================================================================
--- mlton/trunk/runtime/platform/aix.c	2009-04-19 16:03:43 UTC (rev 7098)
+++ mlton/trunk/runtime/platform/aix.c	2009-04-22 08:49:22 UTC (rev 7099)
@@ -1,8 +1,3 @@
-/* On AIX 5.1 (and older) there is no fegetround() or fesetround().
-   Instead, float.h defines fp_read_rnd() and fp_swap_rnd() with
-   equivalent functionality.  GCC has its own version of float.h, so
-   we include the system header directly before everything else. */
-#include "/usr/include/float.h"
 #include "platform.h"
 
 #include <sys/mman.h>
@@ -16,16 +11,6 @@
 #include "recv.nonblock.c"
 #include "use-mmap.c"
 
-int fegetround (void)
-{
-        return fp_read_rnd ();
-}
-
-void fesetround (int mode)
-{
-        fp_swap_rnd (mode);
-}
-
 int fpclassify64 (double d)
 {
         int c;

Modified: mlton/trunk/runtime/platform/aix.h
===================================================================
--- mlton/trunk/runtime/platform/aix.h	2009-04-19 16:03:43 UTC (rev 7098)
+++ mlton/trunk/runtime/platform/aix.h	2009-04-22 08:49:22 UTC (rev 7099)
@@ -10,6 +10,7 @@
 
 #include <dirent.h>
 #include <fcntl.h>
+#include <fenv.h>
 #include <grp.h>
 #include <netdb.h>
 #include <netinet/in.h>
@@ -43,42 +44,7 @@
 
 #define MLton_Platform_OS_host "aix"
 
-#define FE_TOWARDZERO 0 // FP_RND_RZ
-#define FE_TONEAREST  1 // FP_RND_RN
-#define FE_UPWARD     2 // FP_RND_RP
-#define FE_DOWNWARD   3 // FP_RND_RM
-
-int fegetround(void);
-void fesetround(int mode);
 int fpclassify64(double d);
 
-#ifndef _AIXVERSION_520
-/* These are GCC builtins, but <math.h> does not define the prototypes. */
-float acosf(float x);
-float asinf(float x);
-float atan2f(float y, float x);
-float atanf(float x);
-float cosf(float x);
-float coshf(float x);
-float expf(float x);
-float fabsf(float x);
-float frexpf(float num, int *exp);
-float ldexpf(float x, int exp);
-float log10f(float x);
-float logf(float x);
-float modff(float x, float *iptr);
-float powf(float x, float y);
-float rintf(float x);
-float sinf(float x);
-float sinhf(float x);
-float sqrtf(float x);
-float tanf(float x);
-float tanhf(float x);
-#endif
-
 /* This should not conflict with existing flags. */
 #define MSG_DONTWAIT 0x1000000
-
-#ifndef SIZE_MAX
-#define SIZE_MAX ((size_t)-1)
-#endif




More information about the MLton-commit mailing list