patch-MinGW-gcc440-fixes.txt
1 |
Index: src/app/main.cpp |
---|---|
2 |
=================================================================== |
3 |
--- src/app/main.cpp (revision 11901) |
4 |
+++ src/app/main.cpp (working copy) |
5 |
@@ -46,14 +46,12 @@ |
6 |
#ifdef MSVC |
7 |
#undef _fmode |
8 |
int _fmode = _O_BINARY; |
9 |
-#endif |
10 |
-#ifndef _MSC_VER |
11 |
+#else |
12 |
// Only do this if we are not building on windows with msvc. |
13 |
// Recommended method for doing this with msvc is with a call to _set_fmode |
14 |
// which is the first thing we do in main(). |
15 |
-#undef _fmode |
16 |
-int _fmode = _O_BINARY; |
17 |
-#endif//_MSC_VER |
18 |
+// Similarly, with MinGW set _fmode in main(). |
19 |
+#endif //_MSC_VER |
20 |
#else |
21 |
#include <getopt.h> |
22 |
#endif |
23 |
@@ -238,9 +236,13 @@ |
24 |
|
25 |
int main( int argc, char *argv[] ) |
26 |
{ |
27 |
+#ifdef WIN32 // Windows |
28 |
#ifdef _MSC_VER |
29 |
_set_fmode( _O_BINARY ); |
30 |
-#endif |
31 |
+#else //MinGW |
32 |
+ _fmode = _O_BINARY; |
33 |
+#endif // _MSC_VER |
34 |
+#endif // WIN32 |
35 |
|
36 |
#ifndef _MSC_VER |
37 |
// Set up the custom qWarning/qDebug custom handler |
38 |
Index: src/core/qgssearchstringparser.yy |
39 |
=================================================================== |
40 |
--- src/core/qgssearchstringparser.yy (revision 11901) |
41 |
+++ src/core/qgssearchstringparser.yy (working copy) |
42 |
@@ -20,6 +20,7 @@ |
43 |
%{ |
44 |
#include <qglobal.h> |
45 |
#include <QList> |
46 |
+#include <cstdlib> |
47 |
#include "qgssearchtreenode.h" |
48 |
|
49 |
// don't redeclare malloc/free |
50 |
Index: src/core/pal/pal.h |
51 |
=================================================================== |
52 |
--- src/core/pal/pal.h (revision 11901) |
53 |
+++ src/core/pal/pal.h (working copy) |
54 |
@@ -39,11 +39,8 @@ |
55 |
|
56 |
#include <list> |
57 |
#include <iostream> |
58 |
+#include <ctime> |
59 |
|
60 |
-#ifdef _MSC_VER |
61 |
-#include <time.h> |
62 |
-#endif |
63 |
- |
64 |
// TODO ${MAJOR} ${MINOR} etc instead of 0.2 |
65 |
|
66 |
/** |