[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6781: emacs server with X11 build on OSX
From: |
YAMAMOTO Mitsuharu |
Subject: |
bug#6781: emacs server with X11 build on OSX |
Date: |
Sat, 25 Sep 2010 12:57:23 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
>>>>> 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;