[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Apparently coccinelle can't handle multiline #errors.



commit c1e8e5bb3223b950f79bce5bd3540566fc1fdc7b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Oct 9 10:47:05 2019 -0400

    Apparently coccinelle can't handle multiline #errors.
---
 src/lib/crypt_ops/crypto_openssl_mgt.c | 6 ++++--
 src/lib/log/log.h                      | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/crypt_ops/crypto_openssl_mgt.c b/src/lib/crypt_ops/crypto_openssl_mgt.c
index 9ec59e7c8..917ef4597 100644
--- a/src/lib/crypt_ops/crypto_openssl_mgt.c
+++ b/src/lib/crypt_ops/crypto_openssl_mgt.c
@@ -121,9 +121,11 @@ crypto_openssl_get_header_version_str(void)
   return crypto_openssl_header_version_str;
 }
 
+#ifndef COCCI
 #ifndef OPENSSL_THREADS
-#error OpenSSL has been built without thread support. Tor requires an \
- OpenSSL library with thread support enabled.
+#error "OpenSSL has been built without thread support. Tor requires an \
+ OpenSSL library with thread support enabled."
+#endif
 #endif
 
 #ifndef NEW_THREAD_API
diff --git a/src/lib/log/log.h b/src/lib/log/log.h
index c4a27782c..c2b20fc22 100644
--- a/src/lib/log/log.h
+++ b/src/lib/log/log.h
@@ -23,9 +23,11 @@
 #include <syslog.h>
 #define LOG_WARN LOG_WARNING
 #if LOG_DEBUG < LOG_ERR
+#ifndef COCCI
 #error "Your syslog.h thinks high numbers are more important.  " \
        "We aren't prepared to deal with that."
 #endif
+#endif
 #else /* !(defined(HAVE_SYSLOG_H)) */
 /* Note: Syslog's logging code refers to priorities, with 0 being the most
  * important.  Thus, all our comparisons needed to be reversed when we added



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits