e_os.h: refine inline override logic (to address warnings in debug build).
authorAndy Polyakov <appro@openssl.org>
Tue, 30 Sep 2014 19:05:33 +0000 (21:05 +0200)
committerEmilia Kasper <emilia@openssl.org>
Fri, 17 Oct 2014 09:53:02 +0000 (11:53 +0200)
Reviewed-by: Dr Stephen Henson <steve@openssl.org>
(cherry picked from commit 55c7a4cf112bf154ed405ee05a6b7924b6b1ba92)

e_os.h

diff --git a/e_os.h b/e_os.h
index 761c9ef046db5fee57e9b5b0814e9cceeda9f475..832272e9866e90245e3603264566c7bad0328b2c 100644 (file)
--- a/e_os.h
+++ b/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++;
@@ -735,8 +735,8 @@ struct servent *getservbyname(const char *name, const char *proto);
 #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(__GNUC__) && __GNUC__>=2
+#  define inline __inline__
 # elif defined(_MSC_VER)
   /*
    * Visual Studio: inline is available in C++ only, however