updated XCode project file
[openjpeg.git] / libopenjpeg / opj_includes.h
index 72152a5ea4b6c08323c3ab73cc022ddf575e47e2..80d43df990f85ec9d544cccf2e81a0470c20748c 100644 (file)
  ==========================================================
 */
 
+/* Ignore GCC attributes if this is not GCC */
+#ifndef __GNUC__
+       #define __attribute__(x) /* __attribute__(x) */
+#endif
+
 /*
 The inline keyword is supported by C99 but not by C90. 
 Most compilers implement their own version of this keyword ... 
@@ -71,7 +76,32 @@ Most compilers implement their own version of this keyword ...
        #endif /* defined(<Compiler>) */
 #endif /* INLINE */
 
+/* Are restricted pointers available? (C99) */
+#if (__STDC_VERSION__ != 199901L)
+       /* Not a C99 compiler */
+       #ifdef __GNUC__
+               #define restrict __restrict__
+       #else
+               #define restrict /* restrict */
+       #endif
+#endif
+
+/* MSVC does not have lrintf */
+#ifdef _MSC_VER
+static INLINE long lrintf(float f){
+       int i;
+
+       _asm{
+               fld f
+               fistp i
+       };
+
+       return i;
+}
+#endif
+
 #include "j2k_lib.h"
+#include "opj_malloc.h"
 #include "event.h"
 #include "cio.h"