From f9d3be3565843872d52b8204fa99225b8dcb0889 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 8 Nov 1996 07:40:45 +0000 Subject: We can now work with any bind library. svn path=/trunk/; revision=504 --- fetchmail.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'fetchmail.c') diff --git a/fetchmail.c b/fetchmail.c index d0f04bb4..f591d3fb 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -302,9 +302,9 @@ char **argv; * reflect the status of that transaction. */ do { -#ifdef HAVE_GETHOSTBYNAME +#ifdef HAVE_RES_SEARCH sethostent(TRUE); /* use TCP/IP for mailserver queries */ -#endif /* HAVE_GETHOSTBYNAME */ +#endif /* HAVE_RES_SEARCH */ for (ctl = querylist; ctl; ctl = ctl->next) { @@ -316,9 +316,9 @@ char **argv; } } -#ifdef HAVE_GETHOSTBYNAME +#ifdef HAVE_RES_SEARCH endhostent(); /* release TCP/IP connection to nameserver */ -#endif /* HAVE_GETHOSTBYNAME */ +#endif /* HAVE_RES_SEARCH */ /* * Close all SMTP delivery sockets. For optimum performance @@ -490,7 +490,9 @@ int optind; else ctl->canonical_name = xstrdup((char *)namerec->h_name); } -#else +#endif /* HAVE_GETHOSTBYNAME */ + +#if !defined(HAVE_GETHOSTBYNAME) || !defined(HAVE_RES_SEARCH) /* can't handle multidrop mailboxes unless we can do DNS lookups */ if (ctl->localnames && ctl->localnames->next) { @@ -498,7 +500,7 @@ int optind; stderr); exit(PS_SYNTAX); } -#endif /* HAVE_GETHOSTBYNAME */ +#endif /* !HAVE_GETHOSTBYNAME || !HAVE_RES_SEARCH */ /* * Assign SMTP leaders. We want to allow all query blocks -- cgit v1.2.3