changeset 23662:bd77ab816e43

eliminate obsolete file lo-math.h * lo-math.h: Delete. * liboctave/util/module.mk: Update. * configure.ac: Delete check for obsolete file sunmath.h. * mk-opts.pl: Emit #include <cmath>, not #include "lo-math.h". Change all uses to include <cmath> instead of "lo-math.h".
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jun 2017 18:26:15 -0400
parents 21b2816820cf
children 9da88b901984
files build-aux/mk-opts.pl configure.ac libinterp/corefcn/__dsearchn__.cc libinterp/corefcn/data.cc libinterp/corefcn/max.cc libinterp/corefcn/pr-output.cc libinterp/corefcn/qz.cc libinterp/corefcn/sysdep.cc libinterp/corefcn/tsearch.cc liboctave/array/Range.cc liboctave/numeric/DET.h liboctave/numeric/lo-mappers.h liboctave/numeric/lo-specfun.cc liboctave/numeric/randgamma.cc liboctave/numeric/randmtzig.cc liboctave/numeric/randpoisson.cc liboctave/system/oct-time.cc liboctave/util/lo-ieee.cc liboctave/util/lo-math.h liboctave/util/module.mk liboctave/util/oct-inttypes.h
diffstat 21 files changed, 27 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/build-aux/mk-opts.pl	Tue Jun 20 14:13:58 2017 -0400
+++ b/build-aux/mk-opts.pl	Tue Jun 20 18:26:15 2017 -0400
@@ -374,9 +374,10 @@
 #if ! defined (octave_${CLASS_NAME}_h)
 #define octave_${CLASS_NAME}_h 1
 
+#include <cmath>
+
 #include <limits>
 
-#include "lo-math.h"
 $INCLUDE
 
 class
--- a/configure.ac	Tue Jun 20 14:13:58 2017 -0400
+++ b/configure.ac	Tue Jun 20 18:26:15 2017 -0400
@@ -2280,7 +2280,7 @@
 dnl Use multiple AC_CHECKs to avoid line continuations '\' in list
 AC_CHECK_HEADERS([curses.h direct.h dlfcn.h floatingpoint.h fpu_control.h])
 AC_CHECK_HEADERS([grp.h ieeefp.h inttypes.h locale.h memory.h ncurses.h])
-AC_CHECK_HEADERS([poll.h pthread.h pwd.h sunmath.h sys/ioctl.h])
+AC_CHECK_HEADERS([poll.h pthread.h pwd.h sys/ioctl.h])
 AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/resource.h])
 AC_CHECK_HEADERS([sys/select.h sys/stropts.h termcap.h])
 
--- a/libinterp/corefcn/__dsearchn__.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/__dsearchn__.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -24,12 +24,12 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
+
 #include <iostream>
 #include <fstream>
 #include <string>
 
-#include "lo-math.h"
-
 #include "defun.h"
 #include "error.h"
 #include "ovl.h"
--- a/libinterp/corefcn/data.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/data.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -37,7 +37,6 @@
 #include <string>
 
 #include "lo-ieee.h"
-#include "lo-math.h"
 #include "mx-base.h"
 #include "oct-base64.h"
 #include "oct-binmap.h"
--- a/libinterp/corefcn/max.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/max.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -25,9 +25,10 @@
 #  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/libinterp/corefcn/pr-output.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/pr-output.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -24,6 +24,8 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
+
 #include <iomanip>
 #include <iostream>
 #include <limits>
@@ -37,7 +39,6 @@
 #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/libinterp/corefcn/qz.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/qz.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -44,7 +44,6 @@
 
 #include "f77-fcn.h"
 #include "lo-lapack-proto.h"
-#include "lo-math.h"
 #include "qr.h"
 #include "quit.h"
 
--- a/libinterp/corefcn/sysdep.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/sysdep.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -24,8 +24,8 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
 #include <cstddef>
-//#include <cstdlib>
 
 #include <iostream>
 #include <string>
@@ -61,7 +61,6 @@
 #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 "unistd-wrappers.h"
--- a/libinterp/corefcn/tsearch.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/libinterp/corefcn/tsearch.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -26,8 +26,9 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
+
 #include "lo-ieee.h"
-#include "lo-math.h"
 
 #include "defun.h"
 #include "error.h"
--- a/liboctave/array/Range.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/array/Range.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -33,7 +33,6 @@
 #include "Range.h"
 #include "lo-error.h"
 #include "lo-mappers.h"
-#include "lo-math.h"
 #include "lo-utils.h"
 
 bool
