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 | 391e02236b931132c0e8b5ba4c3b087c2aaa1044 (patch) | |
| tree | 692244699dcec82a94b0c2d82f09f9d21c4b7e47 | |
| parent | fd8a87c0c1932de591e7ad108ff6288a4b6b18c9 (diff) | |
| download | glibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.tar.xz glibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.zip | |
resolv: Move dn_skipname to its own file and into libc
And reformat it to GNU style.
dn_skipname is used outside glibc, so do not deprecate it,
and export it as dn_skipname (not __dn_skipname). Due to internal
users, provide a __libc_dn_skipname alias, and keep __dn_skipname
as a pure compatibility symbol.
__dn_skipname@GLIBC_2.0 was moved using the script, and
dn_skipname@@GLIBC_2.34 was added using make update-all-abi.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
72 files changed, 178 insertions, 50 deletions
diff --git a/include/resolv.h b/include/resolv.h index 602f184643..378b36d612 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_skipname) libresolv_hidden_proto (__res_hnok) libresolv_hidden_proto (__res_dnok) libresolv_hidden_proto (__putlong) @@ -66,6 +65,8 @@ libresolv_hidden_proto (__dn_count_labels) extern __typeof (dn_expand) __libc_dn_expand; libc_hidden_proto (__libc_dn_expand) +extern __typeof (dn_skipname) __libc_dn_skipname; +libc_hidden_proto (__libc_dn_skipname) # endif /* _RESOLV_H_ && !_ISOMAC */ #endif diff --git a/resolv/Makefile b/resolv/Makefile index 936518523d..e1a608f4ac 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -30,6 +30,7 @@ headers := resolv.h bits/types/res_state.h \ routines := \ dn_comp \ dn_expand \ + dn_skipname \ herror \ inet_addr \ inet_ntop \ diff --git a/resolv/Versions b/resolv/Versions index e36cf45cfa..634c7833a8 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -1,6 +1,7 @@ libc { GLIBC_2.0 { __dn_comp; + __dn_skipname; __h_errno_location; __res_randomid; _res; @@ -45,6 +46,7 @@ libc { %endif dn_comp; dn_expand; + dn_skipname; ns_name_compress; ns_name_ntop; ns_name_pack; @@ -61,6 +63,7 @@ libc { __inet_aton_exact; __inet_pton_length; __libc_dn_expand; + __libc_dn_skipname; __ns_name_compress; __ns_name_ntop; __ns_name_pack; @@ -82,7 +85,6 @@ libresolv { __b64_ntop; __b64_pton; __dn_count_labels; - __dn_skipname; __fp_nquery; __fp_query; __fp_resstat; diff --git a/resolv/dn_skipname.c b/resolv/dn_skipname.c new file mode 100644 index 0000000000..b9a587faff --- /dev/null +++ b/resolv/dn_skipname.c @@ -0,0 +1,103 @@ +/* Skipping over a compressed DNS domain name in wire format. + Copyright (C) 1995-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +/* + * Copyright (c) 1985, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVEN |
