X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fcb35beb942ced9d2552b5ab5b4fe0df8e6df93a..9a3952fad895c37a0ae8c34a968b7ae7ff8b9a55:/src/mac/carbon/pnghand.cpp

diff --git a/src/mac/carbon/pnghand.cpp b/src/mac/carbon/pnghand.cpp
index f25141d7e9..72c2c05d26 100644
--- a/src/mac/carbon/pnghand.cpp
+++ b/src/mac/carbon/pnghand.cpp
@@ -9,11 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#  pragma implementation "pngread.h"
-#  pragma implementation "pnghand.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -21,10 +16,23 @@
 #  pragma hdrstop
 #endif
 
+#if 0 // wxUSE_LIBPNG
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 
+#if defined(__DARWIN__)
+/* MW's math routines do certain things if __FP__ (the include guard around
+CarbonCore's fp.h) is defined.  CarbonCore's fp.h does certain things if
+__cmath__ is defined so it seems the easy thing to do is to make sure
+__cmath__ is effectively not defined which counteracts the MWERKS check
+then when the real cmath is included everything will be okay.
+*/
+#include <CoreServices/CoreServices.h>
+//#include <cmath>
+#endif //defined(__DARWIN__)
+
 #if wxUSE_IOSTREAMH
 #   include <fstream.h>
 #else
@@ -902,3 +910,4 @@ bool wxPNGFileHandler::SaveFile(const wxBitmap *bitmap, const wxString& name, in
     return FALSE;
 }
 
+#endif //wxUSE_LIBPNG