[QGIS Commit] r12325 - in trunk/qgis/src: app core core/pal

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 3 09:55:49 EST 2009


Author: mhugent
Date: 2009-12-03 09:55:48 -0500 (Thu, 03 Dec 2009)
New Revision: 12325

Modified:
   trunk/qgis/src/app/main.cpp
   trunk/qgis/src/core/pal/pal.h
   trunk/qgis/src/core/qgssearchstringparser.yy
Log:
Apply patch #2156, fixes for Windows - MinGW gcc 4.4.0 compiler

Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp	2009-12-03 14:28:02 UTC (rev 12324)
+++ trunk/qgis/src/app/main.cpp	2009-12-03 14:55:48 UTC (rev 12325)
@@ -46,14 +46,12 @@
 #ifdef MSVC
 #undef _fmode
 int _fmode = _O_BINARY;
-#endif
-#ifndef _MSC_VER
+#else
 // Only do this if we are not building on windows with msvc.
 // Recommended method for doing this with msvc is with a call to _set_fmode
 // which is the first thing we do in main().
-#undef _fmode
-int _fmode = _O_BINARY;
-#endif//_MSC_VER
+// Similarly, with MinGW set _fmode in main().
+#endif	//_MSC_VER
 #else
 #include <getopt.h>
 #endif
@@ -238,9 +236,13 @@
 
 int main( int argc, char *argv[] )
 {
+#ifdef WIN32	// Windows
 #ifdef _MSC_VER
   _set_fmode( _O_BINARY );
-#endif
+#else	//MinGW
+  _fmode = _O_BINARY;
+#endif	// _MSC_VER
+#endif	// WIN32
 
 #ifndef _MSC_VER
   // Set up the custom qWarning/qDebug custom handler

Modified: trunk/qgis/src/core/pal/pal.h
===================================================================
--- trunk/qgis/src/core/pal/pal.h	2009-12-03 14:28:02 UTC (rev 12324)
+++ trunk/qgis/src/core/pal/pal.h	2009-12-03 14:55:48 UTC (rev 12325)
@@ -37,11 +37,8 @@
 
 #include <list>
 #include <iostream>
+#include <ctime>
 
-#ifdef _MSC_VER
-#include <time.h>
-#endif
-
 // TODO ${MAJOR} ${MINOR} etc instead of 0.2
 
 /**

Modified: trunk/qgis/src/core/qgssearchstringparser.yy
===================================================================
--- trunk/qgis/src/core/qgssearchstringparser.yy	2009-12-03 14:28:02 UTC (rev 12324)
+++ trunk/qgis/src/core/qgssearchstringparser.yy	2009-12-03 14:55:48 UTC (rev 12325)
@@ -20,6 +20,7 @@
 %{
 #include <qglobal.h>
 #include <QList>
+#include <cstdlib>
 #include "qgssearchtreenode.h"
 
 // don't redeclare malloc/free



More information about the QGIS-commit mailing list