changeset 7231:2eb392d058bb

[project @ 2007-11-30 18:53:29 by jwe]
author jwe
date Fri, 30 Nov 2007 18:53:30 +0000
parents a760bd2630d5
children 41680961da9b
files ChangeLog configure.in doc/interpreter/contributors.in liboctave/Array2.h liboctave/ArrayN.h liboctave/ChangeLog 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/Makefile.in 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 src/ChangeLog src/DLD-FUNCTIONS/__dsearchn__.cc src/DLD-FUNCTIONS/minmax.cc src/DLD-FUNCTIONS/qz.cc src/DLD-FUNCTIONS/tsearch.cc src/data.cc src/matherr.c src/pr-output.cc src/sysdep.cc
diffstat 37 files changed, 63 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 30 18:24:35 2007 +0000
+++ b/ChangeLog	Fri Nov 30 18:53:30 2007 +0000
@@ -1,3 +1,7 @@
+2007-11-30  Moritz Borgmann  <octave@moriborg.de>
+
+	* configure.in: Also check for sunmath.h.
+
 2007-11-26  David Bateman  <dbateman@free.fr>
 
 	* PROJECTS: condest now implemented.
--- a/configure.in	Fri Nov 30 18:24:35 2007 +0000
+++ b/configure.in	Fri Nov 30 18:53:30 2007 +0000
@@ -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)
--- a/doc/interpreter/contributors.in	Fri Nov 30 18:24:35 2007 +0000
+++ b/doc/interpreter/contributors.in	Fri Nov 30 18:53:30 2007 +0000
@@ -12,6 +12,7 @@
 David Billinghurst
 Don Bindner
 Jakub Bogusz
+Moritz Borgmann
 Marcus Brinkmann
 Remy Bruno
 Marco Caliari
--- a/liboctave/Array2.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/Array2.h	Fri Nov 30 18:53:30 2007 +0000
@@ -27,11 +27,11 @@
 
 #include <cassert>
 #include <climits>
-#include <cmath>
 #include <cstdlib>
 
 #include "Array.h"
 #include "lo-error.h"
+#include "lo-math.h"
 
 class idx_vector;
 
--- a/liboctave/ArrayN.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/ArrayN.h	Fri Nov 30 18:53:30 2007 +0000
@@ -29,12 +29,12 @@
 
 #include <cassert>
 #include <climits>
-#include <cmath>
 #include <cstdlib>
 
 #include "Array.h"
 #include "Array2.h"
 #include "lo-error.h"
+#include "lo-math.h"
 
 class idx_vector;
 
--- a/liboctave/ChangeLog	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/ChangeLog	Fri Nov 30 18:53:30 2007 +0000
@@ -1,3 +1,19 @@
+2007-11-30  John W. Eaton  <jwe@octave.org>
+
+	* 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  <jwe@octave.org>
 
 	* idx-vector.h (idx_vector::idx_vector_rep (const intNDArray<U>&)):
--- a/liboctave/CmplxDET.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/CmplxDET.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -27,10 +27,10 @@
 
 #include <cassert>
 #include <cfloat>
-#include <cmath>
 
 #include "CmplxDET.h"
 #include "lo-mappers.h"
+#include "lo-math.h"
 #include "oct-cmplx.h"
 
 bool
--- a/liboctave/DASPK.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASPK.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,13 +26,13 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <sstream>
 
 #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*,
--- a/liboctave/DASPK.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASPK.h	Fri Nov 30 18:53:30 2007 +0000
@@ -25,9 +25,9 @@
 #define octave_DASPK_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "DASPK-opts.h"
+#include "lo-math.h"
 
 class
 OCTAVE_API
--- a/liboctave/DASRT.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASRT.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -25,13 +25,13 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <sstream>
 
 #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*,
--- a/liboctave/DASRT.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASRT.h	Fri Nov 30 18:53:30 2007 +0000
@@ -24,9 +24,9 @@
 #define octave_DASRT_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "DASRT-opts.h"
