On Dec 8 17:52, Yaakov (Cygwin/X) wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Pierre A. Humblet wrote: > > Every version of man resolver that I have ever seen specifies: > > > > SYNOPSIS > > #include <sys/types.h> > > #include <netinet/in.h> > > #include <arpa/nameser.h> > > #include <resolv.h> > > > > So it's up to the user to include the right files. > > Perhaps so, but: > > 1) <resolv.h> already #includes all of those headers *except* for > <netinet/in.h>. > > 2) this does not match Linux behaviour: > > http://sourceware.org/cgi-bin/cvsweb.cgi/libc/resolv/resolv.h?cvsroot=glibc > > As I stated, my STC was based on a configure test which works on other > platforms; I don't see why we shouldn't match that. > > > Sure we can make an exception for Cygwin, but the same program can then > > fail elsewhere. > > I agree that for portability, a program should not assume that #include > <resolv.h> automatically #include <netinet/in.h> and use the latter's > functions or typedefs. But the bottom line here is that <resolv.h> > requires struct sockaddr_in, so it needs that #include.
Good point. Pierre? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat
