Skip to content
Permalink
Browse files

Apply patch #2156, fixes for Windows - MinGW gcc 4.4.0 compiler

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12325 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Dec 3, 2009
1 parent bb918db commit 2aeb92081cd0f0a5e5094e9648ce7c82ed68a648
Showing with 10 additions and 10 deletions.
  1. +8 −6 src/app/main.cpp
  2. +1 −4 src/core/pal/pal.h
  3. +1 −0 src/core/qgssearchstringparser.yy
@@ -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 @@ 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
@@ -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

@@ -20,6 +20,7 @@
%{
#include <qglobal.h>
#include <QList>
#include <cstdlib>
#include "qgssearchtreenode.h"

// don't redeclare malloc/free

0 comments on commit 2aeb920

Please sign in to comment.
You can’t perform that action at this time.