From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: emacs server with X11 build on OSX Date: Wed, 04 Aug 2010 09:52:23 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83F33443-0C3F-4F9B-B584-D9301250B8FC@raeburn.org> 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 1280883158 31383 80.91.229.12 (4 Aug 2010 00:52:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Aug 2010 00:52:38 +0000 (UTC) Cc: 6781@debbugs.gnu.org, Ken Raeburn , Andreas Schwab , Leo , emacs-devel@gnu.org To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 04 02:52:36 2010 Return-path: Envelope-to: ged-emacs-devel@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 1OgSDk-0000CP-4x for ged-emacs-devel@m.gmane.org; Wed, 04 Aug 2010 02:52:36 +0200 Original-Received: from localhost ([127.0.0.1]:41694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgSDj-0002zN-3D for ged-emacs-devel@m.gmane.org; Tue, 03 Aug 2010 20:52:35 -0400 Original-Received: from [140.186.70.92] (port=50045 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgSDe-0002zI-SC for emacs-devel@gnu.org; Tue, 03 Aug 2010 20:52:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgSDd-0007D6-J3 for emacs-devel@gnu.org; Tue, 03 Aug 2010 20:52:30 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:55946) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgSDd-0007Cn-Ax for emacs-devel@gnu.org; Tue, 03 Aug 2010 20:52:29 -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 D581AC055D; Wed, 4 Aug 2010 09:52:23 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: NetBSD 3.0 (DF) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128209 Archived-At: >>>>> On Tue, 3 Aug 2010 15:03:08 +0200, Juanma Barranquero said: > On Tue, Aug 3, 2010 at 15:01, Andreas Schwab > wrote: >> gethostbyname works quite different from getaddrinfo. > Still a problem that (make-network-process ... :host 'local) fails. > Something's obviously not right. 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. #include #include #include #include #include main () { struct addrinfo hints, *res; char *servnames[] = {"0", "1", NULL}; int error, i; memset (&hints, 0, sizeof (hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; for (i = 0; i < sizeof (servnames) / sizeof (servnames[0]); i++) { if (servnames[i]) printf ("servname = \"%s\":\n", servnames[i]); else printf ("servname = (null):\n"); error = getaddrinfo ("localhost", servnames[i], &hints, &res); if (error != 0) puts (gai_strerror (error)); else { struct addrinfo *r; for (r = res; r; r = r->ai_next) { printf ("family = %d, socktype = %d, protocol = %d\n", r->ai_family, r->ai_socktype, r->ai_protocol); } freeaddrinfo (res); } puts (""); } } *** Mac OS X 10.6.4 *** servname = "0": nodename nor servname provided, or not known servname = "1": family = 30, socktype = 1, protocol = 6 family = 30, socktype = 1, protocol = 6 family = 2, socktype = 1, protocol = 6 servname = (null): family = 30, socktype = 1, protocol = 6 family = 30, socktype = 1, protocol = 6 family = 2, socktype = 1, protocol = 6 *** Mac OS X 10.5.8 *** servname = "0": family = 30, socktype = 1, protocol = 6 family = 30, socktype = 1, protocol = 6 family = 2, socktype = 1, protocol = 6 servname = "1": family = 30, socktype = 1, protocol = 6 family = 30, socktype = 1, protocol = 6 family = 2, socktype = 1, protocol = 6 servname = (null): family = 30, socktype = 1, protocol = 6 family = 30, socktype = 1, protocol = 6 family = 2, socktype = 1, protocol = 6 Actually, one can find a major rewrite in getaddrinfo's implementation. (Libinfo in http://opensource.apple.com/release/mac-os-x-1064/ and http://opensource.apple.com/release/mac-os-x-1058/ ) YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp