Temporary fixes so we can continue to build in smock.
[fedora-mingw.git] / qt-win / mingw32-qt-4.4.3-no-fpu-functions.patch
1 diff -ur qt-win-opensource-src-4.4.3.orig/src/corelib/tools/qlocale.cpp qt-win-opensource-src-4.4.3/src/corelib/tools/qlocale.cpp
2 --- qt-win-opensource-src-4.4.3.orig/src/corelib/tools/qlocale.cpp      2008-09-27 10:00:55.000000000 +0100
3 +++ qt-win-opensource-src-4.4.3/src/corelib/tools/qlocale.cpp   2009-02-02 11:39:40.000000000 +0000
4 @@ -6238,6 +6238,10 @@
5  \r
6  Q_CORE_EXPORT char *qdtoa ( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)\r
7  {\r
8 +    // RWMJ: The 8087-twiddling functions just don't seem to exist\r
9 +    // in MinGW cross-compiler, so comment out that code and hope for\r
10 +    // the best ...\r
11 +#if 0\r
12      // Some values of the floating-point control word can cause _qdtoa to crash with an underflow.\r
13      // We set a safe value here.\r
14  #ifdef Q_OS_WIN\r
15 @@ -6257,9 +6261,11 @@
16      fenv_t envp;\r
17      feholdexcept(&envp);\r
18  #endif\r
19 +#endif\r
20  \r
21      char *s = _qdtoa(d, mode, ndigits, decpt, sign, rve, resultp);\r
22  \r
23 +#if 0 // RWMJ - see above.\r
24  #ifdef Q_OS_WIN\r
25      _clear87();\r
26  #ifndef _M_X64\r
27 @@ -6272,6 +6278,7 @@
28  #if defined(Q_OS_LINUX) && !defined(__UCLIBC__)\r
29      fesetenv(&envp);\r
30  #endif\r
31 +#endif\r
32  \r
33      return s;\r
34  }\r