From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/44369 Path: main.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Compile warnings Date: Wed, 24 Apr 2002 16:42:02 +0900 Organization: Emacsen advocacy group Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1019634211 14749 127.0.0.1 (24 Apr 2002 07:43:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2002 07:43:31 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 170HR5-0003pm-00 for ; Wed, 24 Apr 2002 09:43:31 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 170HQ8-0001La-00; Wed, 24 Apr 2002 02:42:32 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 24 Apr 2002 02:42:44 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id CAA28046 for ; Wed, 24 Apr 2002 02:42:29 -0500 (CDT) Original-Received: (qmail 26571 invoked by alias); 24 Apr 2002 07:42:12 -0000 Original-Received: (qmail 26566 invoked from network); 24 Apr 2002 07:42:11 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by gnus.org with SMTP; 24 Apr 2002 07:42:11 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 170HRI-0003mL-00 for ; Wed, 24 Apr 2002 09:43:44 +0200 Original-To: ding@gnus.org Original-Path: not-for-mail Original-Newsgroups: gnus.ding Original-Lines: 142 Original-NNTP-Posting-Host: groundpoundrecords.com Original-X-Trace: quimby.gnus.org 1019634224 13651 207.228.244.150 (24 Apr 2002 07:43:44 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 24 Apr 2002 07:43:44 GMT X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (sparc-sun-solaris2.6) Cancel-Lock: sha1:DS46cKwvTMVXmi4BinNtV8Qw/h8= Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:44369 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:44369 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, >>>>> In =20 >>>>> Pavel@Janik.cz (Pavel Jan=C3=ADk) wrote: Pavel> While compiling current CVS gnus with current CVS Emacs, I've got: Pavel> /home/pavel/.Emacs/Work/gnus/lisp/dns.el: In query-dns Pavel> /home/pavel/.Emacs/Work/gnus/lisp/dns.el:282: warning: open-network-= stream called with 5 arguments, but accepts only 4 Here's one solution attached below, but I haven't confirmed it completely because I don't have the function `make-network-process'. Pavel> /home/pavel/.Emacs/Work/gnus/lisp/gnus-msg.el: In gnus-summary-reply Pavel> /home/pavel/.Emacs/Work/gnus/lisp/gnus-msg.el:971: warning: referenc= e to free variable article-buffer I've got the same warn, but no ideas. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=dns.el.diff --- dns.el~ 2002-03-31 16:36:22.000000000 +0000 +++ dns.el 2002-04-24 07:41:30.000000000 +0000 @@ -280,6 +280,24 @@ ;;; Interface functions. +(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)) + `(let ((server ,server) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (if (fboundp 'make-network-process) + (make-network-process + :name "dns" + :coding 'binary + :buffer (current-buffer) + :host server + :service "domain" + :type 'datagram) + (open-network-stream "dns" (current-buffer) server "domain"))))) + (defun query-dns (name &optional type fullp) "Query a DNS server for NAME of TYPE. If FULLP, return the entire record returned." @@ -289,53 +307,36 @@ (unless dns-servers (error "No DNS server configuration found"))) (mm-with-unibyte-buffer - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary) - (tcp-p (and (not (fboundp 'open-network-stream)) - (not (featurep 'xemacs))))) - (let ((process - (cond - ((featurep 'xemacs) - (open-network-stream - "dns" (current-buffer) (car dns-servers) "domain" 'udp)) - (tcp-p - (open-network-stream - "dns" (current-buffer) (car dns-servers) "domain")) - (t - (make-network-process - :name "dns" - :coding 'binary - :buffer (current-buffer) - :host (car dns-servers) - :service "domain" - :type 'datagram)))) - (step 100) - (times (* dns-timeout 1000)) - (id (random 65000))) - (process-send-string - process - (dns-write `((id ,id) - (opcode query) - (queries ((,name (type ,type)))) - (recursion-desired-p t)) - tcp-p)) - (while (and (zerop (buffer-size)) - (> times 0)) - (accept-process-output process 0 step) - (decf times step)) - (ignore-errors - (delete-process process)) - (when tcp-p - (goto-char (point-min)) - (delete-region (point) (+ (point) 2))) - (unless (zerop (buffer-size)) - (let ((result (dns-read (buffer-string)))) - (if fullp - result - (let ((answer (car (dns-get 'answers result)))) - (when (eq type (dns-get 'type answer)) - (dns-get 'data answer)))))))))) - + (let ((process (dns-make-network-process (car dns-servers))) + (tcp-p (and (not (fboundp 'make-network-process)) + (not (featurep 'xemacs)))) + (step 100) + (times (* dns-timeout 1000)) + (id (random 65000))) + (process-send-string + process + (dns-write `((id ,id) + (opcode query) + (queries ((,name (type ,type)))) + (recursion-desired-p t)) + tcp-p)) + (while (and (zerop (buffer-size)) + (> times 0)) + (accept-process-output process 0 step) + (decf times step)) + (ignore-errors + (delete-process process)) + (when tcp-p + (goto-char (point-min)) + (delete-region (point) (+ (point) 2))) + (unless (zerop (buffer-size)) + (let ((result (dns-read (buffer-string)))) + (if fullp + result + (let ((answer (car (dns-get 'answers result)))) + (when (eq type (dns-get 'type answer)) + (dns-get 'data answer))))))))) + (provide 'dns) ;;; dns.el ends here --=-=-=--