[trunk] Move INLINE definition within openjpeg.h header since application may use it
[openjpeg.git] / src / lib / openjp2 / openjpeg.h
index d3339954d26f64dbd0590cb0801a27df94839e5a..59a1cdc463a9744b83b7fac833bc5ed2c7ce81bd 100644 (file)
 ==========================================================
 */
 
+/*
+The inline keyword is supported by C99 but not by C90. 
+Most compilers implement their own version of this keyword ... 
+*/
+#ifndef INLINE
+       #if defined(_MSC_VER)
+               #define INLINE __forceinline
+       #elif defined(__GNUC__)
+               #define INLINE __inline__
+       #elif defined(__MWERKS__)
+               #define INLINE inline
+       #else 
+               /* add other compilers here ... */
+               #define INLINE 
+       #endif /* defined(<Compiler>) */
+#endif /* INLINE */
+
 /* deprecated attribute */
 #ifdef __GNUC__
        #define OPJ_DEPRECATED(func) func __attribute__ ((deprecated))