Commit 40155f40 authored by Andy Polyakov's avatar Andy Polyakov
Browse files

e_os.h: allow inline functions to be compiled by legacy compilers.

parent 92c78463
Loading
Loading
Loading
Loading
+16 −9
Original line number Original line Diff line number Diff line
@@ -361,15 +361,6 @@ static unsigned int _strlen31(const char *str)
#  define check_winnt() (GetVersion() < 0x80000000)
#  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 */
#else /* The non-microsoft world */


#  ifdef OPENSSL_SYS_VMS
#  ifdef OPENSSL_SYS_VMS
@@ -733,6 +724,22 @@ struct servent *getservbyname(const char *name, const char *proto);
#include <OS.h>
#include <OS.h>
#endif
#endif


#if !defined(inline) && !defined(__cplusplus)
# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
   /* do nothing, inline works */
# elif defined(__GNUC__) && __GNUC__>=3 && !defined(__NO_INLINE__)
   /* do nothing, inline works */
# elif defined(_MSC_VER)
  /*
   * Visual Studio: inline is available in C++ only, however
   * __inline is available for C, see
   * http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx
   */
#  define inline __inline
# else
#  define inline
# endif
#endif


#ifdef  __cplusplus
#ifdef  __cplusplus
}
}