Mercurial > hg > octave-nkf
changeset 2508:f8d5dbbbc50a
[project @ 1996-11-13 17:21:07 by jwe]
author | jwe |
---|---|
date | Wed, 13 Nov 1996 17:21:10 +0000 |
parents | bea4ff48d388 |
children | 2d39387e2f35 |
files | ChangeLog configure.in liboctave/ChangeLog liboctave/idx-vector.cc liboctave/lo-ieee.cc src/ChangeLog src/pt-plot.cc src/sysdep.cc |
diffstat | 8 files changed, 86 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Nov 13 11:04:26 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: If running on an SCO system, define SCO, and force + HAVE_ISINF and HAVE_ISNAN to be defined. + Also check for ieeefp.h and nan.h. + Tue Nov 12 21:50:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> * MAKEINFO.PATCH: Update to use patch relative to texinfo-3.9.
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.230 $) +AC_REVISION($Revision: 1.231 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -612,10 +612,10 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(assert.h curses.h fcntl.h float.h floatingpoint.h \ - grp.h limits.h memory.h ncurses.h pwd.h sgtty.h stdlib.h string.h \ - sys/param.h sys/resource.h sys/select.h sys/stat.h sys/time.h \ - sys/times.h sys/types.h sys/utsname.h termcap.h termio.h termios.h \ - unistd.h varargs.h) + grp.h ieeefp.h limits.h memory.h nan.h ncurses.h pwd.h sgtty.h \ + stdlib.h string.h sys/param.h sys/resource.h sys/select.h sys/stat.h \ + sys/time.h sys/times.h sys/types.h sys/utsname.h termcap.h termio.h \ + termios.h unistd.h varargs.h) if test "$ac_cv_header_termios_h" = yes \ || test "$ac_cv_header_termio_h" = yes \ @@ -774,11 +774,21 @@ XCFLAGS="$CFLAGS" CFLAGS="$CFLAGS $GCC_IEEE_FP_FLAG" -### I am told that Inf and NaN don't work on m68k HP sytems. +### 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. case "$canonical_host_type" in m68k-hp-hpux*) ;; + *-*-sco*) + AC_MSG_RESULT([defining SCO to be 1]) + AC_DEFINE(SCO, 1) + AC_MSG_RESULT([forcing HAVE_ISINF for SCO]) + AC_DEFINE(HAVE_ISINF, 1) + AC_MSG_RESULT([forcing HAVE_ISNAN for SCO]) + AC_DEFINE(HAVE_ISNAN, 1) + ;; *) AC_CHECK_FUNCS(finite isnan isinf infinity quiet_nan) ;;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 13 11:19:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-ieee.cc (isnan, isinf): Provide functions for SCO. + Tue Nov 12 11:11:21 1996 John W. Eaton <jwe@bevo.che.wisc.edu> * idx-vector.cc (idx_is_inf_or_nan): New function.
--- a/liboctave/idx-vector.cc +++ b/liboctave/idx-vector.cc @@ -204,6 +204,8 @@ data[0] = tree_to_mat_idx (d); } + + init_state (); } IDX_VEC_REP::idx_vector_rep (const Range& r)
--- a/liboctave/lo-ieee.cc +++ b/liboctave/lo-ieee.cc @@ -31,6 +31,10 @@ #include <floatingpoint.h> #endif +#if defined (HAVE_NAN_H) +#include <nan.h> +#endif + #include "lo-ieee.h" // Octave's idea of infinity. @@ -84,6 +88,21 @@ #endif } +#if defined (SCO) +#define _IEEE 1 +extern "C" int +isnan (double x) +{ + return (IsNANorINF(x) && NaN(x)) ? 1 : 0; +} + +extern "C" int +isinf (double x) +{ + return (IsNANorINF(x) && IsINF(x)) ? 1 : 0; +} +#endif + /* ;;; Local Variables: *** ;;; mode: C++ ***
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ +Wed Nov 13 11:13:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * sysdep.cc: Conditionally include ieeefp.h. + (BSD_init, SCO_init): New functions. + (sysdep_init): Conditionally call them here. + Tue Nov 12 00:14:56 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + * pt-plot.cc (open_plot_stream): Don't block SIGCHLD. + * load-save.cc (read_binary_data): When reading string arrays, be sure to create an octave_char_matrix_str object, not just an octave_char_matrix object.
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -163,7 +163,6 @@ #if defined (HAVE_POSIX_SIGNALS) sigset_t set, oset; sigemptyset (&set); - sigaddset (&set, SIGCHLD); sigaddset (&set, SIGINT); sigprocmask (SIG_BLOCK, &set, &oset); #endif
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -63,6 +63,10 @@ #include <floatingpoint.h> #endif +#if defined (HAVE_IEEEFP_H) +#include <ieeefp.h> +#endif + #if !defined (HAVE_GETHOSTNAME) && defined (HAVE_SYS_UTSNAME_H) #include <sys/utsname.h> #endif @@ -94,7 +98,18 @@ #define STDIN_FILENO 1 #endif -#ifdef NeXT +#if defined (__386BSD__) || defined (__FreeBSD__) +static void +BSD_init (void) +{ +#if defined (HAVE_FLOATINGPOINT_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 + +#if defined NeXT extern "C" { typedef void (*_cplus_fcn_int) (int); @@ -119,6 +134,17 @@ } #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 + #if defined (EXCEPTION_IN_MATH) extern "C" int @@ -149,14 +175,11 @@ sysdep_init (void) { #if defined (__386BSD__) || defined (__FreeBSD__) -#if defined (HAVE_FLOATINGPOINT_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 - -#ifdef NeXT + BSD_init (); +#elif defined NeXT NeXT_init (); +#elif defined (SCO) + SCO_init (); #endif octave_ieee_init ();