From e9648d2ce662fb0d79072496682efb0718c01e66 Mon Sep 17 00:00:00 2001 From: guenther <> Date: Wed, 18 Nov 2009 07:43:22 +0000 Subject: More shrinkage, a bit for ramdisks but mostly for static binaries: - wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses p_class() and p_type() for diagnostics, then add that define to libstub to avoid pulling in res_debug_syms.o - split rcmd() and ruserok() into separate files, as nothing uses both - split readdir_r() to its own file - split syslog_r() from syslog(), as the latter needs localtime(); many binaries no longer need to pull in all the time code after this; switch from usleep() to nanosleep() while we're at it (The profit of analysis of -Wl,-M,--cref output) Chops 888kB from /bin and /sbin on i386 ok deraadt@, miod@ --- src/lib/libc/net/gethostnamadr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib/libc/net/gethostnamadr.c') diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index d49b9cdd7d..f4e655eeaf 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gethostnamadr.c,v 1.72 2007/10/11 18:36:41 jakob Exp $ */ +/* $OpenBSD: gethostnamadr.c,v 1.73 2009/11/18 07:43:22 guenther Exp $ */ /*- * Copyright (c) 1985, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -294,10 +294,12 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype) continue; } if (type != qtype) { +#ifndef NO_LOG_BAD_DNS_RESPONSES syslog(LOG_NOTICE|LOG_AUTH, "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"", qname, p_class(C_IN), p_type(qtype), p_type(type)); +#endif /* NO_LOG_BAD_DNS_RESPONSES */ cp += n; continue; /* XXX - had_error++ ? */ } -- cgit v1.2.3-55-g6feb