From: Guido van Rossum Date: Tue, 6 May 1997 15:23:24 +0000 (+0000) Subject: Fix by Mark Hammond to enable truncate() on Windows. X-Git-Tag: v1.5a1~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b819914263bdbd216189aac698016b6373984735;p=thirdparty%2FPython%2Fcpython.git Fix by Mark Hammond to enable truncate() on Windows. --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index a4b1d4baa6ed..1b3206134bd7 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