develooper Front page | perl.perl5.porters | Postings from December 2000

[PATCH: perl@8102] fixes for stdio build on VMS

Thread Next
From:
Peter Prymmer
Date:
December 15, 2000 11:01
Subject:
[PATCH: perl@8102] fixes for stdio build on VMS
Message ID:
Pine.OSF.4.10.10012151056060.144246-100000@aspara.forte.com

I find that the enclosed patch helps get a vanilla (ie "-Dusedevel"
"-des") build of perl@8102 going on VMS.  I note that on VMS we do
have PerlIO #defined but under a vanilla build we do not have
USE_PERLIO #defined hence this patch affects the 
s/#ifdef PerlIO/#define USE_PERLIO/ switch.  I would appreciate 
hearing from useperlio experts on the wisdom of the proposed switch.  (I
also noted that this patch does not seem to hurt a `sh Configure
-Dusedevel -des` build on Tru64 Unix 4.0D in case the question arises).
Setting the capability to have useperlio to "define" on VMS is a task that
remains unfinished at this time.

Note the tiny modifications to the VMS specific Makefile.PL files: that
answers the question that jhi had left behind in MM_VMS.pm I think.  I
noted that even with:

   next unless $self ne " " && defined $self->{$tmp};

that fails to catch the case where a Makefile.PL had:

   MAN3PODS => ' ',

Hence the enclosed change...

diff -ru perl.8102/ext/IO/IO.xs perl/ext/IO/IO.xs
--- perl.8102/ext/IO/IO.xs	Mon Dec 11 19:30:09 2000
+++ perl/ext/IO/IO.xs	Thu Dec 14 16:38:45 2000
@@ -17,12 +17,14 @@
 #  include <fcntl.h>
 #endif
 
-#ifdef PerlIO
+#ifdef USE_PERLIO
 typedef int SysRet;
 typedef PerlIO * InputStream;
 typedef PerlIO * OutputStream;
 #else
+#ifndef PERLIO_IS_STDIO
 #define PERLIO_IS_STDIO 1
+#endif
 typedef int SysRet;
 typedef FILE * InputStream;
 typedef FILE * OutputStream;
@@ -42,7 +44,7 @@
 }
 
 
-#ifndef PerlIO
+#ifndef USE_PERLIO
 #define PerlIO_fileno(f) fileno(f)
 #endif
 
@@ -140,8 +142,11 @@
 fgetpos(handle)
 	InputStream	handle
     CODE:
+#ifndef USE_PERLIO
+	Fpos_t pos;
+#endif
 	if (handle) {
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    ST(0) = sv_2mortal(newSV(0));
 	    if (PerlIO_getpos(handle, ST(0)) != 0) {
 		ST(0) = &PL_sv_undef;
@@ -165,7 +170,7 @@
 	SV *		pos
     CODE:
 	if (handle) {
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    RETVAL = PerlIO_setpos(handle, pos);
 #else
 	    char *p;
@@ -195,7 +200,7 @@
 	OutputStream fp;
 	GV *gv;
     CODE:
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	fp = PerlIO_tmpfile();
 #else
 	fp = tmpfile();
@@ -269,7 +274,7 @@
 	int		c
     CODE:
 	if (handle)
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    RETVAL = PerlIO_ungetc(handle, c);
 #else
 	    RETVAL = ungetc(c, handle);
@@ -286,7 +291,7 @@
 	InputStream	handle
     CODE:
 	if (handle)
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    RETVAL = PerlIO_error(handle);
 #else
 	    RETVAL = ferror(handle);
@@ -303,7 +308,7 @@
 	InputStream	handle
     CODE:
 	if (handle) {
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    PerlIO_clearerr(handle);
 #else
 	    clearerr(handle);
@@ -343,7 +348,7 @@
 	OutputStream	handle
     CODE:
 	if (handle)
-#ifdef PerlIO
+#ifdef USE_PERLIO
 	    RETVAL = PerlIO_flush(handle);
 #else
 	    RETVAL = Fflush(handle);
diff -ru perl.8102/vms/ext/DCLsym/Makefile.PL perl/vms/ext/DCLsym/Makefile.PL
--- perl.8102/vms/ext/DCLsym/Makefile.PL	Mon Dec 11 19:32:24 2000
+++ perl/vms/ext/DCLsym/Makefile.PL	Thu Dec 14 16:39:37 2000
@@ -1,4 +1,4 @@
 use ExtUtils::MakeMaker;
 
 WriteMakefile( 'VERSION_FROM' => 'DCLsym.pm',
-               'MAN3PODS'     => ' ');
+               'MAN3PODS'     => {});
diff -ru perl.8102/vms/ext/Stdio/Makefile.PL perl/vms/ext/Stdio/Makefile.PL
--- perl.8102/vms/ext/Stdio/Makefile.PL	Mon Dec 11 19:32:24 2000
+++ perl/vms/ext/Stdio/Makefile.PL	Thu Dec 14 16:39:56 2000
@@ -1,5 +1,5 @@
 use ExtUtils::MakeMaker;
 
 WriteMakefile( 'VERSION_FROM' => 'Stdio.pm',
-               'MAN3PODS'     => ' ', # pods will be built later
+               'MAN3PODS'     => {}, # pods will be built later
              );
End of Patch.

Peter Prymmer





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About