emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make-network-process's gethostbyname usage


From: Kim F. Storm
Subject: Re: make-network-process's gethostbyname usage
Date: Wed, 22 Aug 2007 11:18:34 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     make-network-process calles gethostbyname, but never calls
>     res_init. The problem, which appears is: if contents of
>     /etc/resolv.conf was changed old dns servers are unavailable,
>     gethostbyname still tries them, not new ones. So this bug is pretty
>     much the same as http://bugs.debian.org/438680 (which has a patch).
>
> Would someone please DTRT about this, then ack?
> It needs to be fixed in Emacs 22.

I don't know what to do about this.

configure already has a check for res_init, but on my system (GNU/Linux),
HAVE_RES_INIT is undefined, indicating that it doesn't exist.

However, I believe that it does exist, but only if -lresolv is specified.

So how can we fix configure to DTRT?

a) Include -lresolv in the check for HAVE_RES_INIT.

b) Include -lresolv in LIBS if and only if HAVE_RES_INIT is defined.


If that is in place, it should be trivial to add

#if HAVE_RES_INIT
    res_init();
#endif

before all calls to gethostbyname and getaddrinfo.


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]