diff options
author | Ken Raeburn <raeburn@mit.edu> | 2004-10-05 21:04:04 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2004-10-05 21:04:04 +0000 |
commit | 4ed91a6476bb8db923346e6f38b7045c7649eadb (patch) | |
tree | 546d8f8df4cb81d4fee368af23e61a62f0b86d4f /src/include | |
parent | fbd3bc2ea0baaf37433fea3c7040f8dd3c6df3ba (diff) | |
download | krb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.tar.gz krb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.tar.xz krb5-4ed91a6476bb8db923346e6f38b7045c7649eadb.zip |
* fake-addrinfo.h (AI_ADDRCONFIG, AI_V4MAPPED, AI_ALL): If not defined, or when
completely faking getaddrinfo, define them as zero.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16803 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/fake-addrinfo.h | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/include/fake-addrinfo.h b/src/include/fake-addrinfo.h index 2e11fefd1..cc23a3f7d 100644 --- a/src/include/fake-addrinfo.h +++ b/src/include/fake-addrinfo.h @@ -362,17 +362,18 @@ struct addrinfo { #define AI_CANONNAME 0x02 #undef AI_NUMERICHOST #define AI_NUMERICHOST 0x04 -/* N.B.: AI_V4MAPPED, AI_ADDRCONFIG, AI_ALL, and AI_DEFAULT are part - of the spec for getipnodeby*, and *not* part of the spec for - getaddrinfo. Don't use them! */ +/* RFC 2553 says these are part of the interface for getipnodebyname, + not for getaddrinfo. RFC 3493 says they're part of the interface + for getaddrinfo, and getipnodeby* are deprecated. Our fake + getaddrinfo implementation here does IPv4 only anyways. */ #undef AI_V4MAPPED -#define AI_V4MAPPED eeeevil! +#define AI_V4MAPPED 0 #undef AI_ADDRCONFIG -#define AI_ADDRCONFIG eeeevil! +#define AI_ADDRCONFIG 0 #undef AI_ALL -#define AI_ALL eeeevil! +#define AI_ALL 0 #undef AI_DEFAULT -#define AI_DEFAULT eeeevil! +#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) #ifndef NI_MAXHOST #define NI_MAXHOST 1025 @@ -561,6 +562,21 @@ int getnameinfo (const struct sockaddr *addr, socklen_t len, #ifndef AI_NUMERICHOST # define AI_NUMERICHOST 0 #endif +/* Partial RFC 2553 implementations may not have AI_ADDRCONFIG and + friends, which RFC 3493 says are now part of the getaddrinfo + interface, and we'll want to use. */ +#ifndef AI_ADDRCONFIG +# define AI_ADDRCONFIG 0 +#endif +#ifndef AI_V4MAPPED +# define AI_V4MAPPED 0 +#endif +#ifndef AI_ALL +# define AI_ALL 0 +#endif +#ifndef AI_DEFAULT +# define AI_DEFAULT (AI_ADDRCONFIG|AI_V4MAPPED) +#endif #if defined(HAVE_FAKE_GETADDRINFO) || defined(FAI_CACHE) #define NEED_FAKE_GETADDRINFO |