[openssl-commits] [openssl] master update

Andy Polyakov appro at openssl.org
Fri May 27 21:03:28 UTC 2016


The branch master has been updated
       via  efdb2d6c797112e58e304d3e5300f169dbb16e95 (commit)
       via  43c4116cd7413b3c4ffc8d409eeac5b0262c4358 (commit)
      from  bb83c8796b9e708a881f7c49a2af7921e73b2298 (commit)


- Log -----------------------------------------------------------------
commit efdb2d6c797112e58e304d3e5300f169dbb16e95
Author: Andy Polyakov <appro at openssl.org>
Date:   Fri May 27 12:04:09 2016 +0200

    crypto/o_str.c: add _GNU_SOURCE strerror_r case.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit 43c4116cd7413b3c4ffc8d409eeac5b0262c4358
Author: Andy Polyakov <appro at openssl.org>
Date:   Thu May 26 23:00:21 2016 +0200

    crypto/o_str.c: strerror_s is provided by specific compiler run-time,
    not by OS [as was implied by guarding #if condition].
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/o_str.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/crypto/o_str.c b/crypto/o_str.c
index 98eb163..b0e7524 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -261,11 +261,11 @@ char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len)
 
 int openssl_strerror_r(int errnum, char *buf, size_t buflen)
 {
-#if defined(OPENSSL_SYS_WINDOWS)
-    if (strerror_s(buf, buflen, errnum) == EINVAL)
-        return 0;
-    return 1;
-#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE
+#if defined(_MSC_VER) && _MSC_VER>=1400
+    return !strerror_s(buf, buflen, errnum);
+#elif defined(_GNU_SOURCE)
+    return strerror_r(errnum, buf, buflen) != NULL;
+#elif (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
     /*
      * We can use "real" strerror_r. The OpenSSL version differs in that it
      * gives 1 on success and 0 on failure for consistency with other OpenSSL


More information about the openssl-commits mailing list