diff Objects/fileobject.c @ 14741:c1de2c3e45ca legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Thu, 21 Sep 2000 22:15:29 +0000
parents 6f6f965c5e2d
children 25ddd3dc7a7a
line wrap: on
line diff
--- a/Objects/fileobject.c	Thu Sep 21 22:09:47 2000 +0000
+++ b/Objects/fileobject.c	Thu Sep 21 22:15:29 2000 +0000
@@ -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