diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-04-03 08:33:07 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-04-03 08:33:07 +0000 |
commit | 0b0ea294df7544599d55bee82ebddaebf3552421 (patch) | |
tree | 8066ba25cd1dc200bce56203a8cce28fa156902e /lib | |
parent | 4098ac372a6188ff4f10e363326dd7cb21d72ef6 (diff) |
hokchar -> _hokchar, and make it non-static. Use it in getnetnamadr.c as
well.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 10 | ||||
-rw-r--r-- | lib/libc/net/getnetnamadr.c | 10 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index b72118c45c1..91a0213403c 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.18 1997/04/03 07:54:01 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.19 1997/04/03 08:33:03 downsj Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -103,7 +103,7 @@ static void map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len)); static void addrsort __P((char **, int)); #endif -static int hokchar __P((const char *)); +int _hokchar __P((const char *)); static const char AskedForGot[] = "gethostby*.getanswer: asked for \"%s\", got \"%s\""; @@ -129,8 +129,8 @@ static struct hostent *getanswer __P((const querybuf *, int, const char *, extern int h_errno; -static int -hokchar(p) +int +_hokchar(p) const char *p; { char c; @@ -186,7 +186,7 @@ getanswer(answer, anslen, qname, qtype) #ifdef USE_RESOLV_NAME_OK name_ok = res_dnok; #else - name_ok = hokchar; + name_ok = _hokchar; #endif break; default: diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 2f4ff3e9712..8d892a1bce4 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $ */ +/* $OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $ */ /* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro * Dep. Matematica Universidade de Coimbra, Portugal, Europe @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93"; static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $"; +static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -69,6 +69,8 @@ extern int h_errno; struct netent *_getnetbyaddr __P((long net, int type)); struct netent *_getnetbyname __P((const char *name)); +int _hokchar __P((const char *)); + #define BYADDR 0 #define BYNAME 1 #define MAXALIASES 35 @@ -142,7 +144,11 @@ getnetanswer(answer, anslen, net_i) haveanswer = 0; while (--ancount >= 0 && cp < eom) { n = dn_expand(answer->buf, eom, cp, bp, buflen); +#ifdef USE_RESOLV_NAME_OK if ((n < 0) || !res_dnok(bp)) +#else + if ((n < 0) || !_hokchar(bp)) +#endif break; cp += n; ans[0] = '\0'; |