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:21 +0200 |
| commit | 640bbdf71c6f10ac26252ac67a22902e26657bd8 (patch) | |
| tree | 227d6260dda188bdc22f2d9a6b52acd77c3d68b7 | |
| parent | 13e1f86706e463de4429f7e88f47c6ff65cd845e (diff) | |
| download | glibc-640bbdf71c6f10ac26252ac67a22902e26657bd8.tar.xz glibc-640bbdf71c6f10ac26252ac67a22902e26657bd8.zip | |
resolv: Move dn_expand to its own file and into libc
And reformat to GNU style.
This switches back to the dn_expand name for the ABI symbol and turns
__dn_expand into a compatibility symbol. With the improved namespace
management in current glibc, it is no longer necessary to use a
private namespace symbol. To avoid old code binding to a
GLIBC_PRIVATE symbol by accident, use __libc_dn_expand for the
internal symbol name.
The symbols dn_expand, __dnexpand were moved using
scripts/move-symbol-to-libc.py, followed by an adjustment to make
dn_expand the only GLIBC_2.34 symbol.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
76 files changed, 219 insertions, 90 deletions
diff --git a/include/resolv.h b/include/resolv.h index daf4a74777..44fc0c346f 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -44,7 +44,6 @@ libresolv_hidden_proto (_sethtent) libresolv_hidden_proto (_gethtent) libresolv_hidden_proto (_gethtbyaddr) libresolv_hidden_proto (_gethtbyname2) -libresolv_hidden_proto (__dn_expand) libresolv_hidden_proto (__dn_comp) libresolv_hidden_proto (__dn_skipname) libresolv_hidden_proto (__res_hnok) @@ -66,5 +65,8 @@ libresolv_hidden_proto (__res_queriesmatch) libresolv_hidden_proto (__b64_ntop) libresolv_hidden_proto (__dn_count_labels) +extern __typeof (dn_expand) __libc_dn_expand; +libc_hidden_proto (__libc_dn_expand) + # endif /* _RESOLV_H_ && !_ISOMAC */ #endif diff --git a/resolv/Makefile b/resolv/Makefile index 64600ab845..3e7de81fb5 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -28,6 +28,7 @@ headers := resolv.h bits/types/res_state.h \ sys/bitypes.h routines := \ + dn_expand \ herror \ inet_addr \ inet_ntop \ diff --git a/resolv/Versions b/resolv/Versions index a676be2e42..4a9203042f 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -3,6 +3,7 @@ libc { __h_errno_location; __res_randomid; _res; + dn_expand; h_errlist; h_nerr; herror; @@ -10,6 +11,7 @@ libc { res_init; } GLIBC_2.2 { + __dn_expand; __res_init; __res_nclose; __res_ninit; @@ -40,6 +42,7 @@ libc { gai_suspend; getaddrinfo_a; %endif + dn_expand; ns_name_compress; ns_name_ntop; ns_name_pack; @@ -55,6 +58,7 @@ libc { __h_errno; __inet_aton_exact; __inet_pton_length; + __libc_dn_expand; __ns_name_compress; __ns_name_ntop; __ns_name_pack; @@ -120,7 +124,6 @@ libresolv { _res_opcodes; _res_resultcodes; _sethtent; - dn_expand; inet_net_ntop; inet_net_pton; inet_neta; @@ -135,7 +138,6 @@ libresolv { res_send_setrhook; } GLIBC_2.2 { - __dn_expand; __res_hostalias; __res_mkquery; __res_nmkquery; diff --git a/resolv/compat-gethnamaddr.c b/resolv/compat-gethnamaddr.c index 0e24dcbbcc..1c630fcb3d 100644 --- a/resolv/compat-gethnamaddr.c +++ b/resolv/compat-gethnamaddr.c @@ -179,7 +179,7 @@ getanswer (const querybuf *answer, int anslen, const char *qname, int qtype) __set_h_errno (NO_RECOVERY); return (NULL); } - n = dn_expand(answer->buf, eom, cp, bp, buflen); + n = __libc_ |
