[Python-checkins] CVS: python/dist/src/Modules _hotshot.c,1.6,1.7
Jack Jansen
jackjansen@users.sourceforge.net
Tue, 23 Oct 2001 15:26:18 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv18131/Python/Modules
Modified Files:
_hotshot.c
Log Message:
Got this to work in MacPython. The code is #ifdef macintosh style (to match the existing #ifdef MS_WINDOWS), but eventually ifdeffing on configure features is probably better.
Index: _hotshot.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_hotshot.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** _hotshot.c 2001/10/15 22:11:02 1.6
--- _hotshot.c 2001/10/23 22:26:16 1.7
***************
*** 32,37 ****
--- 32,41 ----
#error "This module requires gettimeofday() on non-Windows platforms!"
#endif
+ #ifdef macintosh
+ #include <sys/time.h>
+ #else
#include <sys/resource.h>
#include <sys/times.h>
+ #endif
typedef struct timeval hs_time;
#endif
***************
*** 49,52 ****
--- 53,60 ----
#define BUFFERSIZE 10240
+ #ifdef macintosh
+ #define PATH_MAX 254
+ #endif
+
#ifndef PATH_MAX
# ifdef MAX_PATH
***************
*** 305,309 ****
}
else {
! *pvalue = PyString_FromStringAndSize(self->buffer + self->index,
len);
if (*pvalue == NULL) {
--- 313,317 ----
}
else {
! *pvalue = PyString_FromStringAndSize((char *)self->buffer + self->index,
len);
if (*pvalue == NULL) {
***************
*** 890,894 ****
#endif
}
! #ifdef MS_WIN32
rusage_diff = -1;
#else
--- 898,902 ----
#endif
}
! #if defined(MS_WIN32) || defined(macintosh)
rusage_diff = -1;
#else