[1.5] Rework #ifdef checks. We should check for _M_IX86 instead of not(_M_X64). Thank...
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 27 Feb 2013 08:03:39 +0000 (08:03 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 27 Feb 2013 08:03:39 +0000 (08:03 +0000)
libopenjpeg/opj_includes.h

index 2b5866a99902bd32a2d754d2bd442d2db9d109ce..e9194fd9886f626267bfb9587dd7ad4b7e8bd015 100644 (file)
@@ -89,18 +89,17 @@ Most compilers implement their own version of this keyword ...
 /* MSVC and Borland C do not have lrintf */
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 static INLINE long lrintf(float f){
-#ifdef _M_X64
-    return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
-#else
-    int i;
+#ifdef _M_IX86
+    long int i;
  
     _asm{
         fld f
         fistp i
     };
     return i;
-#endif
+#else
+    return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
+#endif /* _M_IX86 */
 }
 #endif