Fossil SCM

Added a check for ns_parserr(), which we currently don't know how to find on OpenBSD. This also fixes a logic error in auto.def which would cause the warning that this feature won't be compiled to not be given.

wyoung 2018-09-22 17:02 libbind-ns-alternative
Commit f99e76324c87363626fb94e0eea4ffa40f055176e33898a9c0c32f9490c885e5
2 files changed +7 -5 +1 -1
+7 -5
--- auto.def
+++ auto.def
@@ -520,15 +520,17 @@
520520
# record lookups and such.
521521
cc-check-includes arpa/nameser.h
522522
cc-include-needs bind/resolv.h netinet/in.h
523523
cc-check-includes bind/resolv.h
524524
cc-check-includes resolv.h
525
-if { (![cc-check-function-in-lib dn_expand resolv] ||
526
- ![cc-check-function-in-lib ns_name_uncompress {bind resolv}] ||
527
- ![cc-check-function-in-lib __ns_name_uncompress {bind resolv}]) &&
528
- (![cc-check-function-in-lib res_query {bind resolv}] ||
529
- ![cc-check-function-in-lib __res_query {bind resolv}])} {
525
+if { !(([cc-check-function-in-lib dn_expand resolv] ||
526
+ [cc-check-function-in-lib ns_name_uncompress {bind resolv}] ||
527
+ [cc-check-function-in-lib __ns_name_uncompress {bind resolv}]) &&
528
+ ([cc-check-function-in-lib ns_parserr {bind resolv}] ||
529
+ [cc-check-function-in-lib __ns_parserr {bind resolv}]) &&
530
+ ([cc-check-function-in-lib res_query {bind resolv}] ||
531
+ [cc-check-function-in-lib __res_query {bind resolv}]))} {
530532
msg-result "WARNING: SMTP feature will not be able to look up local MX."
531533
}
532534
cc-check-function-in-lib res_9_ns_initparse resolv
533535
534536
# Other nonstandard function checks
535537
--- auto.def
+++ auto.def
@@ -520,15 +520,17 @@
520 # record lookups and such.
521 cc-check-includes arpa/nameser.h
522 cc-include-needs bind/resolv.h netinet/in.h
523 cc-check-includes bind/resolv.h
524 cc-check-includes resolv.h
525 if { (![cc-check-function-in-lib dn_expand resolv] ||
526 ![cc-check-function-in-lib ns_name_uncompress {bind resolv}] ||
527 ![cc-check-function-in-lib __ns_name_uncompress {bind resolv}]) &&
528 (![cc-check-function-in-lib res_query {bind resolv}] ||
529 ![cc-check-function-in-lib __res_query {bind resolv}])} {
 
 
530 msg-result "WARNING: SMTP feature will not be able to look up local MX."
531 }
532 cc-check-function-in-lib res_9_ns_initparse resolv
533
534 # Other nonstandard function checks
535
--- auto.def
+++ auto.def
@@ -520,15 +520,17 @@
520 # record lookups and such.
521 cc-check-includes arpa/nameser.h
522 cc-include-needs bind/resolv.h netinet/in.h
523 cc-check-includes bind/resolv.h
524 cc-check-includes resolv.h
525 if { !(([cc-check-function-in-lib dn_expand resolv] ||
526 [cc-check-function-in-lib ns_name_uncompress {bind resolv}] ||
527 [cc-check-function-in-lib __ns_name_uncompress {bind resolv}]) &&
528 ([cc-check-function-in-lib ns_parserr {bind resolv}] ||
529 [cc-check-function-in-lib __ns_parserr {bind resolv}]) &&
530 ([cc-check-function-in-lib res_query {bind resolv}] ||
531 [cc-check-function-in-lib __res_query {bind resolv}]))} {
532 msg-result "WARNING: SMTP feature will not be able to look up local MX."
533 }
534 cc-check-function-in-lib res_9_ns_initparse resolv
535
536 # Other nonstandard function checks
537
+1 -1
--- src/smtp.c
+++ src/smtp.c
@@ -20,11 +20,11 @@
2020
*/
2121
#include "config.h"
2222
#include "smtp.h"
2323
#include <assert.h>
2424
#if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRES) && \
25
- !defined(FOSSIL_OMIT_DNS)
25
+ (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
2626
# include <sys/types.h>
2727
# include <netinet/in.h>
2828
# if defined(HAVE_BIND_RESOLV_H)
2929
# include <bind/resolv.h>
3030
# include <bind/arpa/nameser_compat.h>
3131
--- src/smtp.c
+++ src/smtp.c
@@ -20,11 +20,11 @@
20 */
21 #include "config.h"
22 #include "smtp.h"
23 #include <assert.h>
24 #if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRES) && \
25 !defined(FOSSIL_OMIT_DNS)
26 # include <sys/types.h>
27 # include <netinet/in.h>
28 # if defined(HAVE_BIND_RESOLV_H)
29 # include <bind/resolv.h>
30 # include <bind/arpa/nameser_compat.h>
31
--- src/smtp.c
+++ src/smtp.c
@@ -20,11 +20,11 @@
20 */
21 #include "config.h"
22 #include "smtp.h"
23 #include <assert.h>
24 #if (HAVE_DN_EXPAND || HAVE___NS_NAME_UNCOMPRESS || HAVE_NS_NAME_UNCOMPRES) && \
25 (HAVE_NS_PARSERR || HAVE___NS_PARSERR) && !defined(FOSSIL_OMIT_DNS)
26 # include <sys/types.h>
27 # include <netinet/in.h>
28 # if defined(HAVE_BIND_RESOLV_H)
29 # include <bind/resolv.h>
30 # include <bind/arpa/nameser_compat.h>
31

Keyboard Shortcuts

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