diff options
author | Guido van Rossum <guido@python.org> | 1997-05-06 15:23:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-06 15:23:24 (GMT) |
commit | b819914263bdbd216189aac698016b6373984735 (patch) | |
tree | d0c79b0237978c65ffa32823b8c255bd9d11a7b1 /Objects/fileobject.c | |
parent | fc49073cd05878bdaf8e67aa26df30e32dc4b187 (diff) | |
download | cpython-b819914263bdbd216189aac698016b6373984735.zip cpython-b819914263bdbd216189aac698016b6373984735.tar.gz cpython-b819914263bdbd216189aac698016b6373984735.tar.bz2 |
Fix by Mark Hammond to enable truncate() on Windows.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r-- | Objects/fileobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index a4b1d4b..1b32061 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -38,6 +38,12 @@ PERFORMANCE OF THIS SOFTWARE. #include <unistd.h> #endif +#ifdef MS_WIN32 +#define ftruncate _chsize +#define fileno _fileno +#define HAVE_FTRUNCATE +#endif + #ifdef THINK_C #define HAVE_FOPENRF #endif |