This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Some uses of M_PI in libstdc++ testsuite


Following http://gcc.gnu.org/ml/libstdc++/2009-05/msg00091.html there
are a couple of uses of M_PI in the libstdc++ testsuite.  Defining M_PI
seems safe, as these are testsuite cases.

OK for trunk?

2009-05-14 David Billinghurst <billingd@gcc.gnu.org>

	* testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc:
        Define M_PI if required
	* testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc:
	Likewise

Index: testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc
===================================================================
--- testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc   (revision 147328)
+++ testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc   (working copy)
@@ -26,6 +26,10 @@
 #include <cmath>
 #include <testsuite_hooks.h>

+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 struct cosine_distribution
 {
     cosine_distribution(double x0, double lambda)

Index: testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc
+++ testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc
@@ -26,6 +26,10 @@
 #include <cmath>
 #include <testsuite_hooks.h>

+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 struct cosine_distribution
 {
     cosine_distribution(double x0, double lambda)

Index: testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc
+++ testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc
@@ -26,6 +26,10 @@
 #include <cmath>
 #include <testsuite_hooks.h>

+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 struct cosine_distribution
 {
     cosine_distribution(double x0, double lambda)

Index: testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc
+++ testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc
@@ -26,6 +26,10 @@
 #include <cmath>
 #include <testsuite_hooks.h>

+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 struct cosine_distribution
 {
     cosine_distribution(double x0, double lambda)

Index: testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc
===================================================================
--- testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc
+++ testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc
@@ -26,6 +26,10 @@
 #include <cmath>
 #include <testsuite_hooks.h>

+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
 struct cosine_distribution
 {
     cosine_distribution(double x0, double lambda)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]