Patch to support the MSVC Win 64 builds (from szekerest)
authorAntonin Descampe <antonin@gmail.com>
Fri, 22 Oct 2010 09:45:53 +0000 (09:45 +0000)
committerAntonin Descampe <antonin@gmail.com>
Fri, 22 Oct 2010 09:45:53 +0000 (09:45 +0000)
CHANGES
libopenjpeg/opj_includes.h

diff --git a/CHANGES b/CHANGES
index 69b14e7c35f697589787129d0ebcf1c7c3d0b493..4906319da9cd60770c91749ec8bf596b83b6e0ae 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
 ! : changed
 + : added
 
+October 22, 2010
+* [antonin] Patch to support the MSVC Win 64 builds (from szekerest)
+
 October 22, 2010
 * [antonin] Currently the Visual Studio builds are broken in the SVN. Attached a patch to fix this issue (from szekerest)
 
index 80d617e310d1947fc1aaa8be6f2c4f6eb0a7fc75..53739abf8157b8a6422a2551b363e1338132f114 100644 (file)
@@ -89,14 +89,18 @@ 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){
-       int i;
-
-       _asm{
-               fld f
-               fistp i
-       };
-
-       return i;
+#ifdef _M_X64
+    return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
+#else
+    int i;
+    _asm{
+        fld f
+        fistp i
+    };
+    return i;
+#endif
 }
 #endif