summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>1999-08-23 17:41:11 +0100
committerJarkko Hietaniemi <jhi@iki.fi>1999-09-04 15:28:11 +0000
commitdad163179db64c6c885f76d51ab9b4a3f48fe27b (patch)
treea1a2d6f8cf861a320b97c7093c11ab78d519a3f5 /perlio.c
parentea12c2aa2714a53b7f16f1990366373be0ed8933 (diff)
downloadperl-dad163179db64c6c885f76d51ab9b4a3f48fe27b.tar.gz
Fix LFS with -Duseperlio in Solaris. Reported in
To: perl5-porters@perl.org Subject: [ID 19990823.009] [PATCH perl5.005_61] typo in perl.h Message-Id: <199908231541.QAA10043@tempest.npl.co.uk> and later (in private email) found to be dependent on useperlio. Mental note: the cpp magic done in perlsdio.h (and assumedly also in perlsfio.h) may cause trouble later with lfs because both the perlio scheme by Perl and the lfs support by vendors like to play cpp games to map the stdio namespace back and forth. The problem fixed here (fseek vs fseeko, ftell vs ftello) may be just the beginning. p4raw-id: //depot/cfgperl@4071
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 7a5924aba3..4c22d3b3cf 100644
--- 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