Browse Source

parameterize REPORT_OPENSSL_ERRORS

David Rose 22 years ago
parent
commit
8af6765f3d
3 changed files with 5 additions and 5 deletions
  1. 4 0
      dtool/Config.pp
  2. 1 0
      dtool/LocalSetup.pp
  3. 0 5
      panda/src/downloader/config_downloader.h

+ 4 - 0
dtool/Config.pp

@@ -203,6 +203,10 @@
 // Define this nonempty if your version of OpenSSL is 0.9.7 or better.
 #define SSL_097
 
+// Define this true to include the OpenSSL code to report verbose
+// error messages when they occur.
+#defer REPORT_OPENSSL_ERRORS $[< $[OPTIMIZE], 4]
+
 // Is Crypto++ installed, and where?
 #define CRYPTO_IPATH /usr/include/crypto++
 #define CRYPTO_LPATH /usr/lib

+ 1 - 0
dtool/LocalSetup.pp

@@ -37,6 +37,7 @@ $[cdefine HAVE_NSPR]
 /* Define if we have OpenSSL installed.  */
 $[cdefine HAVE_SSL]
 $[cdefine SSL_097]
+$[cdefine REPORT_OPENSSL_ERRORS]
 
 /* Define if we have crypto++ installed.  */
 $[cdefine HAVE_CRYPTO]

+ 0 - 5
panda/src/downloader/config_downloader.h

@@ -48,9 +48,4 @@ extern const double connect_timeout;
 extern const double http_timeout;
 extern const int http_max_connect_count;
 
-// Later, we can make this conditional on NDEBUG or something along
-// those lines; for now, we define it always to be true so we get
-// error messages from OpenSSL wherever possible.
-#define REPORT_OPENSSL_ERRORS 1
-
 #endif