diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:55:27 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:56:57 +0200 |
| commit | 21a497cc58df2b9b02dc687b97f105335e7a1c50 (patch) | |
| tree | 30c5a5180ce891b19fc8820b24727f466dde86c3 | |
| parent | b165c65c35d0fc4d60d63ae101f4edfa21c0d30b (diff) | |
| download | glibc-21a497cc58df2b9b02dc687b97f105335e7a1c50.tar.xz glibc-21a497cc58df2b9b02dc687b97f105335e7a1c50.zip | |
resolv: Move res_mkquery, res_nmkquery into libc
This switches to public symbols without __ prefixes, due to improved
namespace management in glibc.
The symbols res_mkquery, __res_mkquery, __res_nmkquery were
moved with the script (using --no-new-version).
res_mkquery@@GLIBC_2.34, res_nmkquery@@GLIBC_2.34 were added using
make update-all-abi.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
69 files changed, 188 insertions, 104 deletions
diff --git a/resolv/Makefile b/resolv/Makefile index e9689f7e2c..31658202d3 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -54,6 +54,7 @@ routines := \ res_hconf \ res_init \ res_libc \ + res_mkquery \ res_nameinquery \ res_queriesmatch \ res_randomid \ @@ -155,7 +156,6 @@ libresolv-routines := \ res_debug \ res_hostalias \ res_isourserver \ - res_mkquery \ res_query \ resolv-deprecated \ # libresolv-routines diff --git a/resolv/Versions b/resolv/Versions index 429b3304c4..e3dd38b3a9 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -17,12 +17,15 @@ libc { herror; hstrerror; res_init; + res_mkquery; } GLIBC_2.2 { __dn_expand; __res_init; + __res_mkquery; __res_nclose; __res_ninit; + __res_nmkquery; __res_nsend; __res_state; _res_hconf; @@ -64,6 +67,8 @@ libc { res_dnok; res_hnok; res_mailok; + res_mkquery; + res_nmkquery; res_nsend; res_ownok; res_send; @@ -91,9 +96,11 @@ libc { __ns_name_uncompress; __ns_name_unpack; __res_context_hostalias; + __res_context_mkquery; __res_context_send; __res_get_nsaddr; __res_iclose; + __res_nopt; __resolv_context_get; __resolv_context_get_override; __resolv_context_get_preinit; @@ -150,7 +157,6 @@ libresolv { res_gethostbyaddr; res_gethostbyname2; res_gethostbyname; - res_mkquery; res_query; res_querydomain; res_search; @@ -159,8 +165,6 @@ libresolv { } GLIBC_2.2 { __res_hostalias; - __res_mkquery; - __res_nmkquery; __res_nquery; __res_nquerydomain; __res_nsearch; diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c index 07c34d1340..ba6c983b58 100644 --- a/resolv/res_mkquery.c +++ b/resolv/res_mkquery.c @@ -141,9 +141,9 @@ __res_context_mkquery (struct resolv_context *ctx, int op, const char *dname, if ((buflen -= QFIXEDSZ) < 0) return -1; compose: - n = ns_name_compress (dname, cp, buflen, - (const unsigned char **) dnptrs, - (const unsigned char **) lastdnptr); + n = __ns_name_compress (dname, cp, buflen, + (const unsigned char **) dnptrs, + (const unsigned char **) lastdnptr); if (n < 0) return -1; cp += n; @@ -155,9 +155,9 @@ __res_context_mkquery (struct resolv_context *ctx, int op, const char *dname, break; /* Make an additional record for completion domain. */ - n = ns_name_compress ((char *)data, cp, buflen, - (const unsigned char **) dnptrs, - (const unsigned char **) lastdnptr); + n = __ns_name_compress ((char *)data, cp, buflen, + (const unsigned char **) dnptrs, + (const unsigned char **) lastdnptr); if (__glibc_unlikely (n < 0)) return -1; cp += n; @@ -174,6 +174,7 @@ __res_context_mkquery (struct resolv_context *ctx, int op, const char *dname, } return cp - buf; } +libc_hidden_def (__res_context_mkquery) /* Common part of res_nmkquery and res_mkquery. */ static int @@ -203,27 +204,38 @@ context_mkquery_common (struct resolv_context *ctx, DATALEN and NEWRR_IN are currently ignored. */ int -res_nmkquery (res_state statp, 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) +___res_nmkquery (res_state statp, 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) { return context_mkquery_common (__resolv_context_get_override (statp), op, dname, class, type, data, buf, buflen); } +versioned_symbol (libc, ___res_nmkquery, res_nmkquery, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libresolv, ___res_nmkquery, __res_nmkquery, GLIBC_2_2); +#endif 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) +___res_mkquery (int op, const char *dname, int class, int type, |
