[Python-checkins] python/dist/src/Modules _codecsmodule.c,2.11,2.12 _hotshot.c,1.18,1.19 _localemodule.c,2.32,2.33 mmapmodule.c,2.38,2.39 posixmodule.c,2.240,2.241 signalmodule.c,2.69,2.70 timemodule.c,2.127,2.128
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sun, 30 Jun 2002 08:26:12 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv9631/Modules
Modified Files:
_codecsmodule.c _hotshot.c _localemodule.c mmapmodule.c
posixmodule.c signalmodule.c timemodule.c
Log Message:
Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
Index: _codecsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_codecsmodule.c,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -d -r2.11 -r2.12
*** _codecsmodule.c 17 Jan 2002 23:15:58 -0000 2.11
--- _codecsmodule.c 30 Jun 2002 15:26:09 -0000 2.12
***************
*** 317,321 ****
}
! #if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
static PyObject *
--- 317,321 ----
}
! #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
static PyObject *
***************
*** 335,339 ****
}
! #endif /* MS_WIN32 */
/* --- Encoder ------------------------------------------------------------ */
--- 335,339 ----
}
! #endif /* MS_WINDOWS */
/* --- Encoder ------------------------------------------------------------ */
***************
*** 637,641 ****
}
! #if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
static PyObject *
--- 637,641 ----
}
! #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
static PyObject *
***************
*** 662,666 ****
}
! #endif /* MS_WIN32 */
#endif /* Py_USING_UNICODE */
--- 662,666 ----
}
! #endif /* MS_WINDOWS */
#endif /* Py_USING_UNICODE */
***************
*** 696,700 ****
{"readbuffer_encode", readbuffer_encode, METH_VARARGS},
{"charbuffer_encode", charbuffer_encode, METH_VARARGS},
! #if defined(MS_WIN32) && defined(HAVE_USABLE_WCHAR_T)
{"mbcs_encode", mbcs_encode, METH_VARARGS},
{"mbcs_decode", mbcs_decode, METH_VARARGS},
--- 696,700 ----
{"readbuffer_encode", readbuffer_encode, METH_VARARGS},
{"charbuffer_encode", charbuffer_encode, METH_VARARGS},
! #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
{"mbcs_encode", mbcs_encode, METH_VARARGS},
{"mbcs_decode", mbcs_decode, METH_VARARGS},
Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** _hotshot.c 13 Jun 2002 20:32:45 -0000 1.18
--- _hotshot.c 30 Jun 2002 15:26:09 -0000 1.19
***************
*** 13,17 ****
* be difficult. This will do for now.
*/
! #ifdef MS_WIN32
#include <windows.h>
#include <direct.h> /* for getcwd() */
--- 13,17 ----
* be difficult. This will do for now.
*/
! #ifdef MS_WINDOWS
#include <windows.h>
#include <direct.h> /* for getcwd() */
***************
*** 91,95 ****
! #ifndef MS_WIN32
#ifdef GETTIMEOFDAY_NO_TZ
#define GETTIMEOFDAY(ptv) gettimeofday((ptv))
--- 91,95 ----
! #ifndef MS_WINDOWS
#ifdef GETTIMEOFDAY_NO_TZ
#define GETTIMEOFDAY(ptv) gettimeofday((ptv))
***************
*** 819,823 ****
{
int tdelta;
! #ifdef MS_WIN32
hs_time tv;
hs_time diff;
--- 819,823 ----
{
int tdelta;
! #ifdef MS_WINDOWS
hs_time tv;
hs_time diff;
***************
*** 910,914 ****
/* A couple of useful helper functions. */
! #ifdef MS_WIN32
static LARGE_INTEGER frequency = {0, 0};
#endif
--- 910,914 ----
/* A couple of useful helper functions. */
! #ifdef MS_WINDOWS
static LARGE_INTEGER frequency = {0, 0};
#endif
***************
*** 922,926 ****
hs_time tv1, tv2;
! #ifdef MS_WIN32
hs_time diff;
QueryPerformanceFrequency(&frequency);
--- 922,926 ----
hs_time tv1, tv2;
! #ifdef MS_WINDOWS
hs_time diff;
QueryPerformanceFrequency(&frequency);
***************
*** 930,934 ****
while (1) {
GETTIMEOFDAY(&tv2);
! #ifdef MS_WIN32
diff = tv2 - tv1;
if (diff != 0) {
--- 930,934 ----
while (1) {
GETTIMEOFDAY(&tv2);
! #ifdef MS_WINDOWS
diff = tv2 - tv1;
if (diff != 0) {
***************
*** 946,950 ****
#endif
}
! #if defined(MS_WIN32) || defined(macintosh) || defined(PYOS_OS2)
rusage_diff = -1;
#else
--- 946,950 ----
#endif
}
! #if defined(MS_WINDOWS) || defined(macintosh) || defined(PYOS_OS2)
rusage_diff = -1;
#else
***************
*** 1449,1453 ****
pack_add_info(self, "executable-version", buffer);
! #ifdef MS_WIN32
PyOS_snprintf(cwdbuffer, sizeof(cwdbuffer), "%I64d", frequency.QuadPart);
pack_add_info(self, "reported-performance-frequency", cwdbuffer);
--- 1449,1453 ----
pack_add_info(self, "executable-version", buffer);
! #ifdef MS_WINDOWS
PyOS_snprintf(cwdbuffer, sizeof(cwdbuffer), "%I64d", frequency.QuadPart);
pack_add_info(self, "reported-performance-frequency", cwdbuffer);
***************
*** 1554,1558 ****
PyDoc_VAR(resolution__doc__) =
! #ifdef MS_WIN32
PyDoc_STR(
"resolution() -> (performance-counter-ticks, update-frequency)\n"
--- 1554,1558 ----
PyDoc_VAR(resolution__doc__) =
! #ifdef MS_WINDOWS
PyDoc_STR(
"resolution() -> (performance-counter-ticks, update-frequency)\n"
***************
*** 1581,1585 ****
calibrate();
}
! #ifdef MS_WIN32
result = Py_BuildValue("ii", timeofday_diff, frequency.LowPart);
#else
--- 1581,1585 ----
calibrate();
}
! #ifdef MS_WINDOWS
result = Py_BuildValue("ii", timeofday_diff, frequency.LowPart);
#else
Index: _localemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_localemodule.c,v
retrieving revision 2.32
retrieving revision 2.33
diff -C2 -d -r2.32 -r2.33
*** _localemodule.c 13 Jun 2002 20:32:45 -0000 2.32
--- _localemodule.c 30 Jun 2002 15:26:09 -0000 2.33
***************
*** 26,30 ****
#endif
! #if defined(MS_WIN32)
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
--- 26,30 ----
#endif
! #if defined(MS_WINDOWS)
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
***************
*** 364,368 ****
}
! #if defined(MS_WIN32)
static PyObject*
PyLocale_getdefaultlocale(PyObject* self)
--- 364,368 ----
}
! #if defined(MS_WINDOWS)
static PyObject*
PyLocale_getdefaultlocale(PyObject* self)
***************
*** 628,632 ****
{"strxfrm", (PyCFunction) PyLocale_strxfrm,
METH_VARARGS, strxfrm__doc__},
! #if defined(MS_WIN32) || defined(macintosh)
{"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS},
#endif
--- 628,632 ----
{"strxfrm", (PyCFunction) PyLocale_strxfrm,
METH_VARARGS, strxfrm__doc__},
! #if defined(MS_WINDOWS) || defined(macintosh)
{"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS},
#endif
Index: mmapmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v
retrieving revision 2.38
retrieving revision 2.39
diff -C2 -d -r2.38 -r2.39
*** mmapmodule.c 8 Mar 2002 05:43:32 -0000 2.38
--- mmapmodule.c 30 Jun 2002 15:26:09 -0000 2.39
***************
*** 21,29 ****
#include <Python.h>
! #ifndef MS_WIN32
#define UNIX
#endif
! #ifdef MS_WIN32
#include <windows.h>
static int
--- 21,29 ----
#include <Python.h>
! #ifndef MS_WINDOWS
#define UNIX
#endif
! #ifdef MS_WINDOWS
#include <windows.h>
static int
***************
*** 76,80 ****
size_t pos;
! #ifdef MS_WIN32
HANDLE map_handle;
HANDLE file_handle;
--- 76,80 ----
size_t pos;
! #ifdef MS_WINDOWS
HANDLE map_handle;
HANDLE file_handle;
***************
*** 93,97 ****
mmap_object_dealloc(mmap_object *m_obj)
{
! #ifdef MS_WIN32
if (m_obj->data != NULL)
UnmapViewOfFile (m_obj->data);
--- 93,97 ----
mmap_object_dealloc(mmap_object *m_obj)
{
! #ifdef MS_WINDOWS
if (m_obj->data != NULL)
UnmapViewOfFile (m_obj->data);
***************
*** 102,106 ****
if (m_obj->tagname)
PyMem_Free(m_obj->tagname);
! #endif /* MS_WIN32 */
#ifdef UNIX
--- 102,106 ----
if (m_obj->tagname)
PyMem_Free(m_obj->tagname);
! #endif /* MS_WINDOWS */
#ifdef UNIX
***************
*** 119,123 ****
if (!PyArg_ParseTuple(args, ":close"))
return NULL;
! #ifdef MS_WIN32
/* For each resource we maintain, we need to check
the value is valid, and if so, free the resource
--- 119,123 ----
if (!PyArg_ParseTuple(args, ":close"))
return NULL;
! #ifdef MS_WINDOWS
/* For each resource we maintain, we need to check
the value is valid, and if so, free the resource
***************
*** 139,143 ****
self->file_handle = INVALID_HANDLE_VALUE;
}
! #endif /* MS_WIN32 */
#ifdef UNIX
--- 139,143 ----
self->file_handle = INVALID_HANDLE_VALUE;
}
! #endif /* MS_WINDOWS */
#ifdef UNIX
***************
*** 150,154 ****
}
! #ifdef MS_WIN32
#define CHECK_VALID(err) \
do { \
--- 150,154 ----
}
! #ifdef MS_WINDOWS
#define CHECK_VALID(err) \
do { \
***************
*** 158,162 ****
} \
} while (0)
! #endif /* MS_WIN32 */
#ifdef UNIX
--- 158,162 ----
} \
} while (0)
! #endif /* MS_WINDOWS */
#ifdef UNIX
***************
*** 337,341 ****
return NULL;
! #ifdef MS_WIN32
if (self->file_handle != INVALID_HANDLE_VALUE) {
return (Py_BuildValue (
--- 337,341 ----
return NULL;
! #ifdef MS_WINDOWS
if (self->file_handle != INVALID_HANDLE_VALUE) {
return (Py_BuildValue (
***************
*** 345,349 ****
return (Py_BuildValue ("l", (long) self->size) );
}
! #endif /* MS_WIN32 */
#ifdef UNIX
--- 345,349 ----
return (Py_BuildValue ("l", (long) self->size) );
}
! #endif /* MS_WINDOWS */
#ifdef UNIX
***************
*** 377,381 ****
!is_resizeable(self)) {
return NULL;
! #ifdef MS_WIN32
} else {
DWORD dwErrCode = 0;
--- 377,381 ----
!is_resizeable(self)) {
return NULL;
! #ifdef MS_WINDOWS
} else {
DWORD dwErrCode = 0;
***************
*** 415,419 ****
PyErr_SetFromWindowsErr(dwErrCode);
return (NULL);
! #endif /* MS_WIN32 */
#ifdef UNIX
--- 415,419 ----
PyErr_SetFromWindowsErr(dwErrCode);
return (NULL);
! #endif /* MS_WINDOWS */
#ifdef UNIX
***************
*** 468,475 ****
return NULL;
} else {
! #ifdef MS_WIN32
return (Py_BuildValue("l", (long)
FlushViewOfFile(self->data+offset, size)));
! #endif /* MS_WIN32 */
#ifdef UNIX
/* XXX semantics of return value? */
--- 468,475 ----
return NULL;
} else {
! #ifdef MS_WINDOWS
return (Py_BuildValue("l", (long)
FlushViewOfFile(self->data+offset, size)));
! #endif /* MS_WINDOWS */
#ifdef UNIX
/* XXX semantics of return value? */
***************
*** 910,914 ****
#endif /* UNIX */
! #ifdef MS_WIN32
static PyObject *
new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
--- 910,914 ----
#endif /* UNIX */
! #ifdef MS_WINDOWS
static PyObject *
new_mmap_object(PyObject *self, PyObject *args, PyObject *kwdict)
***************
*** 1043,1047 ****
return (NULL);
}
! #endif /* MS_WIN32 */
/* List of functions exported by this module */
--- 1043,1047 ----
return (NULL);
}
! #endif /* MS_WINDOWS */
/* List of functions exported by this module */
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.240
retrieving revision 2.241
diff -C2 -d -r2.240 -r2.241
*** posixmodule.c 20 Jun 2002 18:31:21 -0000 2.240
--- posixmodule.c 30 Jun 2002 15:26:09 -0000 2.241
***************
*** 5,9 ****
module actually calls itself 'nt' or 'os2', not 'posix', and a few
functions are either unimplemented or implemented differently. The source
! assumes that for Windows NT, the macro 'MS_WIN32' is defined independent
of the compiler used. Different compilers define their own feature
test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler
--- 5,9 ----
module actually calls itself 'nt' or 'os2', not 'posix', and a few
functions are either unimplemented or implemented differently. The source
! assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
of the compiler used. Different compilers define their own feature
test macro, e.g. '__BORLANDC__' or '_MSC_VER'. For OS/2, the compiler
***************
*** 83,87 ****
#ifdef _MSC_VER /* Microsoft compiler */
#define HAVE_GETCWD 1
- #ifdef MS_WIN32
#define HAVE_SPAWNV 1
#define HAVE_EXECV 1
--- 83,86 ----
***************
*** 90,95 ****
#define HAVE_SYSTEM 1
#define HAVE_CWAIT 1
- #else /* 16-bit Windows */
- #endif /* !MS_WIN32 */
#else
#if defined(PYOS_OS2) && defined(PYCC_GCC)
--- 89,92 ----
***************
*** 223,233 ****
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
- #ifdef MS_WIN32
#define popen _popen
#define pclose _pclose
- #else /* 16-bit Windows */
- #include <dos.h>
- #include <ctype.h>
- #endif /* MS_WIN32 */
#endif /* _MSC_VER */
--- 220,225 ----
***************
*** 269,273 ****
/* choose the appropriate stat and fstat functions and return structs */
#undef STAT
! #if defined(MS_WIN64) || defined(MS_WIN32)
# define STAT _stati64
# define FSTAT _fstati64
--- 261,265 ----
/* choose the appropriate stat and fstat functions and return structs */
#undef STAT
! #if defined(MS_WIN64) || defined(MS_WINDOWS)
# define STAT _stati64
# define FSTAT _fstati64
***************
*** 368,372 ****
}
! #ifdef MS_WIN32
static PyObject *
win32_error(char* function, char* filename)
--- 360,364 ----
}
! #ifdef MS_WINDOWS
static PyObject *
win32_error(char* function, char* filename)
***************
*** 685,692 ****
int res;
! #ifdef MS_WIN32
int pathlen;
char pathcopy[MAX_PATH];
! #endif /* MS_WIN32 */
if (!PyArg_ParseTuple(args, format,
--- 677,684 ----
int res;
! #ifdef MS_WINDOWS
int pathlen;
char pathcopy[MAX_PATH];
! #endif /* MS_WINDOWS */
if (!PyArg_ParseTuple(args, format,
***************
*** 695,699 ****
pathfree = path;
! #ifdef MS_WIN32
pathlen = strlen(path);
/* the library call can blow up if the file name is too long! */
--- 687,691 ----
pathfree = path;
! #ifdef MS_WINDOWS
pathlen = strlen(path);
/* the library call can blow up if the file name is too long! */
***************
*** 720,724 ****
}
}
! #endif /* MS_WIN32 */
Py_BEGIN_ALLOW_THREADS
--- 712,716 ----
}
}
! #endif /* MS_WINDOWS */
Py_BEGIN_ALLOW_THREADS
***************
*** 992,996 ****
/* XXX Should redo this putting the (now four) versions of opendir
in separate files instead of having them all here... */
! #if defined(MS_WIN32) && !defined(HAVE_OPENDIR)
PyObject *d, *v;
--- 984,988 ----
/* XXX Should redo this putting the (now four) versions of opendir
in separate files instead of having them all here... */
! #if defined(MS_WINDOWS) && !defined(HAVE_OPENDIR)
PyObject *d, *v;
***************
*** 1048,1112 ****
return d;
- #elif defined(_MSC_VER) /* 16-bit Windows */
-
- #ifndef MAX_PATH
- #define MAX_PATH 250
- #endif
- char *name, *pt;
- int len;
- PyObject *d, *v;
- char namebuf[MAX_PATH+5];
- struct _find_t ep;
-
- if (!PyArg_ParseTuple(args, "t#:listdir", &name, &len))
- return NULL;
- if (len >= MAX_PATH) {
- PyErr_SetString(PyExc_ValueError, "path too long");
- return NULL;
- }
- strcpy(namebuf, name);
- for (pt = namebuf; *pt; pt++)
- if (*pt == ALTSEP)
- *pt = SEP;
- if (namebuf[len-1] != SEP)
- namebuf[len++] = SEP;
- strcpy(namebuf + len, "*.*");
-
- if ((d = PyList_New(0)) == NULL)
- return NULL;
-
- if (_dos_findfirst(namebuf, _A_RDONLY |
- _A_HIDDEN | _A_SYSTEM | _A_SUBDIR, &ep) != 0)
- {
- errno = ENOENT;
- return posix_error_with_filename(name);
- }
- do {
- if (ep.name[0] == '.' &&
- (ep.name[1] == '\0' ||
- ep.name[1] == '.' &&
- ep.name[2] == '\0'))
- continue;
- strcpy(namebuf, ep.name);
- for (pt = namebuf; *pt; pt++)
- if (isupper(*pt))
- *pt = tolower(*pt);
- v = PyString_FromString(namebuf);
- if (v == NULL) {
- Py_DECREF(d);
- d = NULL;
- break;
- }
- if (PyList_Append(d, v) != 0) {
- Py_DECREF(v);
- Py_DECREF(d);
- d = NULL;
- break;
- }
- Py_DECREF(v);
- } while (_dos_findnext(&ep) == 0);
-
- return d;
-
#elif defined(PYOS_OS2)
--- 1040,1043 ----
***************
*** 1221,1225 ****
} /* end of posix_listdir */
! #ifdef MS_WIN32
/* A helper function for abspath on win32 */
static PyObject *
--- 1152,1156 ----
} /* end of posix_listdir */
! #ifdef MS_WINDOWS
/* A helper function for abspath on win32 */
static PyObject *
***************
*** 1241,1245 ****
return PyString_FromString(outbuf);
} /* end of posix__getfullpathname */
! #endif /* MS_WIN32 */
PyDoc_STRVAR(posix_mkdir__doc__,
--- 1172,1176 ----
return PyString_FromString(outbuf);
} /* end of posix__getfullpathname */
! #endif /* MS_WINDOWS */
PyDoc_STRVAR(posix_mkdir__doc__,
***************
*** 3051,3055 ****
#endif /* PYCC_??? */
! #elif defined(MS_WIN32)
/*
--- 2982,2986 ----
#endif /* PYCC_??? */
! #elif defined(MS_WINDOWS)
/*
***************
*** 4212,4216 ****
! #ifdef MS_WIN32
#define HAVE_TIMES /* so the method table will pick it up */
static PyObject *
--- 4143,4147 ----
! #ifdef MS_WINDOWS
#define HAVE_TIMES /* so the method table will pick it up */
static PyObject *
***************
*** 4238,4242 ****
(double)0);
}
! #endif /* MS_WIN32 */
#ifdef HAVE_TIMES
--- 4169,4173 ----
(double)0);
}
! #endif /* MS_WINDOWS */
#ifdef HAVE_TIMES
***************
*** 4415,4419 ****
{
int fd, how;
! #if defined(MS_WIN64) || defined(MS_WIN32)
LONG_LONG pos, res;
#else
--- 4346,4350 ----
{
int fd, how;
! #if defined(MS_WIN64) || defined(MS_WINDOWS)
LONG_LONG pos, res;
#else
***************
*** 4442,4446 ****
Py_BEGIN_ALLOW_THREADS
! #if defined(MS_WIN64) || defined(MS_WIN32)
res = _lseeki64(fd, pos, how);
#else
--- 4373,4377 ----
Py_BEGIN_ALLOW_THREADS
! #if defined(MS_WIN64) || defined(MS_WINDOWS)
res = _lseeki64(fd, pos, how);
#else
***************
*** 4591,4595 ****
return Py_BuildValue("(ii)", read, write);
#else
! #if !defined(MS_WIN32)
int fds[2];
int res;
--- 4522,4526 ----
return Py_BuildValue("(ii)", read, write);
#else
! #if !defined(MS_WINDOWS)
int fds[2];
int res;
***************
*** 4602,4606 ****
return posix_error();
return Py_BuildValue("(ii)", fds[0], fds[1]);
! #else /* MS_WIN32 */
HANDLE read, write;
int read_fd, write_fd;
--- 4533,4537 ----
return posix_error();
return Py_BuildValue("(ii)", fds[0], fds[1]);
! #else /* MS_WINDOWS */
HANDLE read, write;
int read_fd, write_fd;
***************
*** 4616,4620 ****
write_fd = _open_osfhandle((Py_intptr_t)write, 1);
return Py_BuildValue("(ii)", read_fd, write_fd);
! #endif /* MS_WIN32 */
#endif
}
--- 4547,4551 ----
write_fd = _open_osfhandle((Py_intptr_t)write, 1);
return Py_BuildValue("(ii)", read_fd, write_fd);
! #endif /* MS_WINDOWS */
#endif
}
***************
*** 5190,5194 ****
return NULL;
! #ifdef MS_WIN32
name = _tempnam(dir, pfx);
#else
--- 5121,5125 ----
return NULL;
! #ifdef MS_WINDOWS
name = _tempnam(dir, pfx);
#else
***************
*** 6251,6255 ****
}
! #ifdef MS_WIN32
PyDoc_STRVAR(win32_startfile__doc__,
"startfile(filepath) - Start a file with its associated application.\n\
--- 6182,6186 ----
}
! #ifdef MS_WINDOWS
PyDoc_STRVAR(win32_startfile__doc__,
"startfile(filepath) - Start a file with its associated application.\n\
***************
*** 6391,6395 ****
#ifdef HAVE_POPEN
{"popen", posix_popen, METH_VARARGS, posix_popen__doc__},
! #ifdef MS_WIN32
{"popen2", win32_popen2, METH_VARARGS},
{"popen3", win32_popen3, METH_VARARGS},
--- 6322,6326 ----
#ifdef HAVE_POPEN
{"popen", posix_popen, METH_VARARGS, posix_popen__doc__},
! #ifdef MS_WINDOWS
{"popen2", win32_popen2, METH_VARARGS},
{"popen3", win32_popen3, METH_VARARGS},
***************
*** 6543,6547 ****
#endif
{"abort", posix_abort, METH_VARARGS, posix_abort__doc__},
! #ifdef MS_WIN32
{"_getfullpathname", posix__getfullpathname, METH_VARARGS, NULL},
#endif
--- 6474,6478 ----
#endif
{"abort", posix_abort, METH_VARARGS, posix_abort__doc__},
! #ifdef MS_WINDOWS
{"_getfullpathname", posix__getfullpathname, METH_VARARGS, NULL},
#endif
Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -d -r2.69 -r2.70
*** signalmodule.c 13 Jun 2002 21:42:51 -0000 2.69
--- signalmodule.c 30 Jun 2002 15:26:09 -0000 2.70
***************
*** 7,11 ****
#include "intrcheck.h"
! #ifdef MS_WIN32
#include <process.h>
#endif
--- 7,11 ----
#include "intrcheck.h"
! #ifdef MS_WINDOWS
#include <process.h>
#endif
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.127
retrieving revision 2.128
diff -C2 -d -r2.127 -r2.128
*** timemodule.c 13 Jun 2002 20:32:53 -0000 2.127
--- timemodule.c 30 Jun 2002 15:26:09 -0000 2.128
***************
*** 30,50 ****
#ifdef MS_WINDOWS
#include <windows.h>
! #if defined(MS_WIN16) || defined(__BORLANDC__)
/* These overrides not needed for Win32 */
#define timezone _timezone
#define tzname _tzname
#define daylight _daylight
! #endif /* MS_WIN16 || __BORLANDC__ */
! #ifdef MS_WIN16
! #define altzone _altzone
! #endif /* MS_WIN16 */
#endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ || __QNX__ */
! #if defined(MS_WIN32) && !defined(MS_WIN64) && !defined(__BORLANDC__)
/* Win32 has better clock replacement
XXX Win64 does not yet, but might when the platform matures. */
#undef HAVE_CLOCK /* We have our own version down below */
! #endif /* MS_WIN32 && !MS_WIN64 */
#if defined(PYOS_OS2)
--- 30,47 ----
#ifdef MS_WINDOWS
#include <windows.h>
! #if defined(__BORLANDC__)
/* These overrides not needed for Win32 */
#define timezone _timezone
#define tzname _tzname
#define daylight _daylight
! #endif /* __BORLANDC__ */
#endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ || __QNX__ */
! #if defined(MS_WINDOWS) && !defined(MS_WIN64) && !defined(__BORLANDC__)
/* Win32 has better clock replacement
XXX Win64 does not yet, but might when the platform matures. */
#undef HAVE_CLOCK /* We have our own version down below */
! #endif /* MS_WINDOWS && !MS_WIN64 */
#if defined(PYOS_OS2)
***************
*** 142,146 ****
#endif /* HAVE_CLOCK */
! #if defined(MS_WIN32) && !defined(MS_WIN64) && !defined(__BORLANDC__)
/* Due to Mark Hammond and Tim Peters */
static PyObject *
--- 139,143 ----
#endif /* HAVE_CLOCK */
! #if defined(MS_WINDOWS) && !defined(MS_WIN64) && !defined(__BORLANDC__)
/* Due to Mark Hammond and Tim Peters */
static PyObject *
***************
*** 171,175 ****
#define HAVE_CLOCK /* So it gets included in the methods */
! #endif /* MS_WIN32 && !MS_WIN64 */
#ifdef HAVE_CLOCK
--- 168,172 ----
#define HAVE_CLOCK /* So it gets included in the methods */
! #endif /* MS_WINDOWS && !MS_WIN64 */
#ifdef HAVE_CLOCK
***************
*** 737,741 ****
floatsleep(double secs)
{
! /* XXX Should test for MS_WIN32 first! */
#if defined(HAVE_SELECT) && !defined(__BEOS__) && !defined(__EMX__)
struct timeval t;
--- 734,738 ----
floatsleep(double secs)
{
! /* XXX Should test for MS_WINDOWS first! */
#if defined(HAVE_SELECT) && !defined(__BEOS__) && !defined(__EMX__)
struct timeval t;
***************
*** 772,805 ****
delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */
Py_END_ALLOW_THREADS
! #elif defined(MSDOS)
! struct timeb t1, t2;
! double frac;
! extern double fmod(double, double);
! extern double floor(double);
! if (secs <= 0.0)
! return;
! frac = fmod(secs, 1.0);
! secs = floor(secs);
! ftime(&t1);
! t2.time = t1.time + (int)secs;
! t2.millitm = t1.millitm + (int)(frac*1000.0);
! while (t2.millitm >= 1000) {
! t2.time++;
! t2.millitm -= 1000;
! }
! for (;;) {
! #ifdef QUICKWIN
! Py_BEGIN_ALLOW_THREADS
! _wyield();
! Py_END_ALLOW_THREADS
! #endif
! if (PyErr_CheckSignals())
! return -1;
! ftime(&t1);
! if (t1.time > t2.time ||
! t1.time == t2.time && t1.millitm >= t2.millitm)
! break;
! }
! #elif defined(MS_WIN32)
{
double millisecs = secs * 1000.0;
--- 769,773 ----
delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */
Py_END_ALLOW_THREADS
! #elif defined(MS_WINDOWS)
{
double millisecs = secs * 1000.0;