[Python-checkins] CVS: python/dist/src/Modules addrinfo.h,1.3,1.4
Martin v. L?wis
loewis@users.sourceforge.net
Thu, 06 Dec 2001 11:04:37 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv23598
Modified Files:
addrinfo.h
Log Message:
Undefine addrinfo.h constants if the system header defined them.
Fixes #486099.
Index: addrinfo.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/addrinfo.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** addrinfo.h 2001/08/15 17:14:33 1.3
--- addrinfo.h 2001/12/06 19:04:35 1.4
***************
*** 33,37 ****
* Error return codes from getaddrinfo()
*/
! #ifndef EAI_ADDRFAMILY
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
#define EAI_AGAIN 2 /* temporary failure in name resolution */
--- 33,59 ----
* Error return codes from getaddrinfo()
*/
! #ifdef EAI_ADDRFAMILY
! /* If this is defined, there is a conflicting implementation
! in the C library, which can't be used for some reason.
! Make sure it won't interfere with this emulation. */
!
! #undef EAI_ADDRFAMILY
! #undef EAI_AGAIN
! #undef EAI_BADFLAGS
! #undef EAI_FAIL
! #undef EAI_FAMILY
! #undef EAI_MEMORY
! #undef EAI_NODATA
! #undef EAI_NONAME
! #undef EAI_SERVICE
! #undef EAI_SOCKTYPE
! #undef EAI_SYSTEM
! #undef EAI_BADHINTS
! #undef EAI_PROTOCOL
! #undef EAI_MAX
! #undef getaddrinfo
! #define getaddrinfo fake_getaddrinfo
! #endif
!
#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */
#define EAI_AGAIN 2 /* temporary failure in name resolution */
***************
*** 48,57 ****
#define EAI_PROTOCOL 13
#define EAI_MAX 14
- #endif
/*
* Flag values for getaddrinfo()
*/
! #ifndef AI_PASSIVE
#define AI_PASSIVE 0x00000001 /* get address to use bind() */
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
--- 70,89 ----
#define EAI_PROTOCOL 13
#define EAI_MAX 14
/*
* Flag values for getaddrinfo()
*/
! #ifdef AI_PASSIVE
! #undef AI_PASSIVE
! #undef AI_CANONNAME
! #undef AI_NUMERICHOST
! #undef AI_MASK
! #undef AI_ALL
! #undef AI_V4MAPPED_CFG
! #undef AI_ADDRCONFIG
! #undef AI_V4MAPPED
! #undef AI_DEFAULT
! #endif
!
#define AI_PASSIVE 0x00000001 /* get address to use bind() */
#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
***************
*** 66,70 ****
/* special recommended flags for getipnodebyname */
#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
- #endif
#endif /* HAVE_GETADDRINFO */
--- 98,101 ----