diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-09-07 03:11:03 +0000 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-09-07 03:11:03 +0000 |
commit | 8c86a92082b8351484629c697bc26f3f48bf767e (patch) | |
tree | 909b4f426d8c3c6028a23708cb84737bb00feb7b /perlio.c | |
parent | a6e633defa583ad5174d1da95aa84b0c9dffe971 (diff) | |
download | perl-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.c | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -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); |