diff options
author | Emilia Kasper <emilia@openssl.org> | 2014-08-19 13:18:07 +0200 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2014-08-21 16:07:44 +0200 |
commit | 8958be39462552673bdccb3d0cb80c0e6a88f36a (patch) | |
tree | e73592375cc6bc215d367530088a81403095f210 /e_os.h | |
parent | ebf221ee258b3bf420075defe2ddffe17df7e8d5 (diff) |
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 <levitte@openssl.org>
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit f511b25a7370c775dc9fd6198dbacd1706cf242b)
Diffstat (limited to 'e_os.h')
-rw-r--r-- | e_os.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 - |