diff options
| author | Lars Ingebrigtsen | 2016-02-05 14:03:26 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-05 14:03:26 +1100 |
| commit | 12702b312bdb63b15619fac682f3a2c205b94eba (patch) | |
| tree | b5219b71c8329730821eaee23b6b9af112b11e7c | |
| parent | c85e7d4c8c899c01d6b4a393512bab295ef635c1 (diff) | |
| download | emacs-12702b312bdb63b15619fac682f3a2c205b94eba.tar.gz emacs-12702b312bdb63b15619fac682f3a2c205b94eba.zip | |
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.
| -rw-r--r-- | lisp/url/url-gw.el | 5 | ||||
| -rw-r--r-- | 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 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'." | |||
| 245 | name buffer host service | 245 | name buffer host service |
| 246 | :type gw-method | 246 | :type gw-method |
| 247 | ;; Use non-blocking socket if we can. | 247 | ;; Use non-blocking socket if we can. |
| 248 | :nowait (featurep 'make-network-process | 248 | :nowait (and (featurep 'make-network-process |
| 249 | '(:nowait t)))) | 249 | '(:nowait t)) |
| 250 | 'dns))) | ||
| 250 | (`socks | 251 | (`socks |
| 251 | (socks-open-network-stream name buffer host service)) | 252 | (socks-open-network-stream name buffer host service)) |
| 252 | (`telnet | 253 | (`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. */); | |||
| 7921 | 7921 | ||
| 7922 | #ifdef NON_BLOCKING_CONNECT | 7922 | #ifdef NON_BLOCKING_CONNECT |
| 7923 | ADD_SUBFEATURE (QCnowait, Qt); | 7923 | ADD_SUBFEATURE (QCnowait, Qt); |
| 7924 | #ifdef HAVE_GETADDRINFO_A | ||
| 7925 | ADD_SUBFEATURE (QCnowait, Qdns); | ||
| 7926 | #endif | ||
| 7924 | #endif | 7927 | #endif |
| 7925 | #ifdef DATAGRAM_SOCKETS | 7928 | #ifdef DATAGRAM_SOCKETS |
| 7926 | ADD_SUBFEATURE (QCtype, Qdatagram); | 7929 | ADD_SUBFEATURE (QCtype, Qdatagram); |