From: Guido van Rossum Date: Thu, 21 Sep 2000 22:15:29 +0000 (+0000) Subject: Untested patch by Ty Sarna to make TELL64 work on older NetBSD systems. X-Git-Tag: v2.0b2~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a5e5830a7121b92d029c94feea0984b6aa1022f;p=thirdparty%2FPython%2Fcpython.git Untested patch by Ty Sarna to make TELL64 work on older NetBSD systems. According to Justin Pettit, this also works on OpenBSD, so I've added that symbol as well. --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index a5d2fcc837c5..88e60275dfaa 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -60,8 +60,12 @@ #endif /* define the appropriate 64-bit capable tell() function */ -#ifdef MS_WIN64 -# define TELL64 _telli64 +#if defined(MS_WIN64) +#define TELL64 _telli64 +#elif defined(__NetBSD__) || defined(__OpenBSD__) +/* NOTE: this is only used on older + NetBSD prior to f*o() funcions */ +#define TELL64(fd) lseek((fd),0,SEEK_CUR) #endif