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
return (PerlIO *) stdout;
}
-#ifdef HAS_SETLINEBUF
-extern void setlinebuf _((FILE *iop));
-#endif
-
#undef PerlIO_fast_gets
int
PerlIO_fast_gets(f)
{
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
*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)