From 56f2f5e7a800ec59ae8d027a6c551ebf84fbda94 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 2 Aug 1998 18:43:17 +0000 Subject: Eliminate agethostbyname call in non-ETRN modes. svn path=/trunk/; revision=2033 --- env.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'env.c') diff --git a/env.c b/env.c index 453e1449..67679d19 100644 --- a/env.c +++ b/env.c @@ -55,32 +55,6 @@ void envquery(int argc, char **argv) } } - /* we'll need this for the SMTP forwarding target and error messages */ - if (gethostname(tmpbuf, sizeof(tmpbuf))) - { - fprintf(stderr, "%s: can't determine your host!", program_name); - exit(PS_IOERR); - } -#ifdef HAVE_GETHOSTBYNAME - /* if we got a . in the hostname assume it is a FQDN */ - if (strchr(tmpbuf, '.') == NULL) - { - struct hostent *hp; - - /* in case we got a basename (as we do in Linux) make a FQDN of it */ - hp = gethostbyname(tmpbuf); - if (hp == (struct hostent *) NULL) - { - /* exit with error message */ - fprintf(stderr, "gethostbyname failed for %s\n", tmpbuf); - exit(PS_DNS); - } - fetchmailhost = xstrdup(hp->h_name); - } - else -#endif /* HAVE_GETHOSTBYNAME */ - fetchmailhost = xstrdup(tmpbuf); - #define RCFILE_NAME ".fetchmailrc" rcfile = (char *) xmalloc(strlen(home)+strlen(RCFILE_NAME)+2); /* avoid //.fetchmailrc */ -- cgit v1.2.3