mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 10:50:08 +00:00
resolv: Move the res_mkquery function to the resolv/mk_query.c file
This commit is contained in:
parent
74084febc4
commit
5ca4aaea18
@ -1,3 +1,8 @@
|
|||||||
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/res_data.c (res_mkquery): Move ...
|
||||||
|
* resolv/res_mkquery.c (res_mkquery): to here.
|
||||||
|
|
||||||
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
2017-06-30 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/res_mkquery.c: Reformat to GNU style.
|
* resolv/res_mkquery.c: Reformat to GNU style.
|
||||||
|
@ -72,25 +72,6 @@ fp_nquery(const u_char *msg, int len, FILE *file) {
|
|||||||
}
|
}
|
||||||
libresolv_hidden_def (fp_nquery)
|
libresolv_hidden_def (fp_nquery)
|
||||||
|
|
||||||
int
|
|
||||||
res_mkquery(int op, /* opcode of query */
|
|
||||||
const char *dname, /* domain name */
|
|
||||||
int class, int type, /* class and type of query */
|
|
||||||
const u_char *data, /* resource record data */
|
|
||||||
int datalen, /* length of data */
|
|
||||||
const u_char *newrr_in, /* new rr for modify or append */
|
|
||||||
u_char *buf, /* buffer to put query */
|
|
||||||
int buflen) /* size of buffer */
|
|
||||||
{
|
|
||||||
if (__res_maybe_init (&_res, 1) == -1) {
|
|
||||||
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
return (res_nmkquery(&_res, op, dname, class, type,
|
|
||||||
data, datalen,
|
|
||||||
newrr_in, buf, buflen));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
res_query(const char *name, /* domain name */
|
res_query(const char *name, /* domain name */
|
||||||
int class, int type, /* class and type of query */
|
int class, int type, /* class and type of query */
|
||||||
@ -180,11 +161,9 @@ libresolv_hidden_def (hostalias)
|
|||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
#if SHLIB_COMPAT(libresolv, GLIBC_2_0, GLIBC_2_2)
|
#if SHLIB_COMPAT(libresolv, GLIBC_2_0, GLIBC_2_2)
|
||||||
# undef res_mkquery
|
|
||||||
# undef res_query
|
# undef res_query
|
||||||
# undef res_querydomain
|
# undef res_querydomain
|
||||||
# undef res_search
|
# undef res_search
|
||||||
weak_alias (__res_mkquery, res_mkquery);
|
|
||||||
weak_alias (__res_query, res_query);
|
weak_alias (__res_query, res_query);
|
||||||
weak_alias (__res_querydomain, res_querydomain);
|
weak_alias (__res_querydomain, res_querydomain);
|
||||||
weak_alias (__res_search, res_search);
|
weak_alias (__res_search, res_search);
|
||||||
|
@ -90,6 +90,7 @@
|
|||||||
#include <resolv/resolv-internal.h>
|
#include <resolv/resolv-internal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
#include <hp-timing.h>
|
#include <hp-timing.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -202,6 +203,21 @@ res_nmkquery (res_state statp, int op, const char *dname,
|
|||||||
}
|
}
|
||||||
libresolv_hidden_def (res_nmkquery)
|
libresolv_hidden_def (res_nmkquery)
|
||||||
|
|
||||||
|
int
|
||||||
|
res_mkquery (int op, const char *dname, int class, int type,
|
||||||
|
const unsigned char *data, int datalen,
|
||||||
|
const unsigned char *newrr_in,
|
||||||
|
unsigned char *buf, int buflen)
|
||||||
|
{
|
||||||
|
if (__res_maybe_init (&_res, 1) == -1)
|
||||||
|
{
|
||||||
|
RES_SET_H_ERRNO (&_res, NETDB_INTERNAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return res_nmkquery (&_res, op, dname, class, type,
|
||||||
|
data, datalen, newrr_in, buf, buflen);
|
||||||
|
}
|
||||||
|
|
||||||
/* Create an OPT resource record. Return the length of the final
|
/* Create an OPT resource record. Return the length of the final
|
||||||
packet, or -1 on error.
|
packet, or -1 on error.
|
||||||
|
|
||||||
@ -262,3 +278,8 @@ __res_nopt (res_state statp, int n0, unsigned char *buf, int buflen,
|
|||||||
|
|
||||||
return cp - buf;
|
return cp - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_2)
|
||||||
|
# undef res_mkquery
|
||||||
|
weak_alias (__res_mkquery, res_mkquery);
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user