Fossil SCM

Clean up the detection of BIO_ADDR_hostname-string by removing redundant definitions; apparently autosetup has a feature which automatically creates a define with HAVE_ prepended for whatever function is intended to be detected.

andybradford 2019-04-01 00:43 trunk
Commit 3d827943481e96aae83cbef2af5484e8d4b5153a9f97a6a6211f65354ccddb18
2 files changed +1 -3 +1 -1
+1 -3
--- auto.def
+++ auto.def
@@ -376,13 +376,11 @@
376376
if {[string match *-darwin* [get-define host]]} {
377377
if {[cctest -cflags {-Wdeprecated-declarations}]} {
378378
define-append EXTRA_CFLAGS -Wdeprecated-declarations
379379
}
380380
}
381
- if {[cc-check-function-in-lib BIO_ADDR_hostname_string ssl]} {
382
- define HAVE_BIO_ADDR_HS 1
383
- }
381
+ cc-check-function-in-lib BIO_ADDR_hostname_string ssl
384382
} else {
385383
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
386384
}
387385
} else {
388386
if {[info exists ::zlib_lib]} {
389387
--- auto.def
+++ auto.def
@@ -376,13 +376,11 @@
376 if {[string match *-darwin* [get-define host]]} {
377 if {[cctest -cflags {-Wdeprecated-declarations}]} {
378 define-append EXTRA_CFLAGS -Wdeprecated-declarations
379 }
380 }
381 if {[cc-check-function-in-lib BIO_ADDR_hostname_string ssl]} {
382 define HAVE_BIO_ADDR_HS 1
383 }
384 } else {
385 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
386 }
387 } else {
388 if {[info exists ::zlib_lib]} {
389
--- auto.def
+++ auto.def
@@ -376,13 +376,11 @@
376 if {[string match *-darwin* [get-define host]]} {
377 if {[cctest -cflags {-Wdeprecated-declarations}]} {
378 define-append EXTRA_CFLAGS -Wdeprecated-declarations
379 }
380 }
381 cc-check-function-in-lib BIO_ADDR_hostname_string ssl
 
 
382 } else {
383 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
384 }
385 } else {
386 if {[info exists ::zlib_lib]} {
387
+1 -1
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387387
/* Set the Global.zIpAddr variable to the server we are talking to.
388388
** This is used to populate the ipaddr column of the rcvfrom table,
389389
** if any files are received from the server.
390390
*/
391391
{
392
-#ifdef HAVE_BIO_ADDR_HS
392
+#ifdef HAVE_BIO_ADDR_HOSTNAME_STRING
393393
char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394394
g.zIpAddr = mprintf("%s", ip);
395395
OPENSSL_free(ip);
396396
#else
397397
/* IPv4 only code */
398398
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387 /* Set the Global.zIpAddr variable to the server we are talking to.
388 ** This is used to populate the ipaddr column of the rcvfrom table,
389 ** if any files are received from the server.
390 */
391 {
392 #ifdef HAVE_BIO_ADDR_HS
393 char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394 g.zIpAddr = mprintf("%s", ip);
395 OPENSSL_free(ip);
396 #else
397 /* IPv4 only code */
398
--- src/http_ssl.c
+++ src/http_ssl.c
@@ -387,11 +387,11 @@
387 /* Set the Global.zIpAddr variable to the server we are talking to.
388 ** This is used to populate the ipaddr column of the rcvfrom table,
389 ** if any files are received from the server.
390 */
391 {
392 #ifdef HAVE_BIO_ADDR_HOSTNAME_STRING
393 char *ip = BIO_ADDR_hostname_string(BIO_get_conn_address(iBio),1);
394 g.zIpAddr = mprintf("%s", ip);
395 OPENSSL_free(ip);
396 #else
397 /* IPv4 only code */
398

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button