From b819914263bdbd216189aac698016b6373984735 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 6 May 1997 15:23:24 +0000 Subject: Fix by Mark Hammond to enable truncate() on Windows. --- Objects/fileobject.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 #endif +#ifdef MS_WIN32 +#define ftruncate _chsize +#define fileno _fileno +#define HAVE_FTRUNCATE +#endif + #ifdef THINK_C #define HAVE_FOPENRF #endif -- cgit v0.12