summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 9c74dd047b..b9a3a22174 100644
--- a/perlio.c
+++ b/perlio.c
@@ -272,6 +272,16 @@ const char *mode;
return fdopen(fd,mode);
}
+#undef PerlIO_reopen
+PerlIO *
+PerlIO_reopen(fd,mode)
+char *name;
+char *mode;
+PerlIO *f;
+const char *mode;
+{
+ return freopen(name,mode,f);
+}
#undef PerlIO_close
int
@@ -289,6 +299,19 @@ PerlIO *f;
return feof(f);
}
+#undef PerlIO_getname
+char *
+PerlIO_getname(f,buf)
+PerlIO *f;
+char *buf;
+{
+#ifdef VMS
+ return fgetname(f,buf);
+#else
+ croak("Don't know how to get file name");
+#endif
+}
+
#undef PerlIO_getc
int
PerlIO_getc(f)
@@ -584,7 +607,7 @@ va_list ap;
int val = vsprintf(s, fmt, ap);
if (n >= 0)
{
- if (strlen(s) >= n)
+ if (strlen(s) >= (STRLEN)n)
{
PerlIO_puts(PerlIO_stderr(),"panic: sprintf overflow - memory corrupted!\n");
my_exit(1);