[trunk] Add a temporary work around for issue 293
[openjpeg.git] / src / lib / openjp2 / opj_includes.h
index 4397149ad8995afc56ef6454bdf22526950e6425..8b072c5853b3e7e4d4ef61a3282a6a38d11beec0 100644 (file)
@@ -32,7 +32,7 @@
  * This must be included before any system headers,
  * since they can react to macro defined there
  */
-#include "opj_config.h"
+#include "opj_config_private.h"
 
 /*
  ==========================================================
@@ -56,7 +56,7 @@
   ftello() only on systems with special LFS support since some systems
   (e.g. FreeBSD) support a 64-bit off_t by default.
 */
-#if defined(HAVE_FSEEKO)
+#if defined(OPJ_HAVE_FSEEKO) && !defined(fseek)
 #  define fseek  fseeko
 #  define ftell  ftello
 #endif
@@ -129,8 +129,8 @@ Most compilers implement their own version of this keyword ...
        #endif
 #endif
 
-/* MSVC and Borland C do not have lrintf */
-#if defined(_MSC_VER) || defined(__BORLANDC__)
+/* MSVC before 2013 and Borland C do not have lrintf */
+#if defined(_MSC_VER) && (_MSC_VER < 1800) || defined(__BORLANDC__)
 static INLINE long lrintf(float f){
 #ifdef _M_X64
     return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
@@ -185,6 +185,7 @@ static INLINE long lrintf(float f){
 /* <<JPWL */
 
 /* V2 */
+#include "opj_codec.h"
 
 
 #endif /* OPJ_INCLUDES_H */