l...@gnu.org (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’.