summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--iperlsys.h2
-rw-r--r--perlio.c10
2 files changed, 2 insertions, 10 deletions
diff --git a/iperlsys.h b/iperlsys.h
index 003405f690..9604ad46d6 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -315,7 +315,7 @@ struct IPerlStdIOInfo
#define PerlSIO_fputs(s,f) fputs(s,f)
#define PerlSIO_fflush(f) Fflush(f)
#define PerlSIO_fgets(s, n, f) fgets(s,n,f)
-#if defined(VMS) && defined(__DECC)
+#if defined(__VMS)
/* Unusual definition of ungetc() here to accommodate fast_sv_gets()'
* belief that it can mix getc/ungetc with reads from stdio buffer */
int decc$ungetc(int __c, FILE *__stream);
diff --git a/perlio.c b/perlio.c
index 90622c1e6e..d41c2f54e8 100644
--- a/perlio.c
+++ b/perlio.c
@@ -3624,20 +3624,12 @@ PerlIOStdio_fill(pTHX_ PerlIO *f)
}
#endif
-#if defined(VMS)
- /* An ungetc()d char is handled separately from the regular
- * buffer, so we stuff it in the buffer ourselves.
- * Should never get called as should hit code above
- */
- *(--((*stdio)->_ptr)) = (unsigned char) c;
- (*stdio)->_cnt++;
-#else
/* If buffer snoop scheme above fails fall back to
using ungetc().
*/
if (PerlSIO_ungetc(c, stdio) != c)
return EOF;
-#endif
+
return 0;
}