diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-08-02 18:43:17 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-08-02 18:43:17 +0000 |
commit | 56f2f5e7a800ec59ae8d027a6c551ebf84fbda94 (patch) | |
tree | 5ad8b388e06b8fee5d73de1f7573e2418a92b8a0 /env.c | |
parent | 1587e4153763fab493acf2deee9028e24e1da57f (diff) | |
download | fetchmail-56f2f5e7a800ec59ae8d027a6c551ebf84fbda94.tar.gz fetchmail-56f2f5e7a800ec59ae8d027a6c551ebf84fbda94.tar.bz2 fetchmail-56f2f5e7a800ec59ae8d027a6c551ebf84fbda94.zip |
Eliminate agethostbyname call in non-ETRN modes.
svn path=/trunk/; revision=2033
Diffstat (limited to 'env.c')
-rw-r--r-- | env.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -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 */ |