(gnus-registry-use-long-group-names): new variable
[gnus] / lisp / dns.el
index b47d85c..f23e87a 100644 (file)
@@ -1,5 +1,5 @@
 ;;; dns.el --- Domain Name Service lookups
-;; Copyright (C) 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: network
@@ -25,6 +25,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (require 'mm-util)
 
 (defvar dns-timeout 5
@@ -280,11 +282,14 @@ If TCP-P, the first two bytes of the package with be the length field."
 
 ;;; Interface functions.
 
+(autoload 'gnus-xmacs-open-network-stream "gnus-xmas" nil nil 'macro)
+
 (defmacro dns-make-network-process (server)
   (if (featurep 'xemacs)
       `(let ((coding-system-for-read 'binary)
             (coding-system-for-write 'binary))
-        (open-network-stream "dns" (current-buffer) ,server "domain" 'udp))
+        (gnus-xmas-open-network-stream "dns" (current-buffer)
+                                       ,server "domain" 'udp))
     `(let ((server ,server)
           (coding-system-for-read 'binary)
           (coding-system-for-write 'binary))
@@ -296,6 +301,9 @@ If TCP-P, the first two bytes of the package with be the length field."
            :host server
            :service "domain"
            :type 'datagram)
+        ;; Older versions of Emacs doesn't have
+        ;; `make-network-process', so we fall back on opening a TCP
+        ;; connection to the DNS server.
         (open-network-stream "dns" (current-buffer) server "domain")))))
 
 (defun query-dns (name &optional type fullp)