*/
#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>
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\"";
extern int h_errno;
-static int
-hokchar(p)
+int
+_hokchar(p)
const char *p;
{
char c;
#ifdef USE_RESOLV_NAME_OK
name_ok = res_dnok;
#else
- name_ok = hokchar;
+ name_ok = _hokchar;
#endif
break;
default:
-/* $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
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 */
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
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';