1
0
mirror of https://github.com/qgis/QGIS.git synced 2025-04-29 00:03:59 -04:00

Apply patch , fixes for Windows - MinGW gcc 4.4.0 compiler

git-svn-id: http://svn.osgeo.org/qgis/trunk@12325 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2009-12-03 14:55:48 +00:00
parent 6c3c441b8c
commit ca3d00af0d
3 changed files with 10 additions and 10 deletions

@ -46,14 +46,12 @@
#ifdef MSVC #ifdef MSVC
#undef _fmode #undef _fmode
int _fmode = _O_BINARY; int _fmode = _O_BINARY;
#endif #else
#ifndef _MSC_VER
// Only do this if we are not building on windows with msvc. // 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 // Recommended method for doing this with msvc is with a call to _set_fmode
// which is the first thing we do in main(). // which is the first thing we do in main().
#undef _fmode // Similarly, with MinGW set _fmode in main().
int _fmode = _O_BINARY; #endif //_MSC_VER
#endif//_MSC_VER
#else #else
#include <getopt.h> #include <getopt.h>
#endif #endif
@ -238,9 +236,13 @@ void myMessageOutput( QtMsgType type, const char *msg )
int main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
#ifdef WIN32 // Windows
#ifdef _MSC_VER #ifdef _MSC_VER
_set_fmode( _O_BINARY ); _set_fmode( _O_BINARY );
#endif #else //MinGW
_fmode = _O_BINARY;
#endif // _MSC_VER
#endif // WIN32
#ifndef _MSC_VER #ifndef _MSC_VER
// Set up the custom qWarning/qDebug custom handler // Set up the custom qWarning/qDebug custom handler

@ -37,10 +37,7 @@
#include <list> #include <list>
#include <iostream> #include <iostream>
#include <ctime>
#ifdef _MSC_VER
#include <time.h>
#endif
// TODO ${MAJOR} ${MINOR} etc instead of 0.2 // TODO ${MAJOR} ${MINOR} etc instead of 0.2

@ -20,6 +20,7 @@
%{ %{
#include <qglobal.h> #include <qglobal.h>
#include <QList> #include <QList>
#include <cstdlib>
#include "qgssearchtreenode.h" #include "qgssearchtreenode.h"
// don't redeclare malloc/free // don't redeclare malloc/free