[Python-checkins] CVS: python/dist/src/Modules _testcapimodule.c,1.3.4.1,1.3.4.2 arraymodule.c,2.62.6.1,2.62.6.2 getaddrinfo.c,1.1.2.2,1.1.2.3 getbuildinfo.c,2.6,2.6.8.1 getnameinfo.c,1.2.2.1,1.2.2.2 getpath.c,1.35,1.35.6.1 main.c,1.52.4.3,1.52.4.4 posixmodule.c,2.187.4.4,2.187.4.5 socketmodule.c,1.141.4.2,1.141.4.3 timemodule.c,2.110.4.1,2.110.4.2
Tim Peters
tim_one@users.sourceforge.net
Fri, 27 Jul 2001 22:03:01 -0700
- Previous message: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.81.6.6,2.81.6.7 unicodeobject.c,2.87.2.6,2.87.2.7
- Next message: [Python-checkins] CVS: python/dist/src/PC pyconfig.h,NONE,1.2.2.1 dl_nt.c,1.3,1.3.12.1 getpathp.c,1.23,1.23.6.1 readme.txt,1.23,1.23.6.1 config.h,1.51.2.2,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv14630/descr/dist/src/Modules
Modified Files:
Tag: descr-branch
_testcapimodule.c arraymodule.c getaddrinfo.c getbuildinfo.c
getnameinfo.c getpath.c main.c posixmodule.c socketmodule.c
timemodule.c
Log Message:
Merge of trunk tags date2001-07-21 to date2001-07-28.
Index: _testcapimodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_testcapimodule.c,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -C2 -d -r1.3.4.1 -r1.3.4.2
*** _testcapimodule.c 2001/07/07 22:55:29 1.3.4.1
--- _testcapimodule.c 2001/07/28 05:02:59 1.3.4.2
***************
*** 26,30 ****
}
! /* Test #defines from config.h (particularly the SIZEOF_* defines).
The ones derived from autoconf on the UNIX-like OSes can be relied
--- 26,30 ----
}
! /* Test #defines from pyconfig.h (particularly the SIZEOF_* defines).
The ones derived from autoconf on the UNIX-like OSes can be relied
Index: arraymodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v
retrieving revision 2.62.6.1
retrieving revision 2.62.6.2
diff -C2 -d -r2.62.6.1 -r2.62.6.2
*** arraymodule.c 2001/07/07 22:55:29 2.62.6.1
--- arraymodule.c 2001/07/28 05:02:59 2.62.6.2
***************
*** 881,885 ****
\n\
Return a tuple (address, length) giving the current memory address and\n\
! the length in bytes of the buffer used to hold array's contents.";
--- 881,887 ----
\n\
Return a tuple (address, length) giving the current memory address and\n\
! the length in items of the buffer used to hold array's contents\n\
! The length should be multiplied by the itemsize attribute to calculate\n\
! the buffer length in bytes.";
Index: getaddrinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getaddrinfo.c,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** getaddrinfo.c 2001/07/21 06:07:13 1.1.2.2
--- getaddrinfo.c 2001/07/28 05:02:59 1.1.2.3
***************
*** 189,192 ****
--- 189,193 ----
(ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
memset((ai)->ai_addr, 0, (gai_afd)->a_socklen);\
+ (ai)->ai_addrlen = (gai_afd)->a_socklen;\
(ai)->ai_addr->sa_family = (ai)->ai_family = (gai_afd)->a_af;\
((struct sockinet *)(ai)->ai_addr)->si_port = port;\
***************
*** 344,348 ****
pai->ai_protocol = IPPROTO_UDP;
}
! port = htons(atoi(servname));
} else {
struct servent *sp;
--- 345,349 ----
pai->ai_protocol = IPPROTO_UDP;
}
! port = htons((u_short)atoi(servname));
} else {
struct servent *sp;
***************
*** 418,422 ****
--- 419,425 ----
if (inet_pton(gai_afdl[i].a_af, hostname, pton)) {
u_long v4a;
+ #ifdef INET6
u_char pfx;
+ #endif
switch (gai_afdl[i].a_af) {
***************
*** 493,497 ****
struct hostent *hp;
struct addrinfo *cur;
! int error = 0, h_error;
#ifdef INET6
--- 496,503 ----
struct hostent *hp;
struct addrinfo *cur;
! int error = 0;
! #ifdef INET6
! int h_error;
! #endif
#ifdef INET6
***************
*** 539,546 ****
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
top = NULL;
--- 545,548 ----
Index: getbuildinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getbuildinfo.c,v
retrieving revision 2.6
retrieving revision 2.6.8.1
diff -C2 -d -r2.6 -r2.6.8.1
*** getbuildinfo.c 2000/07/21 06:00:07 2.6
--- getbuildinfo.c 2001/07/28 05:02:59 2.6.8.1
***************
*** 1,3 ****
! #include "config.h"
#ifdef macintosh
--- 1,3 ----
! #include "pyconfig.h"
#ifdef macintosh
Index: getnameinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getnameinfo.c,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -d -r1.2.2.1 -r1.2.2.2
*** getnameinfo.c 2001/07/07 22:55:29 1.2.2.1
--- getnameinfo.c 2001/07/28 05:02:59 1.2.2.2
***************
*** 99,103 ****
--- 99,105 ----
char *addr, *p;
u_long v4a;
+ #ifdef INET6
u_char pfx;
+ #endif
int h_error;
char numserv[512];
Index: getpath.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v
retrieving revision 1.35
retrieving revision 1.35.6.1
diff -C2 -d -r1.35 -r1.35.6.1
*** getpath.c 2001/01/24 17:13:11 1.35
--- getpath.c 2001/07/28 05:02:59 1.35.6.1
***************
*** 366,370 ****
static char separator[2] = {SEP, '\0'};
char *pythonpath = PYTHONPATH;
! char *rtpypath = getenv("PYTHONPATH");
char *home = Py_GetPythonHome();
char *path = getenv("PATH");
--- 366,370 ----
static char separator[2] = {SEP, '\0'};
char *pythonpath = PYTHONPATH;
! char *rtpypath = Py_GETENV("PYTHONPATH");
char *home = Py_GetPythonHome();
char *path = getenv("PATH");
Index: main.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v
retrieving revision 1.52.4.3
retrieving revision 1.52.4.4
diff -C2 -d -r1.52.4.3 -r1.52.4.4
*** main.c 2001/07/21 06:07:13 1.52.4.3
--- main.c 2001/07/28 05:02:59 1.52.4.4
***************
*** 29,33 ****
/* command line options */
! #define BASE_OPTS "c:diOStuUvxXhVW:"
#ifndef RISCOS
--- 29,33 ----
/* command line options */
! #define BASE_OPTS "c:diOSEtuUvxXhVW:"
#ifndef RISCOS
***************
*** 54,57 ****
--- 54,58 ----
-OO : remove doc-strings in addition to the -O optimizations\n\
-S : don't imply 'import site' on initialization\n\
+ -E : ignore environment variables (such as PYTHONPATH)\n\
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
";
***************
*** 109,112 ****
--- 110,115 ----
int help = 0;
int version = 0;
+ int saw_inspect_flag = 0;
+ int saw_unbuffered_flag = 0;
PyCompilerFlags cf;
***************
*** 118,126 ****
#endif
- if ((p = getenv("PYTHONINSPECT")) && *p != '\0')
- inspect = 1;
- if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
- unbuffered = 1;
-
PySys_ResetWarnOptions();
--- 121,124 ----
***************
*** 147,150 ****
--- 145,149 ----
case 'i':
inspect++;
+ saw_inspect_flag = 1;
Py_InteractiveFlag++;
break;
***************
*** 158,161 ****
--- 157,164 ----
break;
+ case 'E':
+ Py_IgnoreEnvironmentFlag++;
+ break;
+
case 't':
Py_TabcheckFlag++;
***************
*** 164,167 ****
--- 167,171 ----
case 'u':
unbuffered++;
+ saw_unbuffered_flag = 1;
break;
***************
*** 211,214 ****
--- 215,225 ----
}
+ if (!saw_inspect_flag &&
+ (p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
+ inspect = 1;
+ if (!saw_unbuffered_flag &&
+ (p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
+ unbuffered = 1;
+
if (command == NULL && _PyOS_optind < argc &&
strcmp(argv[_PyOS_optind], "-") != 0)
***************
*** 308,312 ****
else {
if (filename == NULL && stdin_is_interactive) {
! char *startup = getenv("PYTHONSTARTUP");
if (startup != NULL && startup[0] != '\0') {
FILE *fp = fopen(startup, "r");
--- 319,323 ----
else {
if (filename == NULL && stdin_is_interactive) {
! char *startup = Py_GETENV("PYTHONSTARTUP");
if (startup != NULL && startup[0] != '\0') {
FILE *fp = fopen(startup, "r");
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.187.4.4
retrieving revision 2.187.4.5
diff -C2 -d -r2.187.4.4 -r2.187.4.5
*** posixmodule.c 2001/07/21 06:07:13 2.187.4.4
--- posixmodule.c 2001/07/28 05:02:59 2.187.4.5
***************
*** 47,51 ****
/* Various compilers have only certain posix functions */
! /* XXX Gosh I wish these were all moved into config.h */
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
#include <process.h>
--- 47,51 ----
/* Various compilers have only certain posix functions */
! /* XXX Gosh I wish these were all moved into pyconfig.h */
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
#include <process.h>
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.141.4.2
retrieving revision 1.141.4.3
diff -C2 -d -r1.141.4.2 -r1.141.4.3
*** socketmodule.c 2001/07/21 06:07:13 1.141.4.2
--- socketmodule.c 2001/07/28 05:02:59 1.141.4.3
***************
*** 8,12 ****
Limitations:
! - only AF_INET and AF_UNIX address families are supported in a
portable manner, though AF_PACKET is supported under Linux.
- no read/write operations (use send/recv or makefile instead)
--- 8,12 ----
Limitations:
! - only AF_INET, AF_INET6 and AF_UNIX address families are supported in a
portable manner, though AF_PACKET is supported under Linux.
[...1034 lines suppressed...]
#ifndef HAVE_INET_PTON
int
! inet_pton (int af, const char *src, void *dst)
{
if(af == AF_INET){
***************
*** 2967,2972 ****
}
! char *
! inet_ntop(int af, void *src, char *dst, socklen_t size)
{
if (af == AF_INET) {
--- 3419,3424 ----
}
! const char *
! inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
if (af == AF_INET) {
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.110.4.1
retrieving revision 2.110.4.2
diff -C2 -d -r2.110.4.1 -r2.110.4.2
*** timemodule.c 2001/07/07 22:55:30 2.110.4.1
--- timemodule.c 2001/07/28 05:02:59 2.110.4.2
***************
*** 595,599 ****
d = PyModule_GetDict(m);
/* Accept 2-digit dates unless PYTHONY2K is set and non-empty */
! p = getenv("PYTHONY2K");
ins(d, "accept2dyear", PyInt_FromLong((long) (!p || !*p)));
/* Squirrel away the module's dictionary for the y2k check */
--- 595,599 ----
d = PyModule_GetDict(m);
/* Accept 2-digit dates unless PYTHONY2K is set and non-empty */
! p = Py_GETENV("PYTHONY2K");
ins(d, "accept2dyear", PyInt_FromLong((long) (!p || !*p)));
/* Squirrel away the module's dictionary for the y2k check */
- Previous message: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.81.6.6,2.81.6.7 unicodeobject.c,2.87.2.6,2.87.2.7
- Next message: [Python-checkins] CVS: python/dist/src/PC pyconfig.h,NONE,1.2.2.1 dl_nt.c,1.3,1.3.12.1 getpathp.c,1.23,1.23.6.1 readme.txt,1.23,1.23.6.1 config.h,1.51.2.2,NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]