]> granicus.if.org Git - python/commitdiff
Untested patch by Ty Sarna to make TELL64 work on older NetBSD systems.
authorGuido van Rossum <guido@python.org>
Thu, 21 Sep 2000 22:15:29 +0000 (22:15 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 21 Sep 2000 22:15:29 +0000 (22:15 +0000)
According to Justin Pettit, this also works on OpenBSD, so I've added
that symbol as well.

Objects/fileobject.c

index a5d2fcc837c5b9f8b7060e3485c6aa4af6b65dde..88e60275dfaab21813769718e0e4b699a981da67 100644 (file)
 #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