[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: getaddrinfo module conflict
From: |
Derek R. Price |
Subject: |
Re: getaddrinfo module conflict |
Date: |
Wed, 19 Jul 2006 11:43:30 -0400 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Yoann Vandoorselaere wrote:
> My suggestion is that unless we can get a full featured replacement of
> the getaddrinfo function within GnuLib (and thus replace any non
> conforming system implementation), we should not attempt to redefine any
> of the flags if the function is available on the system.
Though it would be nice to see a full-featured replacement, for now
leaving the definitions of AI_* flags which aren't implemented by the
replacement does sound simplest. How's the attached patch look?
2006-07-19 Derek R. Price <address@hidden>
* lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
Cheers,
Derek
--
Derek R. Price
CVS Solutions Architect
Get CVS support at Ximbiot <http://ximbiot.com>!
v: +1 248.835.1260
f: +1 248.835.1263
<mailto:address@hidden>
Index: lib/getaddrinfo.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/getaddrinfo.h,v
retrieving revision 1.15
diff -u -p -r1.15 getaddrinfo.h
--- lib/getaddrinfo.h 5 Jul 2006 17:53:09 -0000 1.15
+++ lib/getaddrinfo.h 19 Jul 2006 15:38:28 -0000
@@ -47,25 +47,19 @@ struct addrinfo
# endif
/* Possible values for `ai_flags' field in `addrinfo' structure. */
-# ifndef AI_PASSIVE
-# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */
-# endif
+/* The commented out definitions below are not yet implemented in the
+ GNULIB getaddrinfo() replacement, so are not yet needed and may, in fact,
+ cause conflicts on systems with a getaddrinfo() function which does not
+ define them. */
+/* #define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */
# ifndef AI_CANONNAME
# define AI_CANONNAME 0x0002 /* Request for canonical name. */
# endif
-# ifndef AI_NUMERICHOST
-# define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */
-# endif
-# ifndef AI_V4MAPPED
-# define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */
-# endif
-# ifndef AI_ALL
-# define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
-# endif
-# ifndef AI_ADDRCONFIG
-# define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to
choose
+/* #define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */
+/* #define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */
+/* #define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */
+/* #define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to
choose
returned address type.. */
-#endif
#ifndef AI_NUMERICSERV
# define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
# endif