[mathicgb] 01/14: apply diffs from Macaulay2 source tree

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Sep 6 00:27:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository mathicgb.

commit 6d9ef4fec05ab836f1aa0664f46070f15ab439e2
Author: Daniel R. Grayson <dan at math.uiuc.edu>
Date:   Mon Sep 22 16:01:36 2014 -0500

    apply diffs from Macaulay2 source tree
---
 configure.ac              | 13 +++++++------
 src/mathicgb/MathicIO.hpp |  7 ++++---
 src/mathicgb/SPairs.hpp   |  4 ++--
 src/test/gtestInclude.cpp |  4 +---
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index ea6a39b..3e5c01f 100755
--- a/configure.ac
+++ b/configure.ac
@@ -12,13 +12,13 @@ AC_LANG([C++])
 # Require C++11 support
 AX_CXX_COMPILE_STDCXX_11(, [mandatory])
 
+AM_PROG_AR
 
 dnl ----- The gtest dependency
 
 AC_ARG_WITH([gtest], AS_HELP_STRING(
     [--with-gtest], [use gtest, which is required for running the unit tests
-      with make check. The value download, which is the default, downloads
-      gtest if a gtest source directory cannot be found. Per the recommendation
+      with make check. Per the recommendation
       of the gtest documentation, gtest is compiled with the tests, so an
       installed gtest is not usable - you need the gtest source. GTEST_PATH
       indicates where to look for gtest and it is also where gtest
@@ -33,7 +33,8 @@ AS_IF([test "x$GTEST_VERSION" == "x"], [GTEST_VERSION="1.6.0"])
 AS_IF([test "x$with_gtest" == "x"], [with_gtest="download"])
 
 AS_IF([test "x$with_gtest" == "xdownload"],
-  [with_gtest="yes"; AC_CHECK_FILE([$GTEST_PATH/gtest/src/gtest-all.cc], [], [
+  [with_gtest="yes"; AC_CHECK_FILE([$GTEST_PATH/src/gtest-all.cc], [], [
+    echo "downloading of gtest disabled" >&2; exit 1
     mkdir -p "$GTEST_PATH";
     (
       cd $GTEST_PATH;
@@ -44,7 +45,7 @@ AS_IF([test "x$with_gtest" == "xdownload"],
       rm -rf gtest/
       mv gtest-$GTEST_VERSION/ gtest/
     );
-    if test ! -e "$GTEST_PATH/gtest/src/gtest-all.cc"; then
+    if test ! -e "$GTEST_PATH/src/gtest-all.cc"; then
       AC_MSG_WARN([Failed to download or extract gtest.]);
       with_gtest="no";
     else
@@ -52,7 +53,7 @@ AS_IF([test "x$with_gtest" == "xdownload"],
     fi
   ])],
   [test "x$with_gtest" == "xyes"], [
-    AC_CHECK_FILE([$GTEST_PATH/gtest/src/gtest-all.cc], [], [
+    AC_CHECK_FILE([$GTEST_PATH/src/gtest-all.cc], [], [
       AC_MSG_ERROR([could not find gtest source at path $GTEST_PATH.])
     ])
   ],
@@ -60,7 +61,7 @@ AS_IF([test "x$with_gtest" == "xdownload"],
   [AC_MSG_ERROR([invalid value $with_gtest for with_gtest.])]
 )
 AS_IF([test "x$with_gtest" == "xyes"],
-  [GTEST_CFLAGS="-I`cd $GTEST_PATH/gtest/include; echo $PWD` -I`cd $GTEST_PATH/gtest/; echo $PWD`"]);
+  [GTEST_CFLAGS="-I$GTEST_PATH/include -I$GTEST_PATH"]);
 AM_CONDITIONAL(with_gtest, test "x$with_gtest" == "xyes")
 
 dnl ----- The TBB dependency
diff --git a/src/mathicgb/MathicIO.hpp b/src/mathicgb/MathicIO.hpp
index 998a8fd..55540cd 100755
--- a/src/mathicgb/MathicIO.hpp
+++ b/src/mathicgb/MathicIO.hpp
@@ -468,13 +468,14 @@ void MathicIO<M, BF>::writeTerm(
   bool writeSignEvenIfPositive,
   std::ostream& out
 ) {
+  Coefficient coef1 = coef;
   if (ring.field().isNegative(coef)) {
     out << "-";
-    coef = ring.field().negativeNonZero(coef);
+    coef1 = ring.field().negativeNonZero(coef);
   } else if (writeSignEvenIfPositive)
     out << '+';
-  if (!ring.field().isOne(coef)) {
-    out << unchar(coef.value());
+  if (!ring.field().isOne(coef1)) {
+    out << unchar(coef1.value());
     if (ring.monoid().isIdentity(mono)) {
       if (writeComponent)
         this->writeComponent(ring.monoid(), mono, out);
diff --git a/src/mathicgb/SPairs.hpp b/src/mathicgb/SPairs.hpp
index aa7ec0f..f11bb6e 100755
--- a/src/mathicgb/SPairs.hpp
+++ b/src/mathicgb/SPairs.hpp
@@ -249,9 +249,9 @@ private:
     mAdvancedBuchbergerLcmCriterionGraph;
 
   friend void mathic::PairQueueNamespace::constructPairData<QueueConfiguration>
-    (void*, Index, Index, QueueConfiguration&);
+  (void*, mathic::PairQueueNamespace::Index, mathic::PairQueueNamespace::Index, QueueConfiguration&);
   friend void mathic::PairQueueNamespace::destructPairData<QueueConfiguration>
-    (OrderMonoid::Mono*, Index, Index, QueueConfiguration&);
+  (OrderMonoid::Mono*, mathic::PairQueueNamespace::Index, mathic::PairQueueNamespace::Index, QueueConfiguration&);
 };
 
 MATHICGB_NAMESPACE_END
diff --git a/src/test/gtestInclude.cpp b/src/test/gtestInclude.cpp
index 3d48078..e9aa972 100755
--- a/src/test/gtestInclude.cpp
+++ b/src/test/gtestInclude.cpp
@@ -12,6 +12,4 @@
 namespace mgb {}
 using namespace mgb;
 
-// the .. goes back from the include/ directory of gtest so we can
-// enter the src directory.
-#include <../src/gtest-all.cc>
+#include "src/gtest-all.cc"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mathicgb.git



More information about the debian-science-commits mailing list