Skip to content

Commit

Permalink
Apply patch #2156, fixes for Windows - MinGW gcc 4.4.0 compiler
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12325 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 3, 2009
1 parent bb918db commit 2aeb920
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 8 additions & 6 deletions src/app/main.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -238,9 +236,13 @@ void myMessageOutput( QtMsgType type, const char *msg )

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
Expand Down
5 changes: 1 addition & 4 deletions src/core/pal/pal.h
Expand Up @@ -37,10 +37,7 @@

#include <list>
#include <iostream>

#ifdef _MSC_VER
#include <time.h>
#endif
#include <ctime>

// TODO ${MAJOR} ${MINOR} etc instead of 0.2

Expand Down
1 change: 1 addition & 0 deletions src/core/qgssearchstringparser.yy
Expand Up @@ -20,6 +20,7 @@
%{
#include <qglobal.h>
#include <QList>
#include <cstdlib>
#include "qgssearchtreenode.h"

// don't redeclare malloc/free
Expand Down

0 comments on commit 2aeb920

Please sign in to comment.