Message ID | 20140701140726.GB20796@spoyarek.pnq.redhat.com |
---|---|
State | New |
Headers | show |
Siddhesh Poyarekar <siddhesh@redhat.com> writes: > Looks like it can't be removed. The file is linked into libresolv.so > and it exports some _gethst* and res_gethost* functions, that are not > documented so I'm assuming we don't knowingly support them. I think we should deprecate these interfaces then. Andreas.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 07/01/2014 10:07 AM, Siddhesh Poyarekar wrote: > On Mon, Jun 30, 2014 at 11:34:14AM -0400, Carlos O'Donell wrote: >> On 06/30/2014 01:59 AM, Siddhesh Poyarekar wrote: >>> On Fri, Jun 27, 2014 at 09:34:19PM -0700, Roland McGrath wrote: >>>> I guess for now the inconsistency just makes me want to have the other code >>>> forks around as documentation. I suppose comments would do it just as >>>> well. Still my inclination is to make these something like: >>>> >>>> /* Insert long new comment about the weirdness and referring to the other >>>> file where the opposite fork is used in equivalent code. */ >>>> #if 0 /* was MULTI_PTRS_ARE_ALIASES */ >>> >>> After reading further, I don't think there is any inconsistency in >>> functionality. The gethostbyaddr function also uses the dns-host.c >>> bits and gethnamaddr.c is currently not used at all. The only >>> reference it has is in resolv/README: >>> >>> The files gethnamaddr.c, mapv4v6addr.h and mapv4v6hostent.h are >>> leftovers from BIND 4.9.7. >>> >>> Given this newly discovered fact, how about the following patch >>> instead? I don't modify gethnamaddr.c because it's not even used. I >>> wonder - given that we have decided to own the resolver bits now - if >>> we should just get rid of gethnamaddr.c and other unused files. I >>> could add a note in the README mentioning this. >>> >>> Siddhesh >>> >>> * resolv/nss_dns/dns-host.c (getanswer_r) >>> [MULTI_PTRS_ARE_ALIASES]: Remove code. >> >> I'm OK with this v2, but if you're up for it I'd like to remove >> gethnameaddr.c and update README. If we don't use the code it >> should be immediately removed to prevent future confusion. > > Looks like it can't be removed. The file is linked into libresolv.so > and it exports some _gethst* and res_gethost* functions, that are not > documented so I'm assuming we don't knowingly support them. All > changes to the file seem to be general bulk changes. How about just > adding this comment to the file instead? OK, in which case if the interface is exported we must continue to export the interface for libresolv.so. > Siddhesh > > * resolv/gethnamaddr.c: Add comment warning that the file is > not maintained. > > diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c > index c73a0dc..49cdc72 100644 > --- a/resolv/gethnamaddr.c > +++ b/resolv/gethnamaddr.c > @@ -49,6 +49,11 @@ > * --Copyright-- > */ > > +/* XXX This file is not used by any of the resolver functions implemented by > + glibc (i.e. get*info and gethostby*). It cannot be removed however because > + it exports symbols in the libresolv ABI. The file is not maintained any > + more, nor are these functions. */ > + OK by me. > #if defined(LIBC_SCCS) && !defined(lint) > static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; > #endif /* LIBC_SCCS and not lint */ > Cheers, Carlos. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTswBHAAoJECXvCkNsKkr/mYsH/1SLlQLaDTN1O0k12Ylw3tme l37ZG4AO4YgXhX6sN738+RNHx0Fsq2pQdRLan8+r9rqS9viSpsEt6G/91xG/SRK4 VW0PGDQTXdaj5QLQR2xSxaDXyVLBxAr6OUWy86K49fdBORHYTSMdnr2imcKHLjUM cKYSkSJRGhl54pN0ogmM3XbwfeLzbFmKpxxensPtN8A1E0tauvGx3njBGf8JUcpX RCa+m2kbZq1wSNHx7M1Mknfj6br9pLIglWgY1kz7kHzk4w5iwSo3Op775F9ECjWu Z62wHisb1lJzO0TymktV4kSbtl8fVvO+4Fbl4o0QUcU4mRuQqHo7mb90wRCMXWE= =ktt9 -----END PGP SIGNATURE-----
On 07/01/2014 10:23 AM, Andreas Schwab wrote: > Siddhesh Poyarekar <siddhesh@redhat.com> writes: > >> Looks like it can't be removed. The file is linked into libresolv.so >> and it exports some _gethst* and res_gethost* functions, that are not >> documented so I'm assuming we don't knowingly support them. > > I think we should deprecate these interfaces then. I'm not opposed to that, however, someone needs to think deeply about this and the applications the might use these interfaces. Seems like a bad thing to do just before a freeze. Cheers, Carlos.
"Carlos O'Donell" <carlos@redhat.com> writes: > On 07/01/2014 10:23 AM, Andreas Schwab wrote: >> Siddhesh Poyarekar <siddhesh@redhat.com> writes: >> >>> Looks like it can't be removed. The file is linked into libresolv.so >>> and it exports some _gethst* and res_gethost* functions, that are not >>> documented so I'm assuming we don't knowingly support them. >> >> I think we should deprecate these interfaces then. > > I'm not opposed to that, however, someone needs to think deeply about > this and the applications the might use these interfaces. Of the 68 packages (out of 22462) in openSUSE:Factory that depend on libresolv.so.2 none of them reference any of the symbols exported from that file. > Seems like a bad thing to do just before a freeze. Sure, that's 2.21 material. Andreas.
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index c73a0dc..49cdc72 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -49,6 +49,11 @@ * --Copyright-- */ +/* XXX This file is not used by any of the resolver functions implemented by + glibc (i.e. get*info and gethostby*). It cannot be removed however because + it exports symbols in the libresolv ABI. The file is not maintained any + more, nor are these functions. */ + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */