[trunk] Add a temporary work around for issue 293
[openjpeg.git] / src / lib / openjp2 / opj_includes.h
index 98a5b86b1b5a97a2344e812cef1e54f899c32117..8b072c5853b3e7e4d4ef61a3282a6a38d11beec0 100644 (file)
@@ -1,5 +1,7 @@
 /*
  * Copyright (c) 2005, Herve Drolon, FreeImage Team
+ * Copyright (c) 2008;2011-2012, Centre National d'Etudes Spatiales (CNES), France 
+ * Copyright (c) 2012, CS Systemes d'Information, France
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,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"
 
 /*
  ==========================================================
@@ -54,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
@@ -127,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));
@@ -146,32 +148,35 @@ static INLINE long lrintf(float f){
 #endif
 
 #include "opj_inttypes.h"
-#include "j2k_lib.h"
+#include "opj_clock.h"
 #include "opj_malloc.h"
+#include "function_list.h"
 #include "event.h"
 #include "bio.h"
 #include "cio.h"
 
 #include "image.h"
+#include "invert.h"
 #include "j2k.h"
 #include "jp2.h"
-#include "jpt.h"
 
 #include "mqc.h"
 #include "raw.h"
 #include "bio.h"
-#include "tgt.h"
+
 #include "pi.h"
+#include "tgt.h"
 #include "tcd.h"
 #include "t1.h"
 #include "dwt.h"
 #include "t2.h"
 #include "mct.h"
-#include "int.h"
-#include "fix.h"
+#include "opj_intmath.h"
 
+#ifdef USE_JPIP
 #include "cidx_manager.h"
 #include "indexbox_manager.h"
+#endif
 
 /* JPWL>> */
 #ifdef USE_JPWL
@@ -180,6 +185,7 @@ static INLINE long lrintf(float f){
 /* <<JPWL */
 
 /* V2 */
-#include "function_list.h"
+#include "opj_codec.h"
+
 
 #endif /* OPJ_INCLUDES_H */