[Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.189,2.190 timemodule.c,2.110,2.111
Tim Peters
tim_one@users.sourceforge.net
Mon, 14 May 2001 15:32:36 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv18878/python/dist/src/Modules
Modified Files:
posixmodule.c timemodule.c
Log Message:
SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.189
retrieving revision 2.190
diff -C2 -r2.189 -r2.190
*** posixmodule.c 2001/05/14 12:17:34 2.189
--- posixmodule.c 2001/05/14 22:32:33 2.190
***************
*** 64,73 ****
#define HAVE_EXECV 1
#define HAVE_GETCWD 1
- #define HAVE_GETEGID 1
- #define HAVE_GETEUID 1
- #define HAVE_GETGID 1
- #define HAVE_GETPPID 1
- #define HAVE_GETUID 1
- #define HAVE_KILL 1
#define HAVE_OPENDIR 1
#define HAVE_PIPE 1
--- 64,67 ----
***************
*** 153,157 ****
--- 147,155 ----
extern int rmdir(const char *);
#endif
+ #ifdef __BORLANDC__
+ extern int chmod(const char *, int);
+ #else
extern int chmod(const char *, mode_t);
+ #endif
extern int chown(const char *, uid_t, gid_t);
extern char *getcwd(char *, int);
***************
*** 5667,5681 ****
! #if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(__QNX__)
#define INITFUNC initnt
#define MODNAME "nt"
! #else
! #if defined(PYOS_OS2)
#define INITFUNC initos2
#define MODNAME "os2"
#else
#define INITFUNC initposix
#define MODNAME "posix"
- #endif
#endif
--- 5665,5679 ----
! #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__)
#define INITFUNC initnt
#define MODNAME "nt"
!
! #elif defined(PYOS_OS2)
#define INITFUNC initos2
#define MODNAME "os2"
+
#else
#define INITFUNC initposix
#define MODNAME "posix"
#endif
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.110
retrieving revision 2.111
diff -C2 -r2.110 -r2.111
*** timemodule.c 2001/04/10 22:07:07 2.110
--- timemodule.c 2001/05/14 22:32:33 2.111
***************
*** 42,50 ****
#ifdef MS_WINDOWS
#include <windows.h>
! #ifdef MS_WIN16
/* These overrides not needed for Win32 */
#define timezone _timezone
#define tzname _tzname
#define daylight _daylight
#define altzone _altzone
#endif /* MS_WIN16 */
--- 42,52 ----
#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 */
***************
*** 52,56 ****
#endif /* !__WATCOMC__ || __QNX__ */
! #if defined(MS_WIN32) && !defined(MS_WIN64)
/* Win32 has better clock replacement
XXX Win64 does not yet, but might when the platform matures. */
--- 54,58 ----
#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. */
***************
*** 147,151 ****
#endif /* HAVE_CLOCK */
! #if defined(MS_WIN32) && !defined(MS_WIN64)
/* Due to Mark Hammond */
static PyObject *
--- 149,153 ----
#endif /* HAVE_CLOCK */
! #if defined(MS_WIN32) && !defined(MS_WIN64) && !defined(__BORLANDC__)
/* Due to Mark Hammond */
static PyObject *