summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/ext/IO/IO.xs
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/ext/IO/IO.xs')
-rw-r--r--contrib/perl5/ext/IO/IO.xs15
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/perl5/ext/IO/IO.xs b/contrib/perl5/ext/IO/IO.xs
index 1b79cfd..38acf41 100644
--- a/contrib/perl5/ext/IO/IO.xs
+++ b/contrib/perl5/ext/IO/IO.xs
@@ -136,18 +136,23 @@ io_blocking(InputStream f, int block)
MODULE = IO PACKAGE = IO::Seekable PREFIX = f
-SV *
+void
fgetpos(handle)
InputStream handle
CODE:
if (handle) {
Fpos_t pos;
+ if (
#ifdef PerlIO
- PerlIO_getpos(handle, &pos);
+ PerlIO_getpos(handle, &pos)
#else
- fgetpos(handle, &pos);
+ fgetpos(handle, &pos)
#endif
- ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
+ ) {
+ ST(0) = &PL_sv_undef;
+ } else {
+ ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
+ }
}
else {
ST(0) = &PL_sv_undef;
@@ -176,7 +181,7 @@ fsetpos(handle, pos)
MODULE = IO PACKAGE = IO::File PREFIX = f
-SV *
+void
new_tmpfile(packname = "IO::File")
char * packname
PREINIT:
OpenPOWER on IntegriCloud