From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.bugs Subject: bug#6781: emacs server with X11 build on OSX Date: Sat, 25 Sep 2010 12:57:23 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83F33443-0C3F-4F9B-B584-D9301250B8FC@raeburn.org> <87k4o6wgam.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: dough.gmane.org 1285387883 31000 80.91.229.12 (25 Sep 2010 04:11:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 25 Sep 2010 04:11:23 +0000 (UTC) Cc: Juanma Barranquero , 6781@debbugs.gnu.org, emacs-devel@gnu.org, Ken Raeburn , Andreas Schwab , Leo To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 25 06:11:21 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OzM6V-0005uj-Lz for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Sep 2010 06:11:15 +0200 Original-Received: from localhost ([127.0.0.1]:46491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzM6U-00038x-Vc for geb-bug-gnu-emacs@m.gmane.org; Sat, 25 Sep 2010 00:11:15 -0400 Original-Received: from [140.186.70.92] (port=39402 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OzM6P-00038b-6j for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 00:11:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OzM6N-0005gq-VS for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 00:11:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55713) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzM6N-0005gl-Rc for bug-gnu-emacs@gnu.org; Sat, 25 Sep 2010 00:11:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OzLqn-0003uD-VS; Fri, 24 Sep 2010 23:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: YAMAMOTO Mitsuharu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Sep 2010 03:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6781 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6781-submit@debbugs.gnu.org id=B6781.128538688515007 (code B ref 6781); Sat, 25 Sep 2010 03:55:01 +0000 Original-Received: (at 6781) by debbugs.gnu.org; 25 Sep 2010 03:54:45 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzLqX-0003u0-Am for submit@debbugs.gnu.org; Fri, 24 Sep 2010 23:54:45 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OzLqV-0003tu-07 for 6781@debbugs.gnu.org; Fri, 24 Sep 2010 23:54:44 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 766CDC0557; Sat, 25 Sep 2010 12:57:23 +0900 (JST) In-Reply-To: <87k4o6wgam.fsf@stupidchicken.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?UTF-8?Q?Shij=C5=8D?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 24 Sep 2010 23:55:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40412 Archived-At: >>>>> On Wed, 04 Aug 2010 11:25:53 -0400, Chong Yidong said: > YAMAMOTO Mitsuharu writes: >> I suspect there is a bug in getaddrinfo on Mac OS X 10.6.4. At >> least, the behavior of the following program is incompatible with >> that on Mac OS X 10.5.8. > Could you write a PROBLEMS entry about your discovery? I think it is more natural to specify NULL for the unspecified port case, and it also works as a workaround. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp === modified file 'src/process.c' *** src/process.c 2010-06-03 22:47:35 +0000 --- src/process.c 2010-09-25 03:52:03 +0000 *************** *** 3446,3452 **** /* SERVICE can either be a string or int. Convert to a C string for later use by getaddrinfo. */ if (EQ (service, Qt)) ! portstring = "0"; else if (INTEGERP (service)) { sprintf (portbuf, "%ld", (long) XINT (service)); --- 3446,3455 ---- /* SERVICE can either be a string or int. Convert to a C string for later use by getaddrinfo. */ if (EQ (service, Qt)) ! /* We pass NULL for unspecified port, because some versions of ! Darwin return EAI_NONAME for getaddrinfo ("localhost", "0", ! ...). */ ! portstring = NULL; else if (INTEGERP (service)) { sprintf (portbuf, "%ld", (long) XINT (service)); *************** *** 3472,3482 **** ret = getaddrinfo (SDATA (host), portstring, &hints, &res); if (ret) #ifdef HAVE_GAI_STRERROR ! error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret)); #else ! error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); #endif immediate_quit = 0; goto open_socket; --- 3475,3493 ---- ret = getaddrinfo (SDATA (host), portstring, &hints, &res); if (ret) + { #ifdef HAVE_GAI_STRERROR ! if (portstring) ! error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret)); ! else ! error ("%s %s", SDATA (host), gai_strerror(ret)); #else ! if (portstring) ! error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); ! else ! error ("%s getaddrinfo error %d", SDATA (host), ret); #endif + } immediate_quit = 0; goto open_socket;