summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
Diffstat (limited to 'x2p')
-rw-r--r--x2p/a2p.h3
-rw-r--r--x2p/find2perl.PL6
-rw-r--r--x2p/s2p.PL6
-rw-r--r--x2p/str.c12
4 files changed, 17 insertions, 10 deletions
diff --git a/x2p/a2p.h b/x2p/a2p.h
index a6dfd1d2ad..ffd731e75a 100644
--- a/x2p/a2p.h
+++ b/x2p/a2p.h
@@ -100,7 +100,8 @@
# endif
#else
# if defined(VMS)
-# include "../vmsish.h"
+# define NO_PERL_TYPEDEFS
+# include "[-]vmsish.h"
# endif
#endif
diff --git a/x2p/find2perl.PL b/x2p/find2perl.PL
index c024faf9fd..2ffc338075 100644
--- a/x2p/find2perl.PL
+++ b/x2p/find2perl.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/x2p/s2p.PL b/x2p/s2p.PL
index e5c5bd6f01..7564d51d99 100644
--- a/x2p/s2p.PL
+++ b/x2p/s2p.PL
@@ -12,10 +12,8 @@ use File::Basename qw(&basename &dirname);
# This forces PL files to create target in same directory as PL file.
# This is so that make depend always knows where to find PL derivatives.
-chdir(dirname($0));
-($file = basename($0)) =~ s/\.PL$//;
-$file =~ s/\.pl$//
- if ($^O eq 'VMS' or $^O eq 'os2'); # "case-forgiving"
+chdir dirname($0);
+$file = basename($0, '.PL');
open OUT,">$file" or die "Can't create $file: $!";
diff --git a/x2p/str.c b/x2p/str.c
index 953a811f50..45b40f7fb8 100644
--- a/x2p/str.c
+++ b/x2p/str.c
@@ -297,6 +297,16 @@ register FILE *fp;
int i;
int bpx;
+#if defined(VMS)
+ /* An ungetc()d char is handled separately from the regular
+ * buffer, so we getc() it back out and stuff it in the buffer.
+ */
+ i = getc(fp);
+ if (i == EOF) return Nullch;
+ *(--((*fp)->_ptr)) = (unsigned char) i;
+ (*fp)->_cnt++;
+#endif
+
cnt = FILE_cnt(fp); /* get count into register */
str->str_nok = 0; /* invalidate number */
str->str_pok = 1; /* validate pointer */
@@ -317,7 +327,7 @@ register FILE *fp;
FILE_cnt(fp) = cnt; /* deregisterize cnt and ptr */
FILE_ptr(fp) = ptr;
- i = FILE_filbuf(fp); /* get more characters */
+ i = getc(fp); /* get more characters */
cnt = FILE_cnt(fp);
ptr = FILE_ptr(fp); /* reregisterize cnt and ptr */