summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/gethostnamadr.c
diff options
context:
space:
mode:
authorguenther <>2009-11-18 07:43:22 +0000
committerguenther <>2009-11-18 07:43:22 +0000
commite9648d2ce662fb0d79072496682efb0718c01e66 (patch)
tree69cb2944835feb73c511d3d6141bf71d95163b13 /src/lib/libc/net/gethostnamadr.c
parentfe6c9378da6c3c76e86e1fa03619eda8e4da9408 (diff)
downloadopenbsd-e9648d2ce662fb0d79072496682efb0718c01e66.tar.gz
openbsd-e9648d2ce662fb0d79072496682efb0718c01e66.tar.bz2
openbsd-e9648d2ce662fb0d79072496682efb0718c01e66.zip
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@
Diffstat (limited to 'src/lib/libc/net/gethostnamadr.c')
-rw-r--r--src/lib/libc/net/gethostnamadr.c4
1 files changed, 3 insertions, 1 deletions
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 @@
1/* $OpenBSD: gethostnamadr.c,v 1.72 2007/10/11 18:36:41 jakob Exp $ */ 1/* $OpenBSD: gethostnamadr.c,v 1.73 2009/11/18 07:43:22 guenther Exp $ */
2/*- 2/*-
3 * Copyright (c) 1985, 1988, 1993 3 * Copyright (c) 1985, 1988, 1993
4 * The Regents of the University of California. All rights reserved. 4 * 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)
294 continue; 294 continue;
295 } 295 }
296 if (type != qtype) { 296 if (type != qtype) {
297#ifndef NO_LOG_BAD_DNS_RESPONSES
297 syslog(LOG_NOTICE|LOG_AUTH, 298 syslog(LOG_NOTICE|LOG_AUTH,
298 "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"", 299 "gethostby*.getanswer: asked for \"%s %s %s\", got type \"%s\"",
299 qname, p_class(C_IN), p_type(qtype), 300 qname, p_class(C_IN), p_type(qtype),
300 p_type(type)); 301 p_type(type));
302#endif /* NO_LOG_BAD_DNS_RESPONSES */
301 cp += n; 303 cp += n;
302 continue; /* XXX - had_error++ ? */ 304 continue; /* XXX - had_error++ ? */
303 } 305 }