This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
jpl tweak
[perl5.git] / perlio.c
index 5f9ed6b..4c22d3b 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -385,14 +385,22 @@ PerlIO_vprintf(PerlIO *f, const char *fmt, va_list ap)
 Off_t
 PerlIO_tell(PerlIO *f)
 {
+#if defined(USE_64_BIT_STDIO) && defined(HAS_FTELLO) && !defined(USE_FTELL64)
+ return ftello(f);
+#else
  return ftell(f);
+#endif
 }
 
 #undef PerlIO_seek
 int
 PerlIO_seek(PerlIO *f, Off_t offset, int whence)
 {
+#if defined(USE_64_BIT_STDIO) && defined(HAS_FSEEKO) && !defined(USE_FSEEK64)
+ return fseeko(f,offset,whence);
+#else
  return fseek(f,offset,whence);
+#endif
 }
 
 #undef PerlIO_rewind
@@ -486,7 +494,7 @@ PerlIO_setpos(PerlIO *f, const Fpos_t *pos)
 int
 PerlIO_setpos(PerlIO *f, const Fpos_t *pos)
 {
-#if defined(USE_64_BIT_STDIO) && defined(HAS_FSETPOS64)
+#if defined(USE_64_BIT_STDIO) && defined(USE_FSETPOS64)
  return fsetpos64(f, pos);
 #else
  return fsetpos(f, pos);
@@ -509,7 +517,7 @@ PerlIO_getpos(PerlIO *f, Fpos_t *pos)
 int
 PerlIO_getpos(PerlIO *f, Fpos_t *pos)
 {
-#if defined(USE_64_BIT_STDIO) && defined(HAS_FSETPOS64)
+#if defined(USE_64_BIT_STDIO) && defined(USE_FSETPOS64)
  return fgetpos64(f, pos);
 #else
  return fgetpos(f, pos);