[Python-checkins] CVS: python/dist/src/Modules _hotshot.c,1.1,1.2
Tim Peters
tim_one@users.sourceforge.net
Fri, 12 Oct 2001 15:08:41 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv31336/python/Modules
Modified Files:
_hotshot.c
Log Message:
Get hotshot closer to compiling on Windows.
Still broken: GETTIMEOFDAY. This macro obviously isn't being defined
on Windows, so there's logic errors here I'd rather Fred untangled.
Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** _hotshot.c 2001/10/12 20:57:55 1.1
--- _hotshot.c 2001/10/12 22:08:39 1.2
***************
*** 20,23 ****
--- 20,24 ----
#include <windows.h>
#include <largeint.h>
+ #include <direct.h> /* for getcwd() */
typedef LARGE_INTEGER hs_time;
#else
***************
*** 42,45 ****
--- 43,54 ----
#define BUFFERSIZE 10240
+ #ifndef PATH_MAX
+ # ifdef MAX_PATH
+ # define PATH_MAX MAX_PATH
+ # else
+ # error "Need a defn. for PATH_MAX in _hotshot.c"
+ # endif
+ #endif
+
typedef struct {
PyObject_HEAD
***************
*** 366,369 ****
--- 375,379 ----
}
default:
+ ;
}
if (err == ERR_EOF && oldindex != 0) {
***************
*** 471,475 ****
/* Need to dump data to the log file... */
size_t written = fwrite(self->buffer, 1, self->index, self->logfp);
! if (written == self->index)
self->index = 0;
else {
--- 481,485 ----
/* Need to dump data to the log file... */
size_t written = fwrite(self->buffer, 1, self->index, self->logfp);
! if (written == (size_t)self->index)
self->index = 0;
else {
***************
*** 724,728 ****
pack_exit(self, get_tdelta(self));
break;
! case PyTrace_LINE:
if (self->linetimings)
pack_lineno_tdelta(self, frame->f_lineno, get_tdelta(self));
--- 734,738 ----
pack_exit(self, get_tdelta(self));
break;
! case PyTrace_LINE:
if (self->linetimings)
pack_lineno_tdelta(self, frame->f_lineno, get_tdelta(self));
***************
*** 1260,1264 ****
self->active = 0;
self->next_fileno = 0;
! self->logfp = NULL;
self->logfilename = PyTuple_GET_ITEM(args, 0);
Py_INCREF(self->logfilename);
--- 1270,1274 ----
self->active = 0;
self->next_fileno = 0;
! self->logfp = NULL;
self->logfilename = PyTuple_GET_ITEM(args, 0);
Py_INCREF(self->logfilename);