On Fri, Apr 11, 2008 at 05:48:19PM +0000, Robert Edmonds wrote: > Why is exim using gethost* calls? If you look in the > exim-4.69/src/host.c file, you'll see implementation details like: > > #if HAVE_GETIPNODEBYNAME > hostdata = getipnodebyname(CS host->name, af, 0, &error_num); > #else > hostdata = gethostbyname2(CS host->name, af); > error_num = h_errno; > #endif [...] > glibc has had these new getipnode* calls for quite some time; there's no > reason not to use them. Why doesn't exim-4.69/OS/os.h-Linux define > these feature macros?
From the getipnodebyname(3) manpage: NOTES These functions were present in glibc 2.1.91-95, but were removed again. Several Unix-like systems support them, but all call them deprecated. The best way is to use getaddrinfo() and getnameinfo(). > Yes, there is a much better way: do not perform name resolution to > determine the host's FQDN. It is wrong. I agree. -- Met vriendelijke groet / with kind regards, Guus Sliepen <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature