From: Robin Barker Date: Mon, 23 Aug 1999 16:41:11 +0000 (+0100) Subject: Fix LFS with -Duseperlio in Solaris. Reported in X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dad163179db64c6c885f76d51ab9b4a3f48fe27b;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/perlio.c b/perlio.c index 7a5924a..4c22d3b 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