Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-17 Thread Paolo Bonzini
int main (int argc, char *argv[]) { int err; struct addrinfo *res, hints; memset (&hints, 0, sizeof (hints)); err = getaddrinfo (NULL, "does-not-exist",&hints,&res); printf ("err = %i `%s'\n", err, gai_strerror (err)); return err != 0 ? EXIT_SUCCESS : EXIT_FAILURE; } --8<

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-17 Thread Ludovic Courtès
Hi, Simon Josefsson writes: > l...@gnu.org (Ludovic Courtès) writes: > >> Simon Josefsson writes: >> >>> l...@gnu.org (Ludovic Courtès) writes: >>> What I meant to say is that it should return an error because resolving the ‘does-not-exist’ service fails. >>> >>> Does it only fail (we

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Simon Josefsson
l...@gnu.org (Ludovic Courtès) writes: > Simon Josefsson writes: > >> l...@gnu.org (Ludovic Courtès) writes: >> >>> What I meant to say is that it should return an error because resolving >>> the ‘does-not-exist’ service fails. >> >> Does it only fail (well, falsely succeed) for unknown services?

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: > l...@gnu.org (Ludovic Courtès) writes: > >> #include >> #include >> #include >> #include >> >> int >> main (int argc, char *argv[]) >> { >> int err; >> struct addrinfo *res, hints; >> >> memset (&hints, 0, sizeof (hints)); >> err = getaddrinfo (

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Ludovic Courtès
Simon Josefsson writes: > l...@gnu.org (Ludovic Courtès) writes: > >> What I meant to say is that it should return an error because resolving >> the ‘does-not-exist’ service fails. > > Does it only fail (well, falsely succeed) for unknown services? When asked for a host name that does not resolv

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Simon Josefsson
l...@gnu.org (Ludovic Courtès) writes: > What I meant to say is that it should return an error because resolving > the ‘does-not-exist’ service fails. Does it only fail (well, falsely succeed) for unknown services? > The key piece of info here is port = 0, which makes no sense. Right, although

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Ludovic Courtès
l...@gnu.org (Ludovic Courtès) writes: > #include > #include > #include > #include > > int > main (int argc, char *argv[]) > { > int err; > struct addrinfo *res, hints; > > memset (&hints, 0, sizeof (hints)); > err = getaddrinfo (NULL, "does-not-exist", &hints, &res); > printf ("err

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Ludovic Courtès
Hi Simon, Simon Josefsson writes: > l...@gnu.org (Ludovic Courtès) writes: > >> Hello! >> >> The getaddrinfo(3) function appears to have bogus behavior on >> ‘i386-apple-darwin9.2.2’ (Darwin 9.6 apparently doesn’t have the >> problem). Here’s the test program: >> >> #include >> #include >> #i

Re: Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Simon Josefsson
l...@gnu.org (Ludovic Courtès) writes: > Hello! > > The getaddrinfo(3) function appears to have bogus behavior on > ‘i386-apple-darwin9.2.2’ (Darwin 9.6 apparently doesn’t have the > problem). Here’s the test program: > > #include > #include > #include > #include > > int > main (int argc, cha

Bogus getaddrinfo(3) on Darwin 9.2.2

2010-02-16 Thread Ludovic Courtès
Hello! The getaddrinfo(3) function appears to have bogus behavior on ‘i386-apple-darwin9.2.2’ (Darwin 9.6 apparently doesn’t have the problem). Here’s the test program: --8<---cut here---start->8--- #include #include #include #include int main (int argc,