workaround for Perl5 on OSX including math.h somewhere

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-04-05 21:04:11 +00:00
commit ec4491556f

View file

@ -50,7 +50,7 @@ extern double (Shape::*perimetervar)(void);
%}
%{
# define M_PI 3.14159265358979323846
# define SWIG_M_PI 3.14159265358979323846
/* Move the shape to a new location */
void Shape::move(double dx, double dy) {
@ -61,11 +61,11 @@ void Shape::move(double dx, double dy) {
int Shape::nshapes = 0;
double Circle::area(void) {
return M_PI*radius*radius;
return SWIG_M_PI*radius*radius;
}
double Circle::perimeter(void) {
return 2*M_PI*radius;
return 2*SWIG_M_PI*radius;
}
double Square::area(void) {