Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Portable definition of inline for windows visual C
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 4 Jun 2010 16:04:30 +0000 (16:04 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 4 Jun 2010 16:04:30 +0000 (16:04 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7831 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/misc.h

index 5ee2661..be067f9 100644 (file)
@@ -6,6 +6,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#include "gras_config.h"
+
 #ifndef XBT_MISC_H
 #define XBT_MISC_H
 
 #    else
 #        define XBT_INLINE
 #    endif
-# else
-#    define XBT_INLINE  inline
+#else
+#       if defined (__VISUALC__)
+#              define XBT_INLINE __inline
+#       else
+#      define XBT_INLINE  inline
+#       endif
 #endif
 
 /* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
 #  define XBT_IMPORT_NO_EXPORT(type)  type
 #  define XBT_PUBLIC_DATA(type)       extern type
 
-
 /* Link against the DLL */
 #elif (defined(_WIN32) && !defined(DLL_EXPORT) && !defined(DLL_STATIC))
 #  define XBT_PUBLIC(type)             __declspec(dllimport) type