From: Emilia Kasper Date: Tue, 19 Aug 2014 11:18:07 +0000 (+0200) Subject: define inline for Visual Studio X-Git-Tag: OpenSSL_1_0_2-beta3~99 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8958be39462552673bdccb3d0cb80c0e6a88f36a;p=oweals%2Fopenssl.git define inline for Visual Studio In Visual Studio, inline is available in C++ only, however __inline is available for C, see http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx Reviewed-by: Richard Levitte Reviewed-by: Dr Stephen Henson (cherry picked from commit f511b25a7370c775dc9fd6198dbacd1706cf242b) --- diff --git a/e_os.h b/e_os.h index 2076f75196..bfd7e36a19 100644 --- a/e_os.h +++ b/e_os.h @@ -376,7 +376,16 @@ static unsigned int _strlen31(const char *str) # define check_winnt() (1) #else # define check_winnt() (GetVersion() < 0x80000000) -#endif +#endif + +/* + * Visual Studio: inline is available in C++ only, however + * __inline is available for C, see + * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx + */ +#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline) +# define inline __inline +#endif #else /* The non-microsoft world */ @@ -741,4 +750,3 @@ struct servent *getservbyname(const char *name, const char *proto); #endif #endif -