unifdef -DHAVE_H_ERRNO

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4828 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1998-05-01 05:16:55 +00:00
parent 44680760bf
commit 228ed9b74a
3 changed files with 1 additions and 18 deletions

View File

@@ -63,11 +63,7 @@ hookup(char *host, int port)
} else {
hp = gethostbyname(host);
if (hp == NULL) {
#ifdef HAVE_H_ERRNO
warnx("%s: %s", host, hstrerror(h_errno));
#else
warnx("%s: %s", host, "unknown error");
#endif
code = -1;
return NULL;
}

View File

@@ -114,12 +114,7 @@ connect_host (char *host, char *user, des_cblock *key,
hostent = gethostbyname (host);
if (hostent == NULL) {
warnx ("gethostbyname '%s' failed: %s", host,
#ifdef HAVE_H_ERRNO
hstrerror(h_errno)
#else
"unknown error"
#endif
);
hstrerror(h_errno));
return -1;
}

View File

@@ -2104,11 +2104,7 @@ tn(int argc, char **argv)
srp = 0;
temp = sourceroute(hostp, &srp, &srlen);
if (temp == 0) {
#ifdef HAVE_H_ERRNO
fprintf (stderr, "%s: %s\r\n", srp ? srp : "", hstrerror(h_errno));
#else
fprintf (stderr, "%s: %s\r\n", srp ? srp : "", "unknown error");
#endif
setuid(getuid());
return 0;
} else if (temp == -1) {
@@ -2176,11 +2172,7 @@ tn(int argc, char **argv)
hostname = _hostname;
} else {
fprintf (stderr, "%s: %s\r\n", hostp ? hostp : "",
#ifdef HAVE_H_ERRNO
hstrerror(h_errno));
#else
"unknown error");
#endif
setuid(getuid());
return 0;
}