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<
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
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?
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 (
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
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
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
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
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
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,
10 matches
Mail list logo