summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-09-07 03:11:03 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-09-07 03:11:03 +0000
commit8c86a92082b8351484629c697bc26f3f48bf767e (patch)
tree909b4f426d8c3c6028a23708cb84737bb00feb7b /perlio.c
parenta6e633defa583ad5174d1da95aa84b0c9dffe971 (diff)
downloadperl-8c86a92082b8351484629c697bc26f3f48bf767e.tar.gz
perl 5.003_05: perlio.c
Eliminate potential "signed vs. unsigned" warning Add PerlIO_reopen and PerlIO_cgetname functions.
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);