[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
Rich Salz
rsalz at openssl.org
Thu Feb 23 14:55:41 UTC 2017
The branch OpenSSL_1_1_0-stable has been updated
via 4c3376ec2747ebd69b3da68d2d18b155fac5c03f (commit)
from 6db2b1490e5da1255f4158dc8c2d4a2dd87cbe7b (commit)
- Log -----------------------------------------------------------------
commit 4c3376ec2747ebd69b3da68d2d18b155fac5c03f
Author: Rich Salz <rsalz at openssl.org>
Date: Thu Feb 23 09:48:49 2017 -0500
Add -Wundef to strict-warnings
Avoid a -Wundef warning in o_str.c
Avoid a -Wundef warning in testutil.h
Include internal/cryptlib.h before openssl/stack.h
to avoid use of undefined symbol OPENSSL_API_COMPAT.
Reviewed-by: Andy Polyakov <appro at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2709)
-----------------------------------------------------------------------
Summary of changes:
Configure | 2 ++
crypto/o_str.c | 3 ++-
crypto/x509/x509_att.c | 2 +-
crypto/x509/x509_ext.c | 2 +-
crypto/x509/x509_v3.c | 2 +-
crypto/x509/x509name.c | 2 +-
crypto/x509/x_all.c | 2 +-
test/testutil.h | 2 +-
8 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/Configure b/Configure
index 9a25da5..38081c4 100755
--- a/Configure
+++ b/Configure
@@ -121,6 +121,7 @@ my $gcc_devteam_warn = "-DDEBUG_UNUSED"
. " -Wshadow"
. " -Wformat"
. " -Wtype-limits"
+ . " -Wundef"
. " -Werror"
;
@@ -143,6 +144,7 @@ my $clang_devteam_warn = ""
. " -Wconditional-uninitialized"
. " -Wincompatible-pointer-types-discards-qualifiers"
. " -Wmissing-variable-declarations"
+ . " -Wundef"
;
# This adds backtrace information to the memory leak info. Is only used
diff --git a/crypto/o_str.c b/crypto/o_str.c
index beabec0..d8516c2 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -227,7 +227,8 @@ int openssl_strerror_r(int errnum, char *buf, size_t buflen)
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)
+#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
+ (defined(_XOPEN_SOURCE) && _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
diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c
index 15f0e4f..836bca5 100644
--- a/crypto/x509/x509_att.c
+++ b/crypto/x509/x509_att.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include <openssl/stack.h>
#include "internal/cryptlib.h"
+#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
diff --git a/crypto/x509/x509_ext.c b/crypto/x509/x509_ext.c
index 3bbb0a6..3c59079 100644
--- a/crypto/x509/x509_ext.c
+++ b/crypto/x509/x509_ext.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include <openssl/stack.h>
#include "internal/cryptlib.h"
+#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
diff --git a/crypto/x509/x509_v3.c b/crypto/x509/x509_v3.c
index ad126ef..213e762 100644
--- a/crypto/x509/x509_v3.c
+++ b/crypto/x509/x509_v3.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include <openssl/stack.h>
#include "internal/cryptlib.h"
+#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
diff --git a/crypto/x509/x509name.c b/crypto/x509/x509name.c
index 919d8c1..f87dc7d 100644
--- a/crypto/x509/x509name.c
+++ b/crypto/x509/x509name.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include <openssl/stack.h>
#include "internal/cryptlib.h"
+#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c
index 124dd2d..42bd161 100644
--- a/crypto/x509/x_all.c
+++ b/crypto/x509/x_all.c
@@ -8,8 +8,8 @@
*/
#include <stdio.h>
-#include <openssl/stack.h>
#include "internal/cryptlib.h"
+#include <openssl/stack.h>
#include <openssl/buffer.h>
#include <openssl/asn1.h>
#include <openssl/evp.h>
diff --git a/test/testutil.h b/test/testutil.h
index 14b7b09..aaaee27 100644
--- a/test/testutil.h
+++ b/test/testutil.h
@@ -56,7 +56,7 @@
* TEST_CASE_NAME is defined as the name of the test case function where
* possible; otherwise we get by with the file name and line number.
*/
-# if __STDC_VERSION__ < 199901L
+# if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
# if defined(_MSC_VER)
# define TEST_CASE_NAME __FUNCTION__
# else
More information about the openssl-commits
mailing list