--- a/liboctave/numeric/DET.h	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/DET.h	Tue Jun 20 18:26:15 2017 -0400
@@ -25,8 +25,9 @@
 
 #include "octave-config.h"
 
+#include <cmath>
+
 #include "lo-mappers.h"
-#include "lo-math.h"
 #include "oct-cmplx.h"
 
 template <typename T>
--- a/liboctave/numeric/lo-mappers.h	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/lo-mappers.h	Tue Jun 20 18:26:15 2017 -0400
@@ -26,10 +26,11 @@
 
 #include "octave-config.h"
 
+#include <cmath>
+
 #include <limits>
 
 #include "lo-ieee.h"
-#include "lo-math.h"
 #include "oct-cmplx.h"
 #include "oct-inttypes-fwd.h"
 
--- a/liboctave/numeric/lo-specfun.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/lo-specfun.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -52,7 +52,6 @@
 #include "lo-error.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
-#include "lo-math.h"
 #include "lo-slatec-proto.h"
 #include "lo-specfun.h"
 #include "mx-inlines.cc"
--- a/liboctave/numeric/randgamma.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/randgamma.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -81,8 +81,9 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
+
 #include "lo-ieee.h"
-#include "lo-math.h"
 #include "randgamma.h"
 #include "randmtzig.h"
 
--- a/liboctave/numeric/randmtzig.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/randmtzig.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -156,9 +156,9 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
 #include <cstdio>
 
-#include "lo-math.h"
 #include "oct-time.h"
 #include "randmtzig.h"
 
--- a/liboctave/numeric/randpoisson.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/numeric/randpoisson.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -35,12 +35,12 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
 #include <cstddef>
 
 #include "f77-fcn.h"
 #include "lo-error.h"
 #include "lo-ieee.h"
-#include "lo-math.h"
 #include "randmtzig.h"
 #include "randpoisson.h"
 
--- a/liboctave/system/oct-time.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/system/oct-time.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -24,12 +24,12 @@
 #  include "config.h"
 #endif
 
+#include <cmath>
+#include <ctime>
+
 #include <limits>
 
-#include <ctime>
-
 #include "lo-error.h"
-#include "lo-math.h"
 #include "lo-utils.h"
 #include "oct-locbuf.h"
 #include "oct-time.h"
--- a/liboctave/util/lo-ieee.cc	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/util/lo-ieee.cc	Tue Jun 20 18:26:15 2017 -0400
@@ -29,6 +29,10 @@
 
 #include <limits>
 
+#include "lo-error.h"
+#include "lo-ieee.h"
+#include "mach-info.h"
+
 static double lo_inf;
 static double lo_nan;
 static double lo_na;
@@ -40,11 +44,6 @@
 static int lo_ieee_hw;
 static int lo_ieee_lw;
 
-#include "lo-error.h"
-#include "lo-ieee.h"
-#include "lo-math.h"
-#include "mach-info.h"
-
 int
 __lo_ieee_is_NA (double x)
 {
--- a/liboctave/util/lo-math.h	Tue Jun 20 14:13:58 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-
-Copyright (C) 2007-2017 John W. Eaton
-
-This file is part of Octave.
-
-Octave is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3 of the License, or
-(at your option) any later version.
-
-Octave is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Octave; see the file COPYING.  If not, see
-<http://www.gnu.org/licenses/>.
-
-*/
-
-#if ! defined (octave_lo_math_h)
-#define octave_lo_math_h 1
-
-#include "octave-config.h"
-
-#if defined (__cplusplus)
-#  include <cmath>
-#else
-#  include <math.h>
-#endif
-
-#if defined (HAVE_SUNMATH_H)
-#  include <sunmath.h>
-#endif
-
-#endif
--- a/liboctave/util/module.mk	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/util/module.mk	Tue Jun 20 18:26:15 2017 -0400
@@ -13,7 +13,6 @@
   %reldir%/lo-cutils.h \
   %reldir%/lo-hash.h \
   %reldir%/lo-ieee.h \
-  %reldir%/lo-math.h \
   %reldir%/lo-regexp.h \
   %reldir%/lo-traits.h \
   %reldir%/lo-utils.h \
--- a/liboctave/util/oct-inttypes.h	Tue Jun 20 14:13:58 2017 -0400
+++ b/liboctave/util/oct-inttypes.h	Tue Jun 20 18:26:15 2017 -0400
@@ -32,7 +32,6 @@
 #include <iosfwd>
 #include <limits>
 
-#include "lo-math.h"
 #include "lo-mappers.h"
 #include "lo-traits.h"