summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguenther <>2015-10-05 02:57:16 +0000
committerguenther <>2015-10-05 02:57:16 +0000
commitf97ab44d7b0a4185f9d2a463b1362407042c517f (patch)
tree19bc0ad555c1629a8a031c8a4cb1f1ca5c332263
parent726014e92eca3a02222ed5d31eebedde1b32b828 (diff)
downloadopenbsd-f97ab44d7b0a4185f9d2a463b1362407042c517f.tar.gz
openbsd-f97ab44d7b0a4185f9d2a463b1362407042c517f.tar.bz2
openbsd-f97ab44d7b0a4185f9d2a463b1362407042c517f.zip
Wrap <resolv.h> so that internal calls go direct
ok millert@
-rw-r--r--src/lib/libc/net/res_comp.c6
-rw-r--r--src/lib/libc/net/res_debug_syms.c5
-rw-r--r--src/lib/libc/net/res_random.c5
3 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c
index f6f987eb0e..c493d9b20d 100644
--- a/src/lib/libc/net/res_comp.c
+++ b/src/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_comp.c,v 1.17 2015/09/13 21:36:08 guenther Exp $ */ 1/* $OpenBSD: res_comp.c,v 1.18 2015/10/05 02:57:16 guenther Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1993 4 * ++Copyright++ 1985, 1993
@@ -141,6 +141,7 @@ dn_expand(const u_char *msg, const u_char *eomorig, const u_char *comp_dn,
141 len = cp - comp_dn; 141 len = cp - comp_dn;
142 return (len); 142 return (len);
143} 143}
144DEF_WEAK(dn_expand);
144 145
145/* 146/*
146 * Compress domain name 'exp_dn' into 'comp_dn'. 147 * Compress domain name 'exp_dn' into 'comp_dn'.
@@ -344,7 +345,7 @@ dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, u_char **lastdnptr)
344#define domainchar(c) ((c) > 0x20 && (c) < 0x7f) 345#define domainchar(c) ((c) > 0x20 && (c) < 0x7f)
345 346
346int 347int
347res_hnok(const char *dn) 348__res_hnok(const char *dn)
348{ 349{
349 int pch = PERIOD, ch = *dn++; 350 int pch = PERIOD, ch = *dn++;
350 351
@@ -367,6 +368,7 @@ res_hnok(const char *dn)
367 } 368 }
368 return (1); 369 return (1);
369} 370}
371DEF_STRONG(__res_hnok);
370 372
371/* 373/*
372 * hostname-like (A, MX, WKS) owners can have "*" as their first label 374 * hostname-like (A, MX, WKS) owners can have "*" as their first label
diff --git a/src/lib/libc/net/res_debug_syms.c b/src/lib/libc/net/res_debug_syms.c
index 7e7d22c914..fc26f03e74 100644
--- a/src/lib/libc/net/res_debug_syms.c
+++ b/src/lib/libc/net/res_debug_syms.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_debug_syms.c,v 1.1 2005/08/06 20:30:04 espie Exp $ */ 1/* $OpenBSD: res_debug_syms.c,v 1.2 2015/10/05 02:57:16 guenther Exp $ */
2 2
3/* 3/*
4 * ++Copyright++ 1985, 1990, 1993 4 * ++Copyright++ 1985, 1990, 1993
@@ -168,6 +168,7 @@ __sym_ntos(const struct res_sym *syms, int number, int *success)
168 *success = 0; 168 *success = 0;
169 return (unname); 169 return (unname);
170} 170}
171DEF_STRONG(__sym_ntos);
171 172
172/* 173/*
173 * Return a string for the type 174 * Return a string for the type
@@ -177,6 +178,7 @@ __p_type(int type)
177{ 178{
178 return (__sym_ntos (__p_type_syms, type, (int *)0)); 179 return (__sym_ntos (__p_type_syms, type, (int *)0));
179} 180}
181DEF_STRONG(__p_type);
180 182
181/* 183/*
182 * Return a mnemonic for class 184 * Return a mnemonic for class
@@ -186,4 +188,5 @@ __p_class(int class)
186{ 188{
187 return (__sym_ntos (__p_class_syms, class, (int *)0)); 189 return (__sym_ntos (__p_class_syms, class, (int *)0));
188} 190}
191DEF_STRONG(__p_class);
189 192
diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c
index 394072c813..72b9c41a2a 100644
--- a/src/lib/libc/net/res_random.c
+++ b/src/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_random.c,v 1.22 2015/06/04 19:26:39 eric Exp $ */ 1/* $OpenBSD: res_random.c,v 1.23 2015/10/05 02:57:16 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -225,7 +225,7 @@ res_initid(void)
225} 225}
226 226
227u_int 227u_int
228res_randomid(void) 228__res_randomid(void)
229{ 229{
230 struct timespec ts; 230 struct timespec ts;
231 pid_t pid; 231 pid_t pid;
@@ -252,6 +252,7 @@ res_randomid(void)
252 252
253 return (r); 253 return (r);
254} 254}
255DEF_STRONG(__res_randomid);
255 256
256#if 0 257#if 0
257int 258int