gtest/include/gtest/internal/gtest-port.h to allow the default
behaviour to be applied only if the user hasn't gotten involved.
+To side-step a potential gcc/glibc issue with conflicting isinf/isnan declarations
+(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48891), includes of <math.h> are
+replaced by <cmath> in gtest/src/gtest.cc and include/gmock/gmock-matchers.h.
+
We also apply the patch found at
https://github.com/google/googletest/issues/705#issuecomment-235067917
to fix a segfault with gcc6 arising from gmock's erroneous use of
#include "gtest/gtest-spi.h"
#include <ctype.h>
-#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <wctype.h>
#include <algorithm>
+#include <cmath>
#include <iomanip>
#include <limits>
#include <ostream> // NOLINT
#ifndef GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
#define GMOCK_INCLUDE_GMOCK_GMOCK_MATCHERS_H_
-#include <math.h>
#include <algorithm>
+#include <cmath>
#include <iterator>
#include <limits>
#include <ostream> // NOLINT
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
-#include <math.h>
+#include <cmath>
#include <float.h>
#include "lmmin.h"
+using namespace std;
+
static double lm_enorm(int n, const double* x);
#define MIN(a, b) (((a) <= (b)) ? (a) : (b))
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "integrate.h"
-#include <math.h>
#include <stdio.h>
+#include <cmath>
+
#include "gromacs/math/functions.h"
#include "gromacs/math/vec.h"
#include "gromacs/utility/fatalerror.h"
#include <assert.h>
#include <limits.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/domdec/domdec_network.h"
#include "calculate-spline-moduli.h"
-#include <math.h>
+#include <cmath>
#include <algorithm>
#include "ewald.h"
-#include <math.h>
#include <stdio.h>
+#include <cmath>
#include <cstdlib>
#include <algorithm>
#include "config.h"
#include <assert.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <vector>
#include "gromacs/domdec/domdec.h"
#include "config.h"
#include <assert.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/ewald/ewald-utils.h"
#include <assert.h>
#include <float.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/utility/exceptions.h"
#include "gmxpre.h"
#include <errno.h>
-#include <math.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "external/fftpack/fftpack.h"
#include "gromacs/fft/fft.h"
real * work; /**< 1st 4n reserved for cfft, 1st 2n for rfft */
};
-#include <math.h>
-#include <stdio.h>
-
-
int
gmx_fft_init_1d(gmx_fft_t * pfft,
int nx,
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "restcbt.h"
-#include <math.h>
+#include <cmath>
#include "gromacs/math/functions.h"
#include "gromacs/math/units.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2010,2014,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2014,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "3dtransforms.h"
-#include <math.h>
#include <stdio.h>
+#include <cmath>
+
#include "gromacs/math/vec.h"
#include "gromacs/utility/fatalerror.h"
#include "do_fit.h"
-#include <math.h>
#include <stdio.h>
+#include <cmath>
+
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/utilities.h"
#ifndef GMX_MATH_GMXCOMPLEX_H
#define GMX_MATH_GMXCOMPLEX_H
-#include <math.h>
+#include <cmath>
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/real.h"
#define GMX_MATH_UTILITIES_H
#include <limits.h>
-#include <math.h>
+
+#include <cmath>
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
#include "gmxpre.h"
#include <assert.h>
-#include <math.h>
#include <stdio.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/math/functions.h"
#include "ebin.h"
-#include <math.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "config.h"
#include <assert.h>
-#include <math.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_struct.h"
#include "gromacs/ewald/ewald.h"
#include "mdatoms.h"
-#include <math.h>
+#include <cmath>
#include "gromacs/math/functions.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "mdebin_bar.h"
#include <float.h>
-#include <math.h>
#include <string.h>
#include <cassert>
+#include <cmath>
#include "gromacs/fileio/enxio.h"
#include "gromacs/mdlib/mdebin.h"
#include "gmxpre.h"
#include <assert.h>
-#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/gpu_utils/gpu_utils.h"
#include "gromacs/gpu_utils/oclutils.h"
#include "gromacs/hardware/gpu_hw_info.h"
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#ifndef GMX_MDLIB_NBNXN_UTIL_H
#define GMX_MDLIB_NBNXN_UTIL_H
-#include <math.h>
+#include <cmath>
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "ns.h"
-#include <math.h>
#include <stdlib.h>
#include <string.h>
#if GMX_QMMM_GAMESS
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#if GMX_QMMM_GAUSSIAN
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#if GMX_QMMM_MOPAC
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "qm_orca.h"
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "config.h"
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
*/
#include "gmxpre.h"
-#include <math.h>
+#include <cmath>
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/functions.h"
#include "config.h"
-#include <math.h>
#include <stdio.h>
#include <string.h>
+#include <cmath>
#include <cstdint>
#include <array>
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "tgroup.h"
-#include <math.h>
+#include <cmath>
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/vec.h"
#include "update.h"
-#include <math.h>
#include <stdio.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/domdec/domdec_struct.h"
#include "config.h"
#include <assert.h>
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/commandline/filenm.h"
#include "compiler.h"
-#include <math.h>
#include <stdarg.h>
+#include <cmath>
+
#include <algorithm>
#include "gromacs/math/vec.h"
#include "surfacearea.h"
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <cmath>
+
#include <algorithm>
#include <vector>
#include "config.h"
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <cmath>
+
#include <algorithm>
#include <memory>
#include "config.h"
-#include <math.h>
+#include <cmath>
#include <random>