summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/getaddrinfo.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/getaddrinfo.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/getaddrinfo.c')
-rw-r--r--src/lib/libc/net/getaddrinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libc/net/getaddrinfo.c b/src/lib/libc/net/getaddrinfo.c
index 98e247bc44..7040fa7c37 100644
--- a/src/lib/libc/net/getaddrinfo.c
+++ b/src/lib/libc/net/getaddrinfo.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getaddrinfo.c,v 1.70 2009/09/02 19:07:12 fgsch Exp $ */ 1/* $OpenBSD: getaddrinfo.c,v 1.71 2009/11/18 07:43:22 guenther Exp $ */
2/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ 2/* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */
3 3
4/* 4/*
@@ -1062,6 +1062,7 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
1062 continue; 1062 continue;
1063 } 1063 }
1064 } else if (type != qtype) { 1064 } else if (type != qtype) {
1065#ifndef NO_LOG_BAD_DNS_RESPONSES
1065 if (type != T_KEY && type != T_SIG) { 1066 if (type != T_KEY && type != T_SIG) {
1066 struct syslog_data sdata = SYSLOG_DATA_INIT; 1067 struct syslog_data sdata = SYSLOG_DATA_INIT;
1067 1068
@@ -1070,6 +1071,7 @@ getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
1070 qname, p_class(C_IN), p_type(qtype), 1071 qname, p_class(C_IN), p_type(qtype),
1071 p_type(type)); 1072 p_type(type));
1072 } 1073 }
1074#endif /* NO_LOG_BAD_DNS_RESPONSES */
1073 cp += n; 1075 cp += n;
1074 continue; /* XXX - had_error++ ? */ 1076 continue; /* XXX - had_error++ ? */
1075 } 1077 }