summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/e_os.h
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2015-01-09 00:58:20 +0000
committerjkim <jkim@FreeBSD.org>2015-01-09 00:58:20 +0000
commit27e2f26e1531b869ff531fab5ac3ef06aae4d4f4 (patch)
tree11138272980644b3ccdbfe7c0ebead1536be5efb /crypto/openssl/e_os.h
parent3e6f1de34088867465b6a1a87fb10c25fc811e50 (diff)
downloadFreeBSD-src-27e2f26e1531b869ff531fab5ac3ef06aae4d4f4.zip
FreeBSD-src-27e2f26e1531b869ff531fab5ac3ef06aae4d4f4.tar.gz
MFC: r276861, r276863
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