[Python-checkins] CVS: python/dist/src/Modules addrinfo.h,1.1,1.2 getaddrinfo.c,1.1,1.2 socketmodule.c,1.149,1.150

Martin v. L?wis loewis@users.sourceforge.net
Thu, 19 Jul 2001 10:37:48 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv25000

Modified Files:
	addrinfo.h getaddrinfo.c socketmodule.c 
Log Message:
Port getaddrinfo to MSVC++.


Index: addrinfo.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/addrinfo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** addrinfo.h	2001/06/23 16:30:13	1.1
--- addrinfo.h	2001/07/19 17:37:46	1.2
***************
*** 106,110 ****
  #define _SS_MAXSIZE	128
  #ifdef HAVE_LONG_LONG
! #define _SS_ALIGNSIZE	(sizeof(long long))
  #else
  #define _SS_ALIGNSIZE	(sizeof(double))
--- 106,110 ----
  #define _SS_MAXSIZE	128
  #ifdef HAVE_LONG_LONG
! #define _SS_ALIGNSIZE	(sizeof(LONG_LONG))
  #else
  #define _SS_ALIGNSIZE	(sizeof(double))
***************
*** 123,127 ****
  	char	__ss_pad1[_SS_PAD1SIZE];
  #ifdef HAVE_LONG_LONG
! 	long long __ss_align;	/* force desired structure storage alignment */
  #else
  	double __ss_align;	/* force desired structure storage alignment */
--- 123,127 ----
  	char	__ss_pad1[_SS_PAD1SIZE];
  #ifdef HAVE_LONG_LONG
! 	LONG_LONG __ss_align;	/* force desired structure storage alignment */
  #else
  	double __ss_align;	/* force desired structure storage alignment */

Index: getaddrinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getaddrinfo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** getaddrinfo.c	2001/06/23 16:30:13	1.1
--- getaddrinfo.c	2001/07/19 17:37:46	1.2
***************
*** 118,121 ****
--- 118,132 ----
  #endif
  
+ #ifndef IN_MULTICAST
+ #define IN_MULTICAST(i)	    (((i) & 0xf0000000U) == 0xe0000000U)
+ #endif
+ 
+ #ifndef IN_EXPERIMENTAL
+ #define IN_EXPERIMENTAL(i)  (((i) & 0xe0000000U) == 0xe0000000U)
+ #endif
+ 
+ #ifndef IN_LOOPBACKNET
+ #define IN_LOOPBACKNET	    127
+ #endif
  
  static int get_name Py_PROTO((const char *, struct gai_afd *,
***************
*** 528,532 ****
  	int i, error = 0, h_error;
  	char *ap;
! #ifndef INET6
  	extern int h_errno;
  #endif
--- 539,544 ----
  	int i, error = 0, h_error;
  	char *ap;
! #if !defined(INET6) && !defined(MS_WIN32)
! 	/* In winsock.h, h_errno is #defined as a function call. */
  	extern int h_errno;
  #endif

Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -r1.149 -r1.150
*** socketmodule.c	2001/06/25 06:38:03	1.149
--- socketmodule.c	2001/07/19 17:37:46	1.150
***************
*** 196,205 ****
  #endif
  
- /* XXX 24-Jun-2000 Tim:  I have no idea what the code inside this block is
-    trying to do, and don't have time to look.  Looks like Unix-specific code
-    in those files, though, which will never compile on Windows. */
- #ifndef MS_WINDOWS
  #include "addrinfo.h"
- #endif /* ifndef MS_WINDOWS hack */
  
  #ifdef USE_SSL
--- 196,200 ----
***************
*** 212,220 ****
  #endif /* USE_SSL */
  
- /* XXX 24-Jun-2000 Tim:  I have no idea what the code inside this block is
-    trying to do, and don't have time to look.  Looks like Unix-specific code
-    in those files, though, which will never compile on Windows. */
- #ifndef MS_WINDOWS
- 
  #ifndef HAVE_INET_PTON
  int inet_pton (int af, char *src, void *dst);
--- 207,210 ----
***************
*** 229,234 ****
  #include "getnameinfo.c"
  #endif
- 
- #endif /* ifndef MS_WINDOWS hack */
  
  #if defined(MS_WINDOWS) || defined(__BEOS__)
--- 219,222 ----