From 2fae50dec7ea8e3550c62dace3c0a3b57d0e1fa9 Mon Sep 17 00:00:00 2001 From: navarrop Date: Fri, 4 Jun 2010 16:04:30 +0000 Subject: [PATCH] Portable definition of inline for windows visual C git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7831 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/misc.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 5ee26611b4..be067f9497 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -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 @@ -55,8 +57,12 @@ # 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 */ @@ -139,7 +145,6 @@ # 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 -- 2.20.1