[llvm] Fix more memory leaks.
[mono.git] / mono / utils / mono-compiler.h
index 2d7a545068001ef843af994fcea9b2ca7fca2d6f..a533a9f01e33867044ce77558d92992f1bfac588 100644 (file)
 /* Deal with Microsoft C compiler differences */
 #ifdef _MSC_VER
 
+#include <math.h>
+
+#if _MSC_VER < 1800 /* VS 2013 */
+#define strtoull _strtoui64
+#endif
+
 #include <float.h>
 #define isnan(x)       _isnan(x)
 #define trunc(x)       (((x) < 0) ? ceil((x)) : floor((x)))
 
 #endif /* _MSC_VER */
 
-#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && HAVE_VISIBILITY_HIDDEN
+#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
 #define MONO_INTERNAL __attribute__ ((visibility ("hidden")))
 #if MONO_LLVM_LOADED
 #define MONO_LLVM_INTERNAL 
 #define MONO_DEPRECATED 
 #endif
 
+#ifdef __GNUC__
+#define MONO_ALWAYS_INLINE __attribute__((always_inline))
+#elif defined(_MSC_VER)
+#define MONO_ALWAYS_INLINE __forceinline
+#else
+#define MONO_ALWAYS_INLINE
+#endif
+
 #endif /* __UTILS_MONO_COMPILER_H__*/