diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-08-29 10:27:29 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-08-29 10:27:29 +0000 |
commit | c411622ed1115558a052ffa629b6bd710abfef5c (patch) | |
tree | 668056310b0be1571ce0c2d227c46d4e410590a6 /perlio.c | |
parent | 5ae7bdf7abb6651ff52ed1bd203856fc5886c039 (diff) | |
download | perl-c411622ed1115558a052ffa629b6bd710abfef5c.tar.gz |
perl 5.003_04: perlio.c
Removes an incorrect prototype for setlinebuf from
perlio.c because it conflicts with the correct declaration in
MachTen's stdio.h (and possibly other stdio's as well).
Secondly, the code in perlio.c is not handling the (!PERLIO_IS_STDIO &
HAS_F[GS]ETPOS) case. The patch fixes this omission (in a rather lumpen
manner). I don't think this should affect platforms which try to hack a
different path through the #ifdef forest, but this assertion would benefit
from testing...
Dominic Dunlop
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -103,10 +103,6 @@ PerlIO_stdout() return (PerlIO *) stdout; } -#ifdef HAS_SETLINEBUF -extern void setlinebuf _((FILE *iop)); -#endif - #undef PerlIO_fast_gets int PerlIO_fast_gets(f) @@ -528,6 +524,17 @@ const Fpos_t *pos; { return PerlIO_seek(f,*pos,0); } +#else +#ifndef PERLIO_IS_STDIO +#undef PerlIO_setpos +int +PerlIO_setpos(f,pos) +PerlIO *f; +const Fpos_t *pos; +{ + return fsetpos(f, pos); +} +#endif #endif #ifndef HAS_FGETPOS @@ -540,6 +547,17 @@ Fpos_t *pos; *pos = PerlIO_tell(f); return 0; } +#else +#ifndef PERLIO_IS_STDIO +#undef PerlIO_getpos +int +PerlIO_getpos(f,pos) +PerlIO *f; +Fpos_t *pos; +{ + return fgetpos(f, pos); +} +#endif #endif #if (defined(PERLIO_IS_STDIO) || !defined(USE_SFIO)) && !defined(HAS_VPRINTF) |