+#include "lo-math.h"
 
 class
 DASRT_result
--- a/liboctave/DASSL.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASSL.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,13 +26,13 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <sstream>
 
 #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*,
--- a/liboctave/DASSL.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/DASSL.h	Fri Nov 30 18:53:30 2007 +0000
@@ -25,9 +25,9 @@
 #define octave_DASSL_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "DASSL-opts.h"
+#include "lo-math.h"
 
 class
 OCTAVE_API
--- a/liboctave/LSODE.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/LSODE.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,13 +26,13 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <sstream>
 
 #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*,
--- a/liboctave/LSODE.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/LSODE.h	Fri Nov 30 18:53:30 2007 +0000
@@ -25,9 +25,9 @@
 #define octave_LSODE_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "LSODE-opts.h"
+#include "lo-math.h"
 
 class
 OCTAVE_API
--- a/liboctave/Makefile.in	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/Makefile.in	Fri Nov 30 18:53:30 2007 +0000
@@ -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 \
--- a/liboctave/NLEqn.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/NLEqn.h	Fri Nov 30 18:53:30 2007 +0000
@@ -25,9 +25,9 @@
 #define octave_NLEqn_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "NLEqn-opts.h"
+#include "lo-math.h"
 
 class
 OCTAVE_API
--- a/liboctave/Quad.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/Quad.h	Fri Nov 30 18:53:30 2007 +0000
@@ -25,9 +25,9 @@
 #define octave_Quad_h 1
 
 #include <cfloat>
-#include <cmath>
 
 #include "dColVector.h"
+#include "lo-math.h"
 
 #if !defined (octave_Quad_typedefs)
 #define octave_Quad_typedefs 1
--- a/liboctave/Range.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/Range.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,13 +26,13 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <iostream>
 #include <limits>
 
 #include "Range.h"
 #include "lo-mappers.h"
+#include "lo-math.h"
 #include "lo-utils.h"
 
 bool
--- a/liboctave/dbleDET.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/dbleDET.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,10 +26,10 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include "dbleDET.h"
 #include "lo-mappers.h"
+#include "lo-math.h"
 
 bool
 DET::value_will_overflow (void) const
--- a/liboctave/lo-cieee.c	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/lo-cieee.c	Fri Nov 30 18:53:30 2007 +0000
@@ -25,7 +25,6 @@
 #endif
 
 #include <float.h>
-#include <math.h>
 
 #if defined (HAVE_FLOATINGPOINT_H)
 #include <floatingpoint.h>
@@ -46,6 +45,7 @@
 #endif
 
 #include "lo-ieee.h"
+#include "lo-math.h"
 
 #if ! defined (HAVE_ISNAN) && defined (HAVE__ISNAN)
 #define isnan _isnan
--- a/liboctave/lo-ieee.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/lo-ieee.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,7 +26,6 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #if defined (HAVE_FLOATINGPOINT_H)
 #include <floatingpoint.h>
@@ -48,6 +47,7 @@
 
 #include "lo-error.h"
 #include "lo-ieee.h"
+#include "lo-math.h"
 #include "mach-info.h"
 
 void
--- a/liboctave/lo-mappers.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/lo-mappers.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,15 +26,11 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
-
-#if defined (HAVE_SUNMATH_H)
-#include <sunmath.h>
-#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"
--- a/liboctave/oct-time.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/oct-time.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -25,7 +25,6 @@
 #endif
 
 #include <climits>
-#include <cmath>
 #include <ctime>
 
 #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"
 
--- a/liboctave/oct-time.h	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/oct-time.h	Fri Nov 30 18:53:30 2007 +0000
@@ -23,10 +23,9 @@
 #if !defined (octave_time_h)
 #define octave_time_h 1
 
-#include <cmath>
-
 #include <string>
 
+#include "lo-math.h"
 #include "systime.h"
 
 class octave_base_tm;
--- a/liboctave/randgamma.c	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/randgamma.c	Fri Nov 30 18:53:30 2007 +0000
@@ -81,10 +81,10 @@
 #include <config.h>
 #endif
 
