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 f511b25a73)

Conflicts:
	e_os.h
This commit is contained in:
Emilia Kasper 2014-08-19 13:18:07 +02:00
parent fee8d86d7a
commit b30aaafbe5

12
e_os.h
View file

@ -360,7 +360,16 @@ static unsigned int _strlen31(const char *str)
# define DEFAULT_HOME "C:"
# endif
#else /* The non-microsoft world world */
/*
* 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 */
# ifdef OPENSSL_SYS_VMS
# define VMS 1
@ -707,4 +716,3 @@ struct servent *getservbyname(const char *name, const char *proto);
#endif
#endif