#include "wx/image.h"
 #include "wx/numdlg.h"
 
-/* GRG: This is not ANSI standard, define M_PI explicitly
-#include <math.h>       // M_PI
-*/
-
-#ifndef M_PI
-#define M_PI 3.1415926535897932384626433832795
-#endif
-
-
 class MyApp: public wxApp
 {
 public:
 
 
 #include "wx/dc.h"
 
-#include <math.h>
-
 // bool wxDCBase::sm_cacheing = false;
 
 // ============================================================================
     if (node == NULL)
         // empty list
         return;
-    
+
     p = (wxPoint *)node->GetData();
 
     x1 = p->x;
 {
     if( angle != 0.0 )
     {
-        double pi(3.1415926536);
+        double pi(M_PI);
         double dSinA = -sin(angle*2.0*pi/360.0);
         double dCosA = cos(angle*2.0*pi/360.0);
         for ( wxNode* node = points->First(); node; node = node->Next() )
                                         wxCoord w, wxCoord h,
                                         double sa, double ea )
 {
-    double pi = 3.1415926535;
+    double pi = M_PI;
     double sar = 0;
     double ear = 0;
     int xsa = 0;
 
 #include "wx/geometry.h"
 #include "wx/datstrm.h"
 
-// normally this is defined in <math.h>
-#ifndef M_PI
-    #define M_PI 3.14159265358979323846
-#endif
-
 //
 // wxPoint2D
 //
 
 
 #ifndef WX_PRECOMP
 #include "wx/defs.h"
+#include "wx/math.h"
 #endif
 
 #include "wx/matrix.h"
-#include <math.h>
 
-static const double pi = 3.1415926535;
+static const double pi = M_PI;
 
 wxTransformMatrix::wxTransformMatrix(void)
 {
 
 #include "wx/log.h"
 
 #if __MSL__ >= 0x6000
-#include "math.h"
 namespace std {}
 using namespace std ;
 #endif
 #define twips2mm        0.0176388888889
 #define mm2pt            2.83464566929
 #define pt2mm            0.352777777778
-#if !defined( __DARWIN__ ) || defined(__MWERKS__)
-#ifndef M_PI
-const double M_PI = 3.14159265358979 ;
-#endif
-#endif
+
 const double RAD2DEG  = 180.0 / M_PI;
 const short kEmulatedMode = -1 ;
 const short kUnsupportedMode = -2 ;
 
 #include "wx/log.h"
 
 #if __MSL__ >= 0x6000
-#include "math.h"
+namespace std {}
 using namespace std ;
 #endif
 
 #define twips2mm        0.0176388888889
 #define mm2pt            2.83464566929
 #define pt2mm            0.352777777778
-#if !defined( __DARWIN__ ) || defined(__MWERKS__)
-#ifndef M_PI
-const double M_PI = 3.14159265358979 ;
-#endif
-#endif
+
 const double RAD2DEG  = 180.0 / M_PI;
 const short kEmulatedMode = -1 ;
 const short kUnsupportedMode = -2 ;
 
 #include "wx/log.h"
 
 #include <string.h>
-#include <math.h>
 #include <mgraph.hpp>
 
 
 // constants
 //-----------------------------------------------------------------------------
 
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
 const double mm2inches      = 0.0393700787402;
 const double inches2mm      = 25.4;
 const double mm2twips       = 56.6929133859;
 
 #endif
 
 #include <string.h>
-#include <math.h>
 
 #if wxUSE_COMMON_DIALOGS && !defined(__WXMICROWIN__)
     #include <commdlg.h>
 static const int MM_POINTS = 9;
 static const int MM_METRIC = 10;
 
-// usually this is defined in math.h
-#ifndef M_PI
-    static const double M_PI = 3.14159265358979323846;
-#endif // M_PI
-
 // ROPs which don't have standard names (see "Ternary Raster Operations" in the
 // MSDN docs for how this and other numbers in wxDC::Blit() are obtained)
 #define DSTCOPY 0x00AA0029      // a.k.a. NOP operation
 
 #include "wx/dcprint.h"
 
 #include <string.h>
-#include <math.h>
 
 #include "wx/os2/private.h"
 
 static const int MM_POINTS = 9;
 static const int MM_METRIC = 10;
 
-// usually this is defined in math.h
-#ifndef M_PI
-    static const double M_PI = 3.14159265358979323846;
-#endif // M_PI
-
 // ---------------------------------------------------------------------------
 // private functions
 // ---------------------------------------------------------------------------
 
 // Author:      William Osborne
 // Modified by:
 // Created:     10/13/04
-// RCS-ID:      $Id: 
+// RCS-ID:      $Id:
 // Copyright:   (c) William Osborne
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #endif
 
 #include <string.h>
-#include <math.h>
 
 #ifndef AC_SRC_ALPHA
 #define AC_SRC_ALPHA 1
 static const int MM_POINTS = 9;
 static const int MM_METRIC = 10;
 
-// usually this is defined in math.h
-#ifndef M_PI
-    static const double M_PI = 3.14159265358979323846;
-#endif // M_PI
-
 #define DSTCOPY 0x00AA0029
 
 // ---------------------------------------------------------------------------