2 #define PERLIO_NOT_STDIO 1
15 typedef PerlIO * InputStream;
16 typedef PerlIO * OutputStream;
18 #define PERLIO_IS_STDIO 1
20 typedef FILE * InputStream;
21 typedef FILE * OutputStream;
28 croak("%s not implemented on this architecture", s);
39 if (strEQ(name, "_IOFBF"))
41 { *pval = _IOFBF; return TRUE; }
45 if (strEQ(name, "_IOLBF"))
47 { *pval = _IOLBF; return TRUE; }
51 if (strEQ(name, "_IONBF"))
53 { *pval = _IONBF; return TRUE; }
59 if (strEQ(name, "SEEK_SET"))
61 { *pval = SEEK_SET; return TRUE; }
65 if (strEQ(name, "SEEK_CUR"))
67 { *pval = SEEK_CUR; return TRUE; }
71 if (strEQ(name, "SEEK_END"))
73 { *pval = SEEK_END; return TRUE; }
84 MODULE = IO PACKAGE = IO::Seekable PREFIX = f
93 PerlIO_getpos(handle, &pos);
95 fgetpos(handle, &pos);
97 ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
111 RETVAL = PerlIO_setpos(handle, (Fpos_t*)SvPVX(pos));
113 RETVAL = fsetpos(handle, (Fpos_t*)SvPVX(pos));
122 MODULE = IO PACKAGE = IO::File PREFIX = f
125 new_tmpfile(packname = "IO::File")
129 RETVAL = PerlIO_tmpfile();
136 MODULE = IO PACKAGE = IO::Handle PREFIX = f
143 if (constant(name, &i))
144 ST(0) = sv_2mortal(newSViv(i));
155 RETVAL = PerlIO_ungetc(handle, c);
157 RETVAL = ungetc(c, handle);
172 RETVAL = PerlIO_error(handle);
174 RETVAL = ferror(handle);
189 PerlIO_clearerr(handle);
209 IoFLAGS(io) |= IOf_UNTAINT;
225 RETVAL = PerlIO_flush(handle);
227 RETVAL = Fflush(handle);
239 char * buf = SvPOK(ST(1)) ? sv_grow(ST(1), BUFSIZ) : 0;
242 #ifdef PERLIO_IS_STDIO
245 not_here("IO::Handle::setbuf");
249 setvbuf(handle, buf, type, size)
251 char * buf = SvPOK(ST(1)) ? sv_grow(ST(1), SvIV(ST(3))) : 0;
255 #ifdef PERLIO_IS_STDIO
256 #ifdef _IOFBF /* Should be HAS_SETVBUF once Configure tests for that */
258 RETVAL = setvbuf(handle, buf, type, size);
264 RETVAL = (SysRet) not_here("IO::Handle::setvbuf");
267 not_here("IO::Handle::setvbuf");