# HG changeset patch # User jwe # Date 1196448810 0 # Node ID 2eb392d058bb0c2702342c7c51a7d6e0eb3bf4d9 # Parent a760bd2630d547cc8e18d378cb1882033cfc24c7 [project @ 2007-11-30 18:53:29 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-30 Moritz Borgmann + + * configure.in: Also check for sunmath.h. + 2007-11-26 David Bateman * PROJECTS: condest now implemented. diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.596 $) +AC_REVISION($Revision: 1.597 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1233,7 +1233,7 @@ AC_CHECK_HEADERS(assert.h curses.h direct.h dlfcn.h fcntl.h float.h \ floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ - ncurses.h poll.h pwd.h stdint.h stdlib.h string.h sys/ioctl.h \ + ncurses.h poll.h pwd.h stdint.h stdlib.h string.h sunmath.h sys/ioctl.h \ sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ unistd.h utime.h varargs.h) diff --git a/doc/interpreter/contributors.in b/doc/interpreter/contributors.in --- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -12,6 +12,7 @@ David Billinghurst Don Bindner Jakub Bogusz +Moritz Borgmann Marcus Brinkmann Remy Bruno Marco Caliari diff --git a/liboctave/Array2.h b/liboctave/Array2.h --- a/liboctave/Array2.h +++ b/liboctave/Array2.h @@ -27,11 +27,11 @@ #include #include -#include #include #include "Array.h" #include "lo-error.h" +#include "lo-math.h" class idx_vector; diff --git a/liboctave/ArrayN.h b/liboctave/ArrayN.h --- a/liboctave/ArrayN.h +++ b/liboctave/ArrayN.h @@ -29,12 +29,12 @@ #include #include -#include #include #include "Array.h" #include "Array2.h" #include "lo-error.h" +#include "lo-math.h" class idx_vector; diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,19 @@ +2007-11-30 John W. Eaton + + * lo-math.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * liboctave/Array2.h, liboctave/ArrayN.h, liboctave/CmplxDET.cc, + liboctave/DASPK.cc, liboctave/DASPK.h, liboctave/DASRT.cc, + liboctave/DASRT.h, liboctave/DASSL.cc, liboctave/DASSL.h, + liboctave/LSODE.cc, liboctave/LSODE.h, liboctave/NLEqn.h, + liboctave/Quad.h, liboctave/Range.cc, liboctave/dbleDET.cc, + liboctave/lo-cieee.c, liboctave/lo-ieee.cc, + liboctave/lo-mappers.cc, liboctave/oct-time.cc, + liboctave/oct-time.h, liboctave/randgamma.c, + liboctave/randmtzig.c, liboctave/randpoisson.c: Include lo-math.h + instead of cmath or math.h. + * lo-mappers.h: Don't include sunmath.h here. + 2007-11-26 John W. Eaton * idx-vector.h (idx_vector::idx_vector_rep (const intNDArray&)): diff --git a/liboctave/CmplxDET.cc b/liboctave/CmplxDET.cc --- a/liboctave/CmplxDET.cc +++ b/liboctave/CmplxDET.cc @@ -27,10 +27,10 @@ #include #include -#include #include "CmplxDET.h" #include "lo-mappers.h" +#include "lo-math.h" #include "oct-cmplx.h" bool diff --git a/liboctave/DASPK.cc b/liboctave/DASPK.cc --- a/liboctave/DASPK.cc +++ b/liboctave/DASPK.cc @@ -26,13 +26,13 @@ #endif #include -#include #include #include "DASPK.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*daspk_fcn_ptr) (const double&, const double*, diff --git a/liboctave/DASPK.h b/liboctave/DASPK.h --- a/liboctave/DASPK.h +++ b/liboctave/DASPK.h @@ -25,9 +25,9 @@ #define octave_DASPK_h 1 #include -#include #include "DASPK-opts.h" +#include "lo-math.h" class OCTAVE_API diff --git a/liboctave/DASRT.cc b/liboctave/DASRT.cc --- a/liboctave/DASRT.cc +++ b/liboctave/DASRT.cc @@ -25,13 +25,13 @@ #endif #include -#include #include #include "DASRT.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*dasrt_fcn_ptr) (const double&, const double*, const double*, diff --git a/liboctave/DASRT.h b/liboctave/DASRT.h --- a/liboctave/DASRT.h +++ b/liboctave/DASRT.h @@ -24,9 +24,9 @@ #define octave_DASRT_h 1 #include -#include #include "DASRT-opts.h" +#include "lo-math.h" class DASRT_result diff --git a/liboctave/DASSL.cc b/liboctave/DASSL.cc --- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -26,13 +26,13 @@ #endif #include -#include #include #include "DASSL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*dassl_fcn_ptr) (const double&, const double*, const double*, diff --git a/liboctave/DASSL.h b/liboctave/DASSL.h --- a/liboctave/DASSL.h +++ b/liboctave/DASSL.h @@ -25,9 +25,9 @@ #define octave_DASSL_h 1 #include -#include #include "DASSL-opts.h" +#include "lo-math.h" class OCTAVE_API diff --git a/liboctave/LSODE.cc b/liboctave/LSODE.cc --- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -26,13 +26,13 @@ #endif #include -#include #include #include "LSODE.h" #include "f77-fcn.h" #include "lo-error.h" +#include "lo-math.h" #include "quit.h" typedef octave_idx_type (*lsode_fcn_ptr) (const octave_idx_type&, const double&, double*, diff --git a/liboctave/LSODE.h b/liboctave/LSODE.h --- a/liboctave/LSODE.h +++ b/liboctave/LSODE.h @@ -25,9 +25,9 @@ #define octave_LSODE_h 1 #include -#include #include "LSODE-opts.h" +#include "lo-math.h" class OCTAVE_API diff --git a/liboctave/Makefile.in b/liboctave/Makefile.in --- a/liboctave/Makefile.in +++ b/liboctave/Makefile.in @@ -79,7 +79,7 @@ base-de.h base-min.h byte-swap.h cmd-edit.h cmd-hist.h \ data-conv.h dir-ops.h file-ops.h file-stat.h getopt.h \ glob-match.h idx-vector.h kpse-xfns.h \ - lo-ieee.h lo-mappers.h lo-specfun.h \ + lo-ieee.h lo-mappers.h lo-math.h lo-specfun.h \ lo-sysdep.h lo-utils.h mach-info.h md5.h oct-alloc.h oct-cmplx.h \ oct-env.h oct-fftw.h oct-getopt.h oct-group.h oct-inttypes.h \ oct-md5.h oct-passwd.h oct-rand.h oct-rl-edit.h oct-rl-hist.h \ diff --git a/liboctave/NLEqn.h b/liboctave/NLEqn.h --- a/liboctave/NLEqn.h +++ b/liboctave/NLEqn.h @@ -25,9 +25,9 @@ #define octave_NLEqn_h 1 #include -#include #include "NLEqn-opts.h" +#include "lo-math.h" class OCTAVE_API diff --git a/liboctave/Quad.h b/liboctave/Quad.h --- a/liboctave/Quad.h +++ b/liboctave/Quad.h @@ -25,9 +25,9 @@ #define octave_Quad_h 1 #include -#include #include "dColVector.h" +#include "lo-math.h" #if !defined (octave_Quad_typedefs) #define octave_Quad_typedefs 1 diff --git a/liboctave/Range.cc b/liboctave/Range.cc --- a/liboctave/Range.cc +++ b/liboctave/Range.cc @@ -26,13 +26,13 @@ #endif #include -#include #include #include #include "Range.h" #include "lo-mappers.h" +#include "lo-math.h" #include "lo-utils.h" bool diff --git a/liboctave/dbleDET.cc b/liboctave/dbleDET.cc --- a/liboctave/dbleDET.cc +++ b/liboctave/dbleDET.cc @@ -26,10 +26,10 @@ #endif #include -#include #include "dbleDET.h" #include "lo-mappers.h" +#include "lo-math.h" bool DET::value_will_overflow (void) const diff --git a/liboctave/lo-cieee.c b/liboctave/lo-cieee.c --- a/liboctave/lo-cieee.c +++ b/liboctave/lo-cieee.c @@ -25,7 +25,6 @@ #endif #include -#include #if defined (HAVE_FLOATINGPOINT_H) #include @@ -46,6 +45,7 @@ #endif #include "lo-ieee.h" +#include "lo-math.h" #if ! defined (HAVE_ISNAN) && defined (HAVE__ISNAN) #define isnan _isnan diff --git a/liboctave/lo-ieee.cc b/liboctave/lo-ieee.cc --- a/liboctave/lo-ieee.cc +++ b/liboctave/lo-ieee.cc @@ -26,7 +26,6 @@ #endif #include -#include #if defined (HAVE_FLOATINGPOINT_H) #include @@ -48,6 +47,7 @@ #include "lo-error.h" #include "lo-ieee.h" +#include "lo-math.h" #include "mach-info.h" void diff --git a/liboctave/lo-mappers.cc b/liboctave/lo-mappers.cc --- a/liboctave/lo-mappers.cc +++ b/liboctave/lo-mappers.cc @@ -26,15 +26,11 @@ #endif #include -#include - -#if defined (HAVE_SUNMATH_H) -#include -#endif #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "lo-math.h" #include "lo-specfun.h" #include "lo-utils.h" #include "oct-cmplx.h" diff --git a/liboctave/oct-time.cc b/liboctave/oct-time.cc --- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -25,7 +25,6 @@ #endif #include -#include #include #ifdef HAVE_UNISTD_H @@ -42,6 +41,7 @@ #endif #include "lo-error.h" +#include "lo-math.h" #include "lo-utils.h" #include "oct-time.h" diff --git a/liboctave/oct-time.h b/liboctave/oct-time.h --- a/liboctave/oct-time.h +++ b/liboctave/oct-time.h @@ -23,10 +23,9 @@ #if !defined (octave_time_h) #define octave_time_h 1 -#include - #include +#include "lo-math.h" #include "systime.h" class octave_base_tm; diff --git a/liboctave/randgamma.c b/liboctave/randgamma.c --- a/liboctave/randgamma.c +++ b/liboctave/randgamma.c @@ -81,10 +81,10 @@ #include #endif -#include #include #include "lo-ieee.h" +#include "lo-math.h" #include "randmtzig.h" #include "randgamma.h" diff --git a/liboctave/randmtzig.c b/liboctave/randmtzig.c --- a/liboctave/randmtzig.c +++ b/liboctave/randmtzig.c @@ -147,7 +147,6 @@ #include #endif -#include #include #include @@ -155,6 +154,7 @@ #include #endif +#include "lo-math.h" #include "randmtzig.h" /* FIXME may want to suppress X86 if sizeof(long)>4 */ diff --git a/liboctave/randpoisson.c b/liboctave/randpoisson.c --- a/liboctave/randpoisson.c +++ b/liboctave/randpoisson.c @@ -35,12 +35,12 @@ #include #endif -#include #include #include "f77-fcn.h" +#include "lo-error.h" #include "lo-ieee.h" -#include "lo-error.h" +#include "lo-math.h" #include "randmtzig.h" #include "randpoisson.h" @@ -73,8 +73,6 @@ /* ---- pprsc.c from Stadloeber's winrand --- */ -#include - /* flogfak(k) = ln(k!) */ static double flogfak (double k) diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2007-11-30 John W. Eaton + * src/data.cc, src/matherr.c, src/pr-output.cc, src/sysdep.cc, + src/DLD-FUNCTIONS/__dsearchn__.cc, src/DLD-FUNCTIONS/minmax.cc, + src/DLD-FUNCTIONS/qz.cc, src/DLD-FUNCTIONS/sort.cc, + src/DLD-FUNCTIONS/tsearch.cc: Include lo-math.h instead of cmath + or math.h. + * DLD-FUNCTIONS/sort.cc (ascending_compare, descending_compare, operator < (const Complex&, const Complex&)): Pass args by const reference, not value. diff --git a/src/DLD-FUNCTIONS/__dsearchn__.cc b/src/DLD-FUNCTIONS/__dsearchn__.cc --- a/src/DLD-FUNCTIONS/__dsearchn__.cc +++ b/src/DLD-FUNCTIONS/__dsearchn__.cc @@ -22,13 +22,14 @@ #include #include -#include #include #ifdef HAVE_CONFIG_H #include #endif +#include "lo-math.h" +//FIXME -- Octave sources should use individual include files, not oct.h. #include "oct.h" DEFUN_DLD (__dsearchn__, args, , diff --git a/src/DLD-FUNCTIONS/minmax.cc b/src/DLD-FUNCTIONS/minmax.cc --- a/src/DLD-FUNCTIONS/minmax.cc +++ b/src/DLD-FUNCTIONS/minmax.cc @@ -25,10 +25,9 @@ #include #endif -#include - #include "lo-ieee.h" #include "lo-mappers.h" +#include "lo-math.h" #include "dNDArray.h" #include "CNDArray.h" #include "quit.h" diff --git a/src/DLD-FUNCTIONS/qz.cc b/src/DLD-FUNCTIONS/qz.cc --- a/src/DLD-FUNCTIONS/qz.cc +++ b/src/DLD-FUNCTIONS/qz.cc @@ -32,7 +32,6 @@ #include "config.h" #include -#include #include #include @@ -40,6 +39,7 @@ #include "CmplxQRP.h" #include "dbleQR.h" #include "f77-fcn.h" +#include "lo-math.h" #include "quit.h" #include "defun-dld.h" diff --git a/src/DLD-FUNCTIONS/tsearch.cc b/src/DLD-FUNCTIONS/tsearch.cc --- a/src/DLD-FUNCTIONS/tsearch.cc +++ b/src/DLD-FUNCTIONS/tsearch.cc @@ -24,12 +24,12 @@ #include #include -#include #include #include "oct.h" #include "parse.h" #include "lo-ieee.h" +#include "lo-math.h" inline double max(double a, double b, double c) { diff --git a/src/data.cc b/src/data.cc --- a/src/data.cc +++ b/src/data.cc @@ -36,11 +36,11 @@ #endif #include -#include #include #include "lo-ieee.h" +#include "lo-math.h" #include "str-vec.h" #include "quit.h" diff --git a/src/matherr.c b/src/matherr.c --- a/src/matherr.c +++ b/src/matherr.c @@ -26,7 +26,7 @@ #if defined (EXCEPTION_IN_MATH) -#include +#include "lo-math.h" int matherr (struct exception *x) diff --git a/src/pr-output.cc b/src/pr-output.cc --- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -26,7 +26,6 @@ #endif #include -#include #include #include @@ -41,6 +40,7 @@ #include "cmd-edit.h" #include "dMatrix.h" #include "lo-mappers.h" +#include "lo-math.h" #include "mach-info.h" #include "oct-cmplx.h" #include "quit.h" diff --git a/src/sysdep.cc b/src/sysdep.cc --- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -26,7 +26,6 @@ #endif #include -#include #include #include #include @@ -73,6 +72,7 @@ #include "cmd-edit.h" #include "file-ops.h" #include "lo-mappers.h" +#include "lo-math.h" #include "mach-info.h" #include "oct-env.h" #include "quit.h"