changeset 11229:2f36145742c9

eliminate special cases for SCO systems
author John W. Eaton <jwe@octave.org>
date Wed, 10 Nov 2010 20:36:16 -0500
parents c7107af0cb5b
children 9c6143abf9e1
files ChangeLog configure.ac liboctave/ChangeLog liboctave/lo-ieee.cc liboctave/lo-ieee.h src/ChangeLog src/sysdep.cc
diffstat 7 files changed, 16 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-10  John W. Eaton  <jwe@octave.org>
+
+	* configure.ac: Eliminate special checks for SCO systems.
+
 2010-11-10  John W. Eaton  <jwe@octave.org>
 
 	* NEWS: Update deprecated function list with dispatch.
--- a/configure.ac
+++ b/configure.ac
@@ -1732,21 +1732,11 @@
 dnl fails, we try again by including math.h and invoking the function
 dnl with an argument. 
 
-### I am told that Inf and NaN don't work on m68k HP sytems, and that
-### on SCO systems, isnan and isinf don't work, but they can be
-### replaced by something that does.
+### I am told that Inf and NaN don't work on m68k HP sytems.
 
 case "$canonical_host_type" in
   m68k-hp-hpux*)
   ;;
-  *-*-sco*)
-    AC_MSG_NOTICE([defining SCO to be 1])
-    AC_DEFINE(SCO, 1, [Define if using an SCO system.])
-    AC_MSG_NOTICE([forcing HAVE_ISINF for SCO])
-    AC_DEFINE(HAVE_ISINF, 1, [Define if you have isinf().])
-    AC_MSG_NOTICE([forcing HAVE_ISNAN for SCO])
-    AC_DEFINE(HAVE_ISNAN, 1, [Define if you have isnan().])
-  ;;
   *)
     AC_CHECK_FUNCS(finite isnan isinf signbit)
     AC_CHECK_FUNCS(_finite _isnan)
--- a/liboctave/ChangeLog
+++ b/liboctave/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-10  John W. Eaton  <jwe@octave.org>
+
+	* lo-ieee.h: Eliminate special cases for SCO.
+	* lo-ieee.cc (octave_ieee_init): Eliminate special cases for SCO.
+
 2010-11-09  John W. Eaton  <jwe@octave.org>
 
 	* lo-mappers.h (xmod, xrem): Don't copy sign if result is zero.
--- a/liboctave/lo-ieee.cc
+++ b/liboctave/lo-ieee.cc
@@ -37,13 +37,7 @@
 #endif
 
 #if defined (HAVE_NAN_H)
-#if defined (SCO)
-#define _IEEE 1
-#endif
 #include <nan.h>
-#if defined (SCO)
-#undef _IEEE
-#endif
 #endif
 
 #include "lo-error.h"
@@ -73,10 +67,7 @@
 
         volatile double tmp_inf;
 
-#if defined (SCO)
-        volatile double tmp = 1.0;
-        tmp_inf = 1.0 / (tmp - tmp);
-#elif defined (__alpha__) && defined (__osf__)
+if defined (__alpha__) && defined (__osf__)
         extern unsigned int DINFINITY[2];
         tmp_inf =  (*(X_CAST(double *, DINFINITY)));
 #else
@@ -127,10 +118,6 @@
 
         volatile float float_tmp_inf;
 
-#if defined (SCO)
-        volatile float float_tmp = 1.0;
-        float_tmp_inf = 1.0 / (float_tmp - float_tmp);
-#else
         float float_tmp = 1e+10;
         float_tmp_inf = float_tmp;
         for (;;)
@@ -140,7 +127,6 @@
               break;
             float_tmp = float_tmp_inf;
           }
-#endif
 
 #if defined (__NetBSD__)
         octave_Float_NaN = nanf ("");
--- a/liboctave/lo-ieee.h
+++ b/liboctave/lo-ieee.h
@@ -73,16 +73,6 @@
 
 extern OCTAVE_API void octave_ieee_init (void);
 
-#if defined (SCO)
-extern int __isnan (double);
-extern int __isinf (double);
-extern int __isnanf (float);
-extern int __isinff (float);
-
-#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
-#define isinf(x) (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
-#endif
-
 extern OCTAVE_API int __lo_ieee_isnan (double x);
 extern OCTAVE_API int __lo_ieee_finite (double x);
 extern OCTAVE_API int __lo_ieee_isinf (double x);
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-10  John W. Eaton  <jwe@octave.org>
+
+	* sysdep.cc (sysdep_init): Eliminate special case for SCO.
+	(SCO_init): Delete.
+
 2010-11-10  John W. Eaton  <jwe@octave.org>
 
 	* DLD-FUNCTIONS/__dispatch__.cc: Rename from dispatch.cc.
--- a/src/sysdep.cc
+++ b/src/sysdep.cc
@@ -278,17 +278,6 @@
 }
 #endif
 
-#if defined (SCO)
-static void
-SCO_init (void)
-{
-#if defined (HAVE_IEEEFP_H)
-  // Disable trapping on common exceptions.
-  fpsetmask (~(FP_X_OFL|FP_X_INV|FP_X_DZ|FP_X_DNML|FP_X_UFL|FP_X_IMP));
-#endif
-}
-#endif
-
 void
 sysdep_init (void)
 {
@@ -302,8 +291,6 @@
   NeXT_init ();
 #elif defined (__EMX__)
   OS2_init ();
-#elif defined (SCO)
-  SCO_init ();
 #endif
 
   octave_ieee_init ();