Stephen J. Turnbull wrote:
However, we also do canonicalization in sysdep.c (init_system_name).
Why that doesn't bite anyone, I don't know.
The call to getaddrinfo() in init_system_name is conditional upon:
if (!strchr (hostname, '.'))
On my system (RH6.2) the result is that getaddrinfo() isn't called
when running XEmacs on a tty.
I'm going to turn IPv6
off there, too, if --with-ipv6-lookup=no. Removing canonicalization
entirely is something that isn't going to happen in 21.4.4, and
probably won't happen soon thereafter, either.
Brief testing suggests that failure to canonicalise correctly doesn't
seem to have any really negative consequences. E.g.
(frame-device (make-frame-on-display ":0"))
#<x-device on ":0.0" 0x23b5>
(frame-device (make-frame-on-display "localhost:0"))
#<x-device on ":0.0" 0x23b5>
(frame-device (make-frame-on-display "127.0.0.1:0"))
#<x-device on ":0.0" 0x23b5>
(frame-device (make-frame-on-display "tcp/localhost:0"))
#<x-device on "tcp/localhost:0.0" 0x11dd0>
Even though this is wrong, I haven't found any user-level problems as
a result. Actually, the fact that the canonicalisation code fails to
handle the last case at least provides a way to force a connection to
"localhost:0" (which isn't the same thing as ":0").
--
Glynn Clements <glynn.clements(a)virgin.net>