summaryrefslogtreecommitdiff
path: root/libc/inet/resolv.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-16 01:05:56 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-16 01:05:56 +0000
commit6a6ae6e1a26f32fd896b0a7b740129161bfb008b (patch)
tree818a08e98cc3cd7711fd077ea68c3c1a9d740f37 /libc/inet/resolv.c
parenta1915d4502e23cc0c30e1c80a31971e71e7340a5 (diff)
Convert some users and get rid of __rpc_thread_createerr jump reloc, this was indeed a badly chosen name
Diffstat (limited to 'libc/inet/resolv.c')
-rw-r--r--libc/inet/resolv.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index be0ab457b..90a767815 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -149,6 +149,7 @@
#define recv __recv
#define send __send
#define snprintf __snprintf
+#define fgets __fgets
#define __FORCE_GLIBC
#include <features.h>
@@ -1138,7 +1139,7 @@ struct hostent *gethostbyname2(const char *name, int family)
#ifdef L_res_init
struct __res_state _res;
-int res_init(void)
+int attribute_hidden __res_init_internal(void)
{
struct __res_state *rp = &(_res);
@@ -1183,6 +1184,7 @@ int res_init(void)
return(0);
}
+strong_alias(__res_init_internal,res_init)
void res_close( void )
{
@@ -1198,7 +1200,11 @@ void res_close( void )
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#endif
-int res_query(const char *dname, int class, int type,
+int __res_init_internal (void) __THROW attribute_hidden;
+int __res_querydomain_internal (const char *, const char *, int, int,
+ u_char *, int) __THROW attribute_hidden;
+
+int attribute_hidden __res_query_internal(const char *dname, int class, int type,
unsigned char *answer, int anslen)
{
int i;
@@ -1239,6 +1245,7 @@ int res_query(const char *dname, int class, int type,
free(packet);
return i;
}
+strong_alias(__res_query_internal,res_query)
/*
* Formulate a normal query, send, and retrieve answer in supplied buffer.
@@ -1258,7 +1265,7 @@ int res_search(name, class, type, answer, anslen)
int trailing_dot, ret, saved_herrno;
int got_nodata = 0, got_servfail = 0, tried_as_is = 0;
- if ((!name || !answer) || ((_res.options & RES_INIT) == 0 && res_init() == -1)) {
+ if ((!name || !answer) || ((_res.options & RES_INIT) == 0 && __res_init_internal() == -1)) {
h_errno = NETDB_INTERNAL;
return (-1);
}
@@ -1278,7 +1285,7 @@ int res_search(name, class, type, answer, anslen)
*/
saved_herrno = -1;
if (dots >= _res.ndots) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
+ ret = __res_querydomain_internal(name, NULL, class, type, answer, anslen);
if (ret > 0)
return (ret);
saved_herrno = h_errno;
@@ -1299,7 +1306,7 @@ int res_search(name, class, type, answer, anslen)
*domain && !done;
domain++) {
- ret = res_querydomain(name, *domain, class, type,
+ ret = __res_querydomain_internal(name, *domain, class, type,
answer, anslen);
if (ret > 0)
return (ret);
@@ -1355,7 +1362,7 @@ int res_search(name, class, type, answer, anslen)
* name or whether it ends with a dot.
*/
if (!tried_as_is) {
- ret = res_querydomain(name, NULL, class, type, answer, anslen);
+ ret = __res_querydomain_internal(name, NULL, class, type, answer, anslen);
if (ret > 0)
return (ret);
}
@@ -1381,7 +1388,7 @@ int res_search(name, class, type, answer, anslen)
* Perform a call on res_query on the concatenation of name and domain,
* removing a trailing dot from name if domain is NULL.
*/
-int res_querydomain(name, domain, class, type, answer, anslen)
+int attribute_hidden __res_querydomain_internal(name, domain, class, type, answer, anslen)
const char *name, *domain;
int class, type; /* class and type of query */
u_char *answer; /* buffer to put answer */
@@ -1391,7 +1398,7 @@ int res_querydomain(name, domain, class, type, answer, anslen)
const char *longname = nbuf;
size_t n, d;
- if ((!name || !answer) || ((_res.options & RES_INIT) == 0 && res_init() == -1)) {
+ if ((!name || !answer) || ((_res.options & RES_INIT) == 0 && __res_init_internal() == -1)) {
h_errno = NETDB_INTERNAL;
return (-1);
}
@@ -1425,8 +1432,9 @@ int res_querydomain(name, domain, class, type, answer, anslen)
}
snprintf(nbuf, sizeof(nbuf), "%s.%s", name, domain);
}
- return (res_query(longname, class, type, answer, anslen));
+ return (__res_query_internal(longname, class, type, answer, anslen));
}
+strong_alias(__res_querydomain_internal,res_querydomain)
/* res_mkquery */
/* res_send */