-#include <math.h>
 #include <stdio.h>
 
 #include "lo-ieee.h"
+#include "lo-math.h"
 #include "randmtzig.h"
 #include "randgamma.h"
 
--- a/liboctave/randmtzig.c	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/randmtzig.c	Fri Nov 30 18:53:30 2007 +0000
@@ -147,7 +147,6 @@
 #include <config.h>
 #endif
 
-#include <math.h>
 #include <stdio.h>
 #include <time.h>
 
@@ -155,6 +154,7 @@
 #include <sys/time.h>
 #endif
 
+#include "lo-math.h"
 #include "randmtzig.h"
    
 /* FIXME may want to suppress X86 if sizeof(long)>4 */
--- a/liboctave/randpoisson.c	Fri Nov 30 18:24:35 2007 +0000
+++ b/liboctave/randpoisson.c	Fri Nov 30 18:53:30 2007 +0000
@@ -35,12 +35,12 @@
 #include <config.h>
 #endif
 
-#include <math.h>
 #include <stdio.h>
 
 #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 <math.h>
-
 /* flogfak(k) = ln(k!) */
 static double 
 flogfak (double k)
--- a/src/ChangeLog	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/ChangeLog	Fri Nov 30 18:53:30 2007 +0000
@@ -1,5 +1,11 @@
 2007-11-30  John W. Eaton  <jwe@octave.org>
 
+	* 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.
--- a/src/DLD-FUNCTIONS/__dsearchn__.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/DLD-FUNCTIONS/__dsearchn__.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -22,13 +22,14 @@
 
 #include <iostream>
 #include <fstream>
-#include <cmath>
 #include <string>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include "lo-math.h"
+//FIXME -- Octave sources should use individual include files, not oct.h.
 #include "oct.h"
 
 DEFUN_DLD (__dsearchn__, args, ,
--- a/src/DLD-FUNCTIONS/minmax.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/DLD-FUNCTIONS/minmax.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -25,10 +25,9 @@
 #include <config.h>
 #endif
 
-#include <cmath>
-
 #include "lo-ieee.h"
 #include "lo-mappers.h"
+#include "lo-math.h"
 #include "dNDArray.h"
 #include "CNDArray.h"
 #include "quit.h"
--- a/src/DLD-FUNCTIONS/qz.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/DLD-FUNCTIONS/qz.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -32,7 +32,6 @@
 #include "config.h"
 
 #include <cfloat>
-#include <cmath>
 
 #include <iostream>
 #include <iomanip>
@@ -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"
--- a/src/DLD-FUNCTIONS/tsearch.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/DLD-FUNCTIONS/tsearch.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -24,12 +24,12 @@
 
 #include <iostream>
 #include <fstream>
-#include <cmath>
 #include <string>
 
 #include "oct.h"
 #include "parse.h"
 #include "lo-ieee.h"
+#include "lo-math.h"
 
 inline double max(double a, double b, double c)
 {
--- a/src/data.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/data.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -36,11 +36,11 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 
 #include <string>
 
 #include "lo-ieee.h"
+#include "lo-math.h"
 #include "str-vec.h"
 #include "quit.h"
 
--- a/src/matherr.c	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/matherr.c	Fri Nov 30 18:53:30 2007 +0000
@@ -26,7 +26,7 @@
 
 #if defined (EXCEPTION_IN_MATH)
 
-#include <math.h>
+#include "lo-math.h"
 
 int
 matherr (struct exception *x)
--- a/src/pr-output.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/pr-output.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,7 +26,6 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 #include <cstdio>
 #include <cstring>
 
@@ -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"
--- a/src/sysdep.cc	Fri Nov 30 18:24:35 2007 +0000
+++ b/src/sysdep.cc	Fri Nov 30 18:53:30 2007 +0000
@@ -26,7 +26,6 @@
 #endif
 
 #include <cfloat>
-#include <cmath>
 #include <cstddef>
 #include <cstdio>
 #include <cstdlib>
@@ -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"