[Python-checkins] python/dist/src/Modules posixmodule.c,2.268,2.269 timemodule.c,2.131,2.132
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Wed, 16 Oct 2002 13:28:27 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv31547/Modules
Modified Files:
posixmodule.c timemodule.c
Log Message:
Patch #623780: Replace obsolete struct macros.
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.268
retrieving revision 2.269
diff -C2 -d -r2.268 -r2.269
*** posixmodule.c 16 Oct 2002 18:27:38 -0000 2.268
--- posixmodule.c 16 Oct 2002 20:28:24 -0000 2.269
***************
*** 686,696 ****
{"st_mtime", "time of last modification"},
{"st_ctime", "time of last change"},
! #ifdef HAVE_ST_BLKSIZE
{"st_blksize", "blocksize for filesystem I/O"},
#endif
! #ifdef HAVE_ST_BLOCKS
{"st_blocks", "number of blocks allocated"},
#endif
! #ifdef HAVE_ST_RDEV
{"st_rdev", "device type (if inode device)"},
#endif
--- 686,696 ----
{"st_mtime", "time of last modification"},
{"st_ctime", "time of last change"},
! #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
{"st_blksize", "blocksize for filesystem I/O"},
#endif
! #ifdef HAVE_STRUCT_STAT_ST_BLOCKS
{"st_blocks", "number of blocks allocated"},
#endif
! #ifdef HAVE_STRUCT_STAT_ST_RDEV
{"st_rdev", "device type (if inode device)"},
#endif
***************
*** 698,702 ****
};
! #ifdef HAVE_ST_BLKSIZE
#define ST_BLKSIZE_IDX 13
#else
--- 698,702 ----
};
! #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
#define ST_BLKSIZE_IDX 13
#else
***************
*** 704,708 ****
#endif
! #ifdef HAVE_ST_BLOCKS
#define ST_BLOCKS_IDX (ST_BLKSIZE_IDX+1)
#else
--- 704,708 ----
#endif
! #ifdef HAVE_STRUCT_STAT_ST_BLOCKS
#define ST_BLOCKS_IDX (ST_BLKSIZE_IDX+1)
#else
***************
*** 710,714 ****
#endif
! #ifdef HAVE_ST_RDEV
#define ST_RDEV_IDX (ST_BLOCKS_IDX+1)
#else
--- 710,714 ----
#endif
! #ifdef HAVE_STRUCT_STAT_ST_RDEV
#define ST_RDEV_IDX (ST_BLOCKS_IDX+1)
#else
***************
*** 867,879 ****
fill_time(v, 9, st.st_ctime, cnsec);
! #ifdef HAVE_ST_BLKSIZE
PyStructSequence_SET_ITEM(v, ST_BLKSIZE_IDX,
PyInt_FromLong((long)st.st_blksize));
#endif
! #ifdef HAVE_ST_BLOCKS
PyStructSequence_SET_ITEM(v, ST_BLOCKS_IDX,
PyInt_FromLong((long)st.st_blocks));
#endif
! #ifdef HAVE_ST_RDEV
PyStructSequence_SET_ITEM(v, ST_RDEV_IDX,
PyInt_FromLong((long)st.st_rdev));
--- 867,879 ----
fill_time(v, 9, st.st_ctime, cnsec);
! #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
PyStructSequence_SET_ITEM(v, ST_BLKSIZE_IDX,
PyInt_FromLong((long)st.st_blksize));
#endif
! #ifdef HAVE_STRUCT_STAT_ST_BLOCKS
PyStructSequence_SET_ITEM(v, ST_BLOCKS_IDX,
PyInt_FromLong((long)st.st_blocks));
#endif
! #ifdef HAVE_STRUCT_STAT_ST_RDEV
PyStructSequence_SET_ITEM(v, ST_RDEV_IDX,
PyInt_FromLong((long)st.st_rdev));
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.131
retrieving revision 2.132
diff -C2 -d -r2.131 -r2.132
*** timemodule.c 2 Aug 2002 02:27:13 -0000 2.131
--- timemodule.c 16 Oct 2002 20:28:25 -0000 2.132
***************
*** 654,658 ****
Py_BuildValue("(zz)", tzname[0], tzname[1]));
#else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
! #ifdef HAVE_TM_ZONE
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
--- 654,658 ----
Py_BuildValue("(zz)", tzname[0], tzname[1]));
#else /* !HAVE_TZNAME || __GLIBC__ || __CYGWIN__*/
! #ifdef HAVE_STRUCT_TM_TM_ZONE
{
#define YEAR ((time_t)((365 * 24 + 6) * 3600))
***************
*** 703,707 ****
PyModule_AddObject(m, "tzname", Py_BuildValue("(zz)", "", ""));
#endif /* macintosh */
! #endif /* HAVE_TM_ZONE */
#ifdef __CYGWIN__
tzset();
--- 703,707 ----
PyModule_AddObject(m, "tzname", Py_BuildValue("(zz)", "", ""));
#endif /* macintosh */
! #endif /* HAVE_STRUCT_TM_TM_ZONE */
#ifdef __CYGWIN__
tzset();