From 8afb810e8c822caa37885481243200afcf58f6d8 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 19 Nov 2004 21:09:45 +0000 Subject: [PATCH] * fake-addrinfo.c (HAVE_GETADDRINFO, HAVE_GETNAMEINFO)[_WIN32]: Don't define here. (protoname): Handle IPPROTO_IGMP. (debug_dump_addrinfo_args): Update for current interfaces to socktypename and familyname. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16893 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/ChangeLog | 8 ++++++++ src/util/support/fake-addrinfo.c | 15 +++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index 9732a6778..2c2a3252d 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -1,3 +1,11 @@ +2004-11-19 Ken Raeburn + + * fake-addrinfo.c (HAVE_GETADDRINFO, HAVE_GETNAMEINFO)[_WIN32]: + Don't define here. + (protoname): Handle IPPROTO_IGMP. + (debug_dump_addrinfo_args): Update for current interfaces to + socktypename and familyname. + 2004-11-15 Ken Raeburn * cache-addrinfo.h, init-addrinfo.c: New files, split out from diff --git a/src/util/support/fake-addrinfo.c b/src/util/support/fake-addrinfo.c index 8ccbe3e78..74197e645 100644 --- a/src/util/support/fake-addrinfo.c +++ b/src/util/support/fake-addrinfo.c @@ -157,11 +157,6 @@ extern /*@dependent@*/ char *gai_strerror (int code) /*@*/; # include /* strtoul */ #endif -#ifdef _WIN32 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETNAMEINFO 1 -#endif - /* Do we actually have *any* systems we care about that don't provide either getaddrinfo or one of these two flavors of @@ -362,6 +357,9 @@ static const char *protoname (int p, char *buf) { #ifdef IPPROTO_COMP X(COMP); #endif +#ifdef IPPROTO_IGMP + X(IGMP); +#endif sprintf(buf, " %-2d", p); return buf; @@ -430,14 +428,15 @@ static void debug_dump_error (int err) static void debug_dump_addrinfos (const struct addrinfo *ai) { int count = 0; + char buf[10]; fprintf(stderr, "addrinfos returned:\n"); while (ai) { fprintf(stderr, "%p...", ai); - fprintf(stderr, " socktype=%s", socktypename(ai->ai_socktype)); - fprintf(stderr, " ai_family=%s", familyname(ai->ai_family)); + fprintf(stderr, " socktype=%s", socktypename(ai->ai_socktype, buf)); + fprintf(stderr, " ai_family=%s", familyname(ai->ai_family, buf)); if (ai->ai_family != ai->ai_addr->sa_family) fprintf(stderr, " sa_family=%s", - familyname(ai->ai_addr->sa_family)); + familyname(ai->ai_addr->sa_family, buf)); fprintf(stderr, "\n"); ai = ai->ai_next; count++; -- 2.26.2