all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	6781@debbugs.gnu.org, emacs-devel@gnu.org,
	Ken Raeburn <raeburn@raeburn.org>,
	Andreas Schwab <schwab@linux-m68k.org>, Leo <sdl.web@gmail.com>
Subject: bug#6781: emacs server with X11 build on OSX
Date: Sat, 25 Sep 2010 12:57:23 +0900	[thread overview]
Message-ID: <wlzkv68ogs.wl%mituharu__26393.8491851606$1285387883$gmane$org@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <87k4o6wgam.fsf@stupidchicken.com>

>>>>> On Wed, 04 Aug 2010 11:25:53 -0400, Chong Yidong <cyd@stupidchicken.com> said:

> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 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;






  reply	other threads:[~2010-09-25  3:57 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-01 19:17 emacs server with X11 build on OSX Leo
2010-08-02 14:57 ` Juanma Barranquero
2010-08-02 15:56   ` Leo
2010-08-02 20:22     ` Juanma Barranquero
2010-08-02 22:16       ` bug#6781: " Leo
2010-08-03  2:12       ` Ken Raeburn
2010-08-03  2:47         ` Juanma Barranquero
2010-08-03  5:01           ` Leo
2010-08-03 12:02             ` Juanma Barranquero
2010-08-03 12:44               ` bug#6781: " Andreas Schwab
2010-08-03 12:44               ` Andreas Schwab
2010-08-03 12:48                 ` Juanma Barranquero
2010-08-03 13:01                   ` Andreas Schwab
2010-08-03 13:03                     ` bug#6781: " Juanma Barranquero
2010-08-03 13:03                     ` Juanma Barranquero
2010-08-04  0:52                       ` YAMAMOTO Mitsuharu
2010-08-04 15:25                         ` bug#6781: " Chong Yidong
2010-08-04 15:25                         ` Chong Yidong
2010-09-25  3:57                           ` YAMAMOTO Mitsuharu [this message]
2010-09-25  3:57                           ` YAMAMOTO Mitsuharu
2010-09-27 12:12                             ` Juanma Barranquero
2010-09-27 12:12                             ` Juanma Barranquero
2010-08-04  0:52                       ` YAMAMOTO Mitsuharu
2010-08-03 13:01                   ` Andreas Schwab
2010-08-03 12:48                 ` Juanma Barranquero
2010-08-03 12:02             ` Juanma Barranquero
2010-08-03  5:01           ` Leo
2010-08-04 13:18           ` Stefan Monnier
2010-08-05  9:02             ` Juanma Barranquero
2010-08-09 11:24               ` bug#6781: " Stefan Monnier
2010-08-09 11:24               ` Stefan Monnier
2010-08-09 17:08                 ` bug#6781: " Juanma Barranquero
2010-08-09 17:08                 ` Juanma Barranquero
2010-08-10 13:31                   ` bug#6781: " Stefan Monnier
2010-08-10 13:31                   ` Stefan Monnier
2010-08-10 18:31                     ` bug#6781: " Juanma Barranquero
2010-08-10 18:31                     ` Juanma Barranquero
2010-09-24 19:38                     ` bug#6781: " Juanma Barranquero
2010-09-24 19:38                     ` Juanma Barranquero
2010-09-24 22:27                       ` Stefan Monnier
2010-09-24 22:27                       ` Stefan Monnier
2010-08-05  9:02             ` Juanma Barranquero
2010-08-03  2:47         ` Juanma Barranquero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='wlzkv68ogs.wl%mituharu__26393.8491851606$1285387883$gmane$org@math.s.chiba-u.ac.jp' \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=6781@debbugs.gnu.org \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=raeburn@raeburn.org \
    --cc=schwab@linux-m68k.org \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.