summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/e_os.h
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2015-01-08 23:42:41 +0000
committerjkim <jkim@FreeBSD.org>2015-01-08 23:42:41 +0000
commit4f9b1cef1a6825f03178937e0feb39a2b2d046c8 (patch)
tree6c2f3cb14d70e0247fe500835bed3d3588c3025e /crypto/openssl/e_os.h
parentcfd5b20c8bb6e3677ef84152d28058c0ead0de39 (diff)
parenta350427e88bc6ff288594c964ca0f57464062eb0 (diff)
downloadFreeBSD-src-4f9b1cef1a6825f03178937e0feb39a2b2d046c8.zip
FreeBSD-src-4f9b1cef1a6825f03178937e0feb39a2b2d046c8.tar.gz
Merge OpenSSL 1.0.1k.
Diffstat (limited to 'crypto/openssl/e_os.h')
-rw-r--r--crypto/openssl/e_os.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/crypto/openssl/e_os.h b/crypto/openssl/e_os.h
index 733155e..832272e 100644
--- a/crypto/openssl/e_os.h
+++ b/crypto/openssl/e_os.h
@@ -290,7 +290,7 @@ extern "C" {
# ifdef _WIN64
# define strlen(s) _strlen31(s)
/* cut strings to 2GB */
-static unsigned int _strlen31(const char *str)
+static __inline unsigned int _strlen31(const char *str)
{
unsigned int len=0;
while (*str && len<0x80000000U) str++, len++;
@@ -375,15 +375,6 @@ static unsigned int _strlen31(const char *str)
# define check_winnt() (GetVersion() < 0x80000000)
#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 */
# ifdef OPENSSL_SYS_VMS
@@ -741,6 +732,22 @@ struct servent *getservbyname(const char *name, const char *proto);
#include <OS.h>
#endif
+#if !defined(inline) && !defined(__cplusplus)
+# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
+ /* do nothing, inline works */
+# elif defined(__GNUC__) && __GNUC__>=2
+# define inline __inline__
+# 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
}
OpenPOWER on IntegriCloud