[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bogus getaddrinfo(3) on Darwin 9.2.2
From: |
Ludovic Courtès |
Subject: |
Re: Bogus getaddrinfo(3) on Darwin 9.2.2 |
Date: |
Tue, 16 Feb 2010 19:30:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> #include <netdb.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
>
> 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;
> }
>
> Here, I’d expect either ‘EAI_NONAME’ or ‘EAI_SERVICE’ (glibc 2.11
> returns the latter on GNU/Linux). On ‘i386-apple-darwin9.2.2’ it
> succeeds:
FWIW here’s what other systems do:
- sparc-sun-solaris2.8: EAI_SERVICE
- powerpc-ibm-aix5.3.0.0: EAI_NONAME
- alphaev56-dec-osf5.1b: EAI_SERVICE
Ludo’.
Re: Bogus getaddrinfo(3) on Darwin 9.2.2,
Ludovic Courtès <=
Re: Bogus getaddrinfo(3) on Darwin 9.2.2, Paolo Bonzini, 2010/02/17