SF patch #462296: Add attributes to os.stat results; by Nick Mathewson.
This is a big one, touching lots of files. Some of the platforms
aren't tested yet. Briefly, this changes the return value of the
os/posix functions stat(), fstat(), statvfs(), fstatvfs(), and the
time functions localtime(), gmtime(), and strptime() from tuples into
pseudo-sequences. When accessed as a sequence, they behave exactly as
before. But they also have attributes like st_mtime or tm_year. The
stat return value, moreover, has a few platform-specific attributes
that are not available through the sequence interface (because
everybody expects the sequence to have a fixed length, these couldn't
be added there). If your platform's struct stat doesn't define
st_blksize, st_blocks or st_rdev, they won't be accessible from Python
either.
(Still missing is a documentation update.)
diff --git a/configure.in b/configure.in
index ed8698a..a578527 100644
--- a/configure.in
+++ b/configure.in
@@ -1534,6 +1534,9 @@
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
+AC_STRUCT_ST_RDEV
+AC_STRUCT_ST_BLKSIZE
+AC_STRUCT_ST_BLOCKS
AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,