summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-21 22:15:29 (GMT)
committerGuido van Rossum <guido@python.org>2000-09-21 22:15:29 (GMT)
commit1a5e5830a7121b92d029c94feea0984b6aa1022f (patch)
tree4b49570f5e4e98f6041e882aec6a88d4b76eba5a
parentd7bf974af4f5ddb2f1b0eee1c5bb8df5ceeb3d48 (diff)
downloadcpython-1a5e5830a7121b92d029c94feea0984b6aa1022f.zip
cpython-1a5e5830a7121b92d029c94feea0984b6aa1022f.tar.gz
cpython-1a5e5830a7121b92d029c94feea0984b6aa1022f.tar.bz2
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.
-rw-r--r--Objects/fileobject.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index a5d2fcc..88e6027 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