1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

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>
This commit is contained in:
Florian Weimer
2021-07-19 07:55:27 +02:00
parent 13e1f86706
commit 640bbdf71c
76 changed files with 219 additions and 90 deletions

View File

@ -335,7 +335,7 @@ p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) {
char name[MAXDNAME];
int n;
if ((n = dn_expand(msg, msg + len, cp, name, sizeof name)) < 0)
if ((n = __libc_dn_expand (msg, msg + len, cp, name, sizeof name)) < 0)
return (NULL);
if (name[0] == '\0')
putc('.', file);
@ -359,7 +359,7 @@ p_fqnname (const u_char *cp, const u_char *msg, int msglen, char *name,
{
int n, newlen;
if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
if ((n = __libc_dn_expand (msg, cp + msglen, cp, name, namelen)) < 0)
return (NULL);
newlen = strlen(name);
if (newlen == 0 || name[newlen - 1] != '.') {