aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-19 07:55:27 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-19 07:56:57 +0200
commitea9878ec271c791880fcbbe519d70c42f8113750 (patch)
treea26723d85e45c86be9ff7199f954418d34e7ef65
parent21a497cc58df2b9b02dc687b97f105335e7a1c50 (diff)
downloadglibc-ea9878ec271c791880fcbbe519d70c42f8113750.tar.xz
glibc-ea9878ec271c791880fcbbe519d70c42f8113750.zip
resolv: Move res_query functions into libc
This switches to public symbols without __ prefixes, due to improved namespace management in glibc. The script was used with --no-new-version to move the symbols __res_nquery, __res_nquerydomain, __res_nsearch, __res_query, __res_querydomain, __res_search, res_query, res_querydomain, res_search. The public symbols res_nquery, res_nquerydomain, res_nsearch, res_ownok, res_query, res_querydomain, res_search were added with make update-all-abi. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
-rw-r--r--resolv/Makefile2
-rw-r--r--resolv/Versions28
-rw-r--r--resolv/res_query.c88
-rw-r--r--resolv/resolv-internal.h4
-rw-r--r--resolv/resolv.h6
-rw-r--r--sysdeps/mach/hurd/i386/libc.abilist12
-rw-r--r--sysdeps/mach/hurd/i386/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/alpha/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/arc/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/arc/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/csky/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/csky/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/i386/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/i386/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/ia64/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv32/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist15
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/libresolv.abilist9
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/64/libresolv.abilist6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist12
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/x32/libresolv.abilist6
69 files changed, 520 insertions, 280 deletions
diff --git a/resolv/Makefile b/resolv/Makefile
index 31658202d3..4ba58dfa96 100644
--- a/resolv/Makefile
+++ b/resolv/Makefile
@@ -57,6 +57,7 @@ routines := \
res_mkquery \
res_nameinquery \
res_queriesmatch \
+ res_query \
res_randomid \
res_send \
resolv_conf \
@@ -156,7 +157,6 @@ libresolv-routines := \
res_debug \
res_hostalias \
res_isourserver \
- res_query \
resolv-deprecated \
# libresolv-routines
diff --git a/resolv/Versions b/resolv/Versions
index e3dd38b3a9..05679d42c1 100644
--- a/resolv/Versions
+++ b/resolv/Versions
@@ -18,6 +18,9 @@ libc {
hstrerror;
res_init;
res_mkquery;
+ res_query;
+ res_querydomain;
+ res_search;
}
GLIBC_2.2 {
__dn_expand;
@@ -26,7 +29,13 @@ libc {
__res_nclose;
__res_ninit;
__res_nmkquery;
+ __res_nquery;
+ __res_nquerydomain;
+ __res_nsearch;
__res_nsend;
+ __res_query;
+ __res_querydomain;
+ __res_search;
__res_state;
_res_hconf;
}
@@ -69,8 +78,14 @@ libc {
res_mailok;
res_mkquery;
res_nmkquery;
+ res_nquery;
+ res_nquerydomain;
+ res_nsearch;
res_nsend;
res_ownok;
+ res_query;
+ res_querydomain;
+ res_search;
res_send;
}
GLIBC_PRIVATE {
@@ -97,6 +112,8 @@ libc {
__ns_name_unpack;
__res_context_hostalias;
__res_context_mkquery;
+ __res_context_query;
+ __res_context_search;
__res_context_send;
__res_get_nsaddr;
__res_iclose;
@@ -157,20 +174,11 @@ libresolv {
res_gethostbyaddr;
res_gethostbyname2;
res_gethostbyname;
- res_query;
- res_querydomain;
- res_search;
res_send_setqhook;
res_send_setrhook;
}
GLIBC_2.2 {
__res_hostalias;
- __res_nquery;
- __res_nquerydomain;
- __res_nsearch;
- __res_query;
- __res_querydomain;
- __res_search;
}
GLIBC_2.3.2 {
__p_rcode;
@@ -201,8 +209,6 @@ libresolv {
GLIBC_PRIVATE {
__ns_get16;
__ns_get32;
- __res_context_query;
- __res_context_search;
}
}
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2457193d31..75b0e5f2f7 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -276,7 +276,7 @@ __res_context_query (struct resolv_context *ctx, const char *name,
success:
return (n);
}
-libresolv_hidden_def (__res_context_query)
+libc_hidden_def (__res_context_query)
/* Common part of res_nquery and res_query. */
static int
@@ -296,23 +296,34 @@ context_query_common (struct resolv_context *ctx,
}
int
-res_nquery(res_state statp,
- const char *name, /* domain name */
- int class, int type, /* class and type of query */
- u_char *answer, /* buffer to put answer */
- int anslen) /* size of answer buffer */
+___res_nquery (res_state statp,
+ const char *name, /* Domain name. */
+ int class, int type, /* Class and type of query. */
+ unsigned char *answer, /* Buffer to put answer. */
+ int anslen) /* Size of answer buffer. */
{
return context_query_common
(__resolv_context_get_override (statp), name, class, type, answer, anslen);
}
+versioned_symbol (libc, ___res_nquery, res_nquery, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libresolv, ___res_nquery, __res_nquery, GLIBC_2_2);
+#endif
int
-res_query (const char *name, int class, int type,
- unsigned char *answer, int anslen)
+___res_query (const char *name, int class, int type,
+ unsigned char *answer, int anslen)
{
return context_query_common
(__resolv_context_get (), name, class, type, answer, anslen);
}
+versioned_symbol (libc, ___res_query, res_query, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_2)
+compat_symbol (libresolv, ___res_query, res_query, GLIBC_2_0);
+#endif
+#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libresolv, ___res_query, __res_query, GLIBC_2_2);
+#endif
/* Formulate a normal query, send, and retrieve answer in supplied
buffer. Return the size of the response on success, -1 on error.