summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/perlsdio.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-04-29 22:53:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-04-29 22:53:00 +0000
commitc25c5c3c87d89b68324dc98b7c8aaabc750c7cec (patch)
tree2943af9b1f84d88d863a9ba36a234877561bf5f0 /gnu/usr.bin/perl/perlsdio.h
parent37583d269f066aa8aa04ea18126b188d12257e6d (diff)
perl5.005_03 (stock)
Diffstat (limited to 'gnu/usr.bin/perl/perlsdio.h')
-rw-r--r--gnu/usr.bin/perl/perlsdio.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/usr.bin/perl/perlsdio.h b/gnu/usr.bin/perl/perlsdio.h
index 5a15a719ca7..efc52e1cd42 100644
--- a/gnu/usr.bin/perl/perlsdio.h
+++ b/gnu/usr.bin/perl/perlsdio.h
@@ -55,7 +55,12 @@
#define PerlIO_clearerr(f) clearerr(f)
#define PerlIO_flush(f) Fflush(f)
#define PerlIO_tell(f) ftell(f)
-#define PerlIO_seek(f,o,w) fseek(f,o,w)
+#if defined(VMS) && !defined(__DECC)
+ /* Old VAXC RTL doesn't reset EOF on seek; Perl folk seem to expect this */
+# define PerlIO_seek(f,o,w) (((f) && (*f) && ((*f)->_flag &= ~_IOEOF)),fseek(f,o,w))
+#else
+# define PerlIO_seek(f,o,w) fseek(f,o,w)
+#endif
#ifdef HAS_FGETPOS
#define PerlIO_getpos(f,p) fgetpos(f,p)
#endif
@@ -232,7 +237,9 @@
#undef fopen
#undef vfprintf
#undef fgetc
+#undef getc_unlocked
#undef fputc
+#undef putc_unlocked
#undef fputs
#undef ungetc
#undef fread
@@ -265,8 +272,14 @@
#define fputc(c,f) PerlIO_putc(f,c)
#define fputs(s,f) PerlIO_puts(f,s)
#define getc(f) PerlIO_getc(f)
+#ifdef getc_unlocked
+#undef getc_unlocked
+#endif
#define getc_unlocked(f) PerlIO_getc(f)
#define putc(c,f) PerlIO_putc(f,c)
+#ifdef putc_unlocked
+#undef putc_unlocked
+#endif
#define putc_unlocked(c,f) PerlIO_putc(c,f)
#define ungetc(c,f) PerlIO_ungetc(f,c)
#if 0