[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/async-dns 12702b3 2/2: Make url.el use async DNS
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] feature/async-dns 12702b3 2/2: Make url.el use async DNS |
Date: |
Fri, 05 Feb 2016 03:03:41 +0000 |
branch: feature/async-dns
commit 12702b312bdb63b15619fac682f3a2c205b94eba
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
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.
---
lisp/url/url-gw.el | 5 +++--
src/process.c | 3 +++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 460ee0d..4d1dce6 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 86ca3f3..9653eba 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);