Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MSVC] use our extended xbt_malloc, but don't choke on 'strdup' that should read...
[simgrid.git] / include / xbt / base.h
index 1241b63..748b475 100644 (file)
@@ -89,7 +89,7 @@
 #        define XBT_INLINE
 #    endif
 #  else
-#     if defined (__VISUALC__)
+#     if defined (_MSC_VER)
 #       define XBT_INLINE __inline
 #     else
 #       define XBT_INLINE  inline
 #  endif /* __cplusplus */
 #endif
 
+#if defined(__GNUC__)
+#   define XBT_ALWAYS_INLINE inline __attribute__ ((always_inline))
+#else
+#   define XBT_ALWAYS_INLINE XBT_INLINE
+#endif
+
 /* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
 #ifdef MIN
 # undef MIN