diff -cN qt-everywhere-opensource-src-4.7.4/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
*** qt-everywhere-opensource-src-4.7.4/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp.ORG	Fri Dec  9 12:45:55 2011
--- qt-everywhere-opensource-src-4.7.4/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp	Fri Dec  9 12:57:28 2011
***************
*** 391,398 ****
--- 391,403 ----
      // anti-aliased text rendering. In such cases, we snap the translate to the pixel grid.
      if (snapToPixelGrid && transform.type() == QTransform::TxTranslate) {
          // 0.50 needs to rounded down to 0.0 for consistency with raster engine:
+ #ifdef QT_USE_MATH_H_FLOATS
          dx = ceilf(dx - 0.5f);
          dy = ceilf(dy - 0.5f);
+ #else
+         dx = ceil(dx - 0.5f);
+         dy = ceil(dy - 0.5f);
+ #endif
      }
  #ifndef Q_OS_SYMBIAN
      if (addOffset) {
diff -cN qt-everywhere-opensource-src-4.7.4/src/declarative/graphicsitems/qdeclarativegridview.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/declarative/graphicsitems/qdeclarativegridview.cpp
*** qt-everywhere-opensource-src-4.7.4/src/declarative/graphicsitems/qdeclarativegridview.cpp.ORG	Mon Sep 12 15:49:29 2011
--- qt-everywhere-opensource-src-4.7.4/src/declarative/graphicsitems/qdeclarativegridview.cpp	Fri Dec  9 19:10:45 2011
***************
*** 352,358 ****
              pos += highlightStart;
              pos += rowSize()/2;
              snapPos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize();
!             snapPos = pos - fmodf(pos - snapPos, qreal(rowSize()));
              snapPos -= highlightStart;
              qreal maxExtent;
              qreal minExtent;
--- 352,363 ----
              pos += highlightStart;
              pos += rowSize()/2;
              snapPos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize();
! #ifdef QT_USE_MATH_H_FLOATS
! 	    if(sizeof(qreal) == sizeof(float))
! 	      snapPos = pos - fmodf(pos - snapPos, qreal(rowSize()));
! 	    else
! #endif
! 	      snapPos = pos - fmod(pos - snapPos, qreal(rowSize()));
              snapPos -= highlightStart;
              qreal maxExtent;
              qreal minExtent;
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h	Fri Dec  9 17:25:03 2011
***************
*** 82,87 ****
--- 82,90 ----
  #ifndef signbit
  inline bool signbit(double x) { return x < 0.0; } // FIXME: Wrong for negative 0.
  #endif
+ #ifndef trunc
+ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
+ #endif
  
  #endif
  
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/config.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/config.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/config.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/config.h	Fri Dec  9 15:30:50 2011
***************
*** 58,64 ****
--- 58,68 ----
  #endif
  
  /* FIXME: if all platforms have these, do they really need #defines? */
+ #if !OS(SOLARIS)
  #define HAVE_STDINT_H 1
+ #else
+ #define HAVE_INTTYPES_H 1
+ #endif
  
  #define WTF_CHANGES 1
  
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h	Fri Dec  9 15:30:43 2011
***************
*** 28,34 ****
--- 28,40 ----
  
  #include <config.h>
  
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  
  QT_BEGIN_NAMESPACE
  namespace QUnicodeTables {
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h	Fri Dec  9 14:57:06 2011
***************
*** 76,82 ****
--- 76,88 ----
  //
  
  #include <new>
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <stdlib.h>
  #include <string.h>
  #include "Assertions.h"
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashFunctions.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashFunctions.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashFunctions.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashFunctions.h	Fri Dec  9 14:56:51 2011
***************
*** 22,28 ****
--- 22,34 ----
  #define WTF_HashFunctions_h
  
  #include "RefPtr.h"
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  
  namespace WTF {
  
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h.ORG	Fri Dec  9 14:52:25 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h	Fri Dec  9 14:56:16 2011
***************
*** 99,105 ****
--- 99,111 ----
  QT_END_NAMESPACE
  #endif
  
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  
  // For portability, we do not use thread-safe statics natively supported by some compilers (e.g. gcc).
  #define AtomicallyInitializedStatic(T, name) \
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Error.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Error.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Error.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Error.h	Fri Dec  9 15:35:23 2011
***************
*** 23,29 ****
--- 23,35 ----
  #ifndef Error_h
  #define Error_h
  
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  
  namespace JSC {
  
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h	Fri Dec  9 15:35:43 2011
***************
*** 34,40 ****
--- 34,46 ----
  #include <limits>
  #include <limits.h>
  #include <stdarg.h>
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <stdlib.h>
  
  namespace JSC {
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h	Fri Dec  9 15:35:57 2011
***************
*** 27,33 ****
--- 27,39 ----
  #include "ConstructData.h"
  #include <math.h>
  #include <stddef.h> // for size_t
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <wtf/AlwaysInline.h>
  #include <wtf/Assertions.h>
  #include <wtf/HashTraits.h>
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UString.h.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UString.h
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UString.h.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UString.h	Fri Dec  9 15:36:09 2011
***************
*** 25,31 ****
--- 25,37 ----
  
  #include "Collector.h"
  #include "UStringImpl.h"
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <string.h>
  #include <wtf/Assertions.h>
  #include <wtf/CrossThreadRefCounted.h>
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp	Fri Dec  9 18:20:28 2011
***************
*** 80,86 ****
--- 80,92 ----
  #include <algorithm>
  #include <limits.h>
  #include <limits>
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <time.h>
  
  
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RandomNumber.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RandomNumber.cpp
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RandomNumber.cpp.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RandomNumber.cpp	Fri Dec  9 18:31:47 2011
***************
*** 31,37 ****
--- 31,43 ----
  
  #include <limits>
  #include <limits.h>
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <stdlib.h>
  
  #if OS(WINCE)
diff -cN qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp.ORG qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp
*** qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp.ORG	Mon Sep 12 15:49:28 2011
--- qt-everywhere-opensource-src-4.7.4/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp	Fri Dec  9 18:32:04 2011
***************
*** 141,147 ****
--- 141,153 ----
  #define NO_ERRNO
  #endif
  #include <math.h>
+ #if HAVE(STDINT_H)
  #include <stdint.h>
+ #elif HAVE(INTTYPES_H)
+ #include <inttypes.h>
+ #else
+ #include <sys/types.h>
+ #endif
  #include <stdlib.h>
  #include <string.h>
  #include <wtf/AlwaysInline.h>
