From: Lars Ingebrigtsen Date: Fri, 5 Feb 2016 03:03:26 +0000 (+1100) Subject: Make url.el use async DNS X-Git-Tag: emacs-26.0.90~2520^2~30 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=12702b312bdb63b15619fac682f3a2c205b94eba;p=emacs.git Make url.el use async DNS * lisp/url/url-gw.el (url-open-stream): Use non-blocking DNS. * src/process.c (syms_of_process): Add a `dns' subfeature for make-network-process. --- diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 460ee0dd426..4d1dce68cbe 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -245,8 +245,9 @@ overriding the value of `url-gateway-method'." name buffer host service :type gw-method ;; Use non-blocking socket if we can. - :nowait (featurep 'make-network-process - '(:nowait t)))) + :nowait (and (featurep 'make-network-process + '(:nowait t)) + 'dns))) (`socks (socks-open-network-stream name buffer host service)) (`telnet diff --git a/src/process.c b/src/process.c index 86ca3f339ac..9653eba1e28 100644 --- a/src/process.c +++ b/src/process.c @@ -7921,6 +7921,9 @@ The variable takes effect when `start-process' is called. */); #ifdef NON_BLOCKING_CONNECT ADD_SUBFEATURE (QCnowait, Qt); +#ifdef HAVE_GETADDRINFO_A + ADD_SUBFEATURE (QCnowait, Qdns); +#endif #endif #ifdef DATAGRAM_SOCKETS ADD_SUBFEATURE (QCtype, Qdatagram);