diff options
-rwxr-xr-x | t/lib/filehand.t | 3 | ||||
-rw-r--r-- | vms/Makefile | 49 | ||||
-rw-r--r-- | vms/config.vms | 18 | ||||
-rw-r--r-- | vms/descrip.mms | 41 | ||||
-rw-r--r-- | vms/gen_shrfls.pl | 6 | ||||
-rw-r--r-- | vms/genconfig.pl | 16 | ||||
-rw-r--r-- | vms/myconfig.com | 2 | ||||
-rw-r--r-- | vms/vms.c | 6 | ||||
-rw-r--r-- | vms/vmsish.h | 2 |
9 files changed, 112 insertions, 31 deletions
diff --git a/t/lib/filehand.t b/t/lib/filehand.t index 401801c7d7..8b27617568 100755 --- a/t/lib/filehand.t +++ b/t/lib/filehand.t @@ -4,7 +4,8 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; require Config; import Config; - if ($Config{'extensions'} !~ /\bFileHandle\b/) { + if ($Config{'extensions'} !~ /\bFileHandle\b/ + && $Config{'osname'} ne 'VMS') { print "1..0\n"; exit 0; } diff --git a/vms/Makefile b/vms/Makefile index 69738c7a03..3ef3416642 100644 --- a/vms/Makefile +++ b/vms/Makefile @@ -1,8 +1,8 @@ -#> This file produced from vms/descrip.mms by vms/mms2make.pl +#> This file produced from descrip.mms by mms2make.pl #> Lines beginning with "#>" were commented out during the -#> conversion process. For more information, see vms/mms2make.pl +#> conversion process. For more information, see mms2make.pl #> -# Descrip.MMS for perl5 on VMS +# Makefile for perl5 on VMS # Last revised 17-Jan-1995 by Charles Bailey bailey@genetics.upenn.edu # # @@ -11,7 +11,7 @@ # during build) files generated by executing this file, # but leave `installable' files (images, library) intact # realclean -- remove all files generated by executing this file -# cleansrc -- `realclean' + purge *.c,*.h,descrip.mms +# cleansrc -- `realclean' + purge *.c,*.h,Makefile # crtl.opt -- compiler-specific linker options file (made automatically) # @@ -35,6 +35,8 @@ ARCHCORE = [.lib.$(ARCH).CORE] ARCHAUTO = [.lib.$(ARCH).auto] + + # -fno-builtin avoids bug in gcc up to version 2.6.2 which can destroy # data when memcpy() is called on large (>64 kB) blocks of memory # (fixed in gcc 2.6.3) @@ -47,7 +49,9 @@ DBGSPECFLAGS = /Show=(Source,Include,Expansion) # off SYSNAM for the MM[SK] subprocess doesn't hurt anything, so we do it # just in case. .first: - @ If f$$TrnLnm("Sys").eqs."" Then Define/NoLog SYS sys$$Library + @ If f$$TrnLnm("Sys").eqs."" .and. f$$TrnLnm("VAXC$Include").eqs."" Then Define/NoLog SYS sys$$Library + @ If f$$TrnLnm("Sys").eqs."" .and. f$$TrnLnm("VAXC$Include").nes."" Then Define/NoLog SYS VAXC$Include + XTRACCFLAGS = /Include=[]/Object=$(O) XTRADEF = LIBS2 = sys$$Share:VAXCRTL/Shareable @@ -74,7 +78,7 @@ CFLAGS = /Define=(DEBUGGING$(SOCKDEF)$(XTRADEF))$(XTRACCFLAGS)$(DBGCCFLAGS) LINKFLAGS = $(DBGLINKFLAGS) MAKE = $(MMS) -MAKEFILE = [.VMS]Descrip.MMS # this file +MAKEFILE = [.VMS]Makefile # this file NOOP = continue # Macros to invoke a copy of miniperl during the build. Targets which @@ -151,7 +155,7 @@ all : base extras archcorefiles preplibrary perlpods @ $(NOOP) base : miniperl$(E) perl$(E) @ $(NOOP) -extras : Safe libmods utils podxform +extras : FileHandle Safe libmods utils podxform @ $(NOOP) libmods : [.lib]Config.pm [.lib.$(ARCH)]Config.pm [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm @ $(NOOP) @@ -226,21 +230,39 @@ $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $( Safe : [.lib]Safe.pm [.lib.auto]Safe$(E) @ $(NOOP) -[.lib]Safe.pm : [.ext.Safe]Descrip.MMS +[.lib]Safe.pm : [.ext.Safe]Makefile @ Set Default [.ext.Safe] $(MMS) @ Set Default [--] -[.lib.auto]Safe$(E) : [.ext.Safe]Descrip.MMS +[.lib.auto]Safe$(E) : [.ext.Safe]Makefile @ Set Default [.ext.Safe] $(MMS) @ Set Default [--] # Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir> # ${@} necessary to distract different versions of MM[SK]/make -[.ext.Safe]Descrip.MMS : [.ext.Safe]Makefile.PL [.lib.$(ARCH)]Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm perlshr$(E) +[.ext.Safe]Makefile : [.ext.Safe]Makefile.PL [.lib.$(ARCH)]Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm perlshr$(E) $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Safe]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" 2>_nla0: +FileHandle : [.lib]FileHandle.pm [.lib.auto]FileHandle$(E) + @ $(NOOP) + +[.lib]FileHandle.pm : [.ext.FileHandle]Makefile + @ Set Default [.ext.FileHandle] + $(MMS) + @ Set Default [--] + +[.lib.auto]FileHandle$(E) : [.ext.FileHandle]Makefile + @ Set Default [.ext.FileHandle] + $(MMS) + @ Set Default [--] + +# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir> +# ${@} necessary to distract different versions of MM[SK]/make +[.ext.FileHandle]Makefile : [.ext.FileHandle]Makefile.PL [.lib.$(ARCH)]Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm perlshr$(E) + $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.FileHandle]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" 2>_nla0: + [.lib.VMS]Filespec.pm : [.vms.ext]Filespec.pm @ If f$$Search("[.lib]VMS.Dir").eqs."" Then Create/Directory [.lib.VMS] Copy/Log/NoConfirm [.vms.ext]Filespec.pm $@ @@ -1223,6 +1245,7 @@ tidy : cleanlis - If f$$Search("[.Ext.DynaLoader]DL_VMS$(O);-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O) - If f$$Search("[.Ext.DynaLoader]DL_VMS.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C - If f$$Search("[.Ext.Safe...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.Safe] + - If f$$Search("[.Ext.FileHandle...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.FileHandle] - If f$$Search("[.VMS.Ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*.C - If f$$Search("[.VMS.Ext...]*$(O);-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*$(O) - If f$$Search("[.Lib.Auto...]*.al;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Auto...]*.al @@ -1257,6 +1280,9 @@ clean : tidy - If f$$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;* - If f$$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;* - If f$$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);* + Set Default [.ext.FileHandle] + - $(MMS) clean + Set Default [--] Set Default [.ext.Safe] - $(MMS) clean Set Default [--] @@ -1273,6 +1299,9 @@ realclean : clean - If f$$Search("[.lib.pod]*.pod").nes."" Then Delete/NoConfirm/Log [.lib.pod]*.pod;* - If f$$Search("[.lib.pod]perldoc.").nes."" Then Delete/NoConfirm/Log [.lib.pod]perldoc.;* - If f$$Search("[.lib.pod]pod2*.").nes."" Then Delete/NoConfirm/Log [.lib.pod]pod2*.;* + Set Default [.ext.FileHandle] + - $(MMS) realclean + Set Default [--] Set Default [.ext.Safe] - $(MMS) realclean Set Default [--] diff --git a/vms/config.vms b/vms/config.vms index cdf900a9cd..3927c24a0c 100644 --- a/vms/config.vms +++ b/vms/config.vms @@ -62,9 +62,9 @@ * program already searches PRIVLIB_EXP. */ #ifdef __ALPHA -#define ARCHLIB_EXP "/perl_root/lib/VMS_AXP" /* config-skip */ +#define ARCHLIB_EXP "/perl_root/lib/VMS_AXP/5_002" /* config-skip */ #else -#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX" /* config-skip */ +#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_002" /* config-skip */ #endif /* CPPSTDIN: @@ -1305,7 +1305,11 @@ * used in programs that are not prepared to deal with ~ expansion at * run-time. */ -#define OLDARCHLIB_EXP "/perl_root/lib" /**/ +#ifdef __ALPHA +#define OLDARCHLIB_EXP "/perl_root/lib/VMS_AXP" /* config-skip */ +#else +#define OLDARCHLIB_EXP "/perl_root/lib/VMS_VAX" /* config-skip */ +#endif /* PRIVLIB_EXP: * This symbol contains the name of the private library for this package. @@ -1319,13 +1323,17 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#undef SITELIB_EXP /**/ +#define SITELIB_EXP "/perl_root/lib/site_perl" /**/ /* SITEARCH_EXP: * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#undef SITEARCH_EXP /**/ +#ifdef __ALPHA +#define SITEARCH_EXP "/perl_root/lib/site_perl/VMS_AXP" /* config-skip */ +#else +#define SITEARCH_EXP "/perl_root/lib/site_perl/VMS_VAX" /* config-skip */ +#endif /* SCRIPTDIR: * This symbol holds the name of the directory in which the user wants diff --git a/vms/descrip.mms b/vms/descrip.mms index aac4841d64..d34245c8fc 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -68,6 +68,12 @@ ARCHCORE = [.lib.$(ARCH).CORE] ARCHAUTO = [.lib.$(ARCH).auto] +#: Backwards compatibility +.ifdef DECC_PIPES_BROKEN +PIPES_BROKEN = 1 +.endif + + #: >>>>>Compiler-specific options <<<<< .ifdef GNUC .first @@ -99,7 +105,9 @@ XTRACCFLAGS = /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=$(OBJVAL) XTRADEF = .else # VAXC .first - @ If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS Sys$Library + @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").eqs."" Then Define/NoLog SYS Sys$Library + @ If F$TrnLnm("Sys").eqs."" .and. F$TrnLnm("VAXC$Include").nes."" Then Define/NoLog SYS VAXC$Include + XTRACCFLAGS = /Include=[]/Object=$(O) XTRADEF = LIBS2 = Sys$Share:VAXCRTL/Shareable @@ -239,7 +247,7 @@ all : base extras archcorefiles preplibrary perlpods @ $(NOOP) base : miniperl$(E) perl$(E) @ $(NOOP) -extras : Safe libmods utils podxform +extras : FileHandle Safe libmods utils podxform @ $(NOOP) libmods : [.lib]Config.pm [.lib.$(ARCH)]Config.pm [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm @ $(NOOP) @@ -289,12 +297,12 @@ perlshr$(E) : $(DBG)libperl$(OLB) $(extobj) $(DBG)perlshr_xtras.ts # The following files are built in one go by gen_shrfls.pl: # perlshr_attr.opt, $(DBG)perlshr_bld.opt - VAX and AXP # perlshr_gbl*.mar, perlshr_gbl*$(O) - VAX only -.ifdef DECC_PIPES_BROKEN +.ifdef PIPES_BROKEN # This is a backup target used only with older versions of the DECCRTL which # can't deal with pipes properly. See ReadMe.VMS for details. $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(MINIPERL_EXE) $(MAKEFILE) $(CRTL) $(CC) $(CFLAGS)/NoObject/NoList/PreProcess=perl.i perl.h - $(MINIPERL) [.vms]gen_shrfls.pl "~~NOCC~~perl.i" "$(O)" "$(DBG)" "$(OLB)" "$(EXT)" "$(CRTL)" + $(MINIPERL) [.vms]gen_shrfls.pl "~~NOCC~~perl.i~~$(CC)$(CFLAGS)" "$(O)" "$(DBG)" "$(OLB)" "$(EXT)" "$(CRTL)" @ Delete/NoLog/NoConfirm perl.i; @ If F$Search("$(DBG)perlshr_xtras.ts").nes."" Then Delete/NoLog/NoConfirm $(DBG)perlshr_xtras.ts;* @ Copy NLA0: $(DBG)perlshr_xtras.ts @@ -341,6 +349,24 @@ Safe : [.lib]Safe.pm [.lib.auto]Safe$(E) [.ext.Safe]Descrip.MMS : [.ext.Safe]Makefile.PL [.lib.$(ARCH)]Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm perlshr$(E) $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Safe]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" 2>_nla0: +FileHandle : [.lib]FileHandle.pm [.lib.auto]FileHandle$(E) + @ $(NOOP) + +[.lib]FileHandle.pm : [.ext.FileHandle]Descrip.MMS + @ Set Default [.ext.FileHandle] + $(MMS) + @ Set Default [--] + +[.lib.auto]FileHandle$(E) : [.ext.FileHandle]Descrip.MMS + @ Set Default [.ext.FileHandle] + $(MMS) + @ Set Default [--] + +# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir> +# ${@} necessary to distract different versions of MM[SK]/make +[.ext.FileHandle]Descrip.MMS : [.ext.FileHandle]Makefile.PL [.lib.$(ARCH)]Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm perlshr$(E) + $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.FileHandle]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" 2>_nla0: + [.lib.VMS]Filespec.pm : [.vms.ext]Filespec.pm @ If F$Search("[.lib]VMS.Dir").eqs."" Then Create/Directory [.lib.VMS] Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET) @@ -1348,6 +1374,7 @@ tidy : cleanlis - If F$Search("[.Ext.DynaLoader]DL_VMS$(O);-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O) - If F$Search("[.Ext.DynaLoader]DL_VMS.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C - If F$Search("[.Ext.Safe...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.Safe] + - If F$Search("[.Ext.FileHandle...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.FileHandle] - If F$Search("[.VMS.Ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*.C - If F$Search("[.VMS.Ext...]*$(O);-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*$(O) - If F$Search("[.Lib.Auto...]*.al;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Auto...]*.al @@ -1382,6 +1409,9 @@ clean : tidy - If F$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;* - If F$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;* - If F$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);* + Set Default [.ext.FileHandle] + - $(MMS) clean + Set Default [--] Set Default [.ext.Safe] - $(MMS) clean Set Default [--] @@ -1398,6 +1428,9 @@ realclean : clean - If F$Search("[.lib.pod]*.pod").nes."" Then Delete/NoConfirm/Log [.lib.pod]*.pod;* - If F$Search("[.lib.pod]perldoc.").nes."" Then Delete/NoConfirm/Log [.lib.pod]perldoc.;* - If F$Search("[.lib.pod]pod2*.").nes."" Then Delete/NoConfirm/Log [.lib.pod]pod2*.;* + Set Default [.ext.FileHandle] + - $(MMS) realclean + Set Default [--] Set Default [.ext.Safe] - $(MMS) realclean Set Default [--] diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index e2f5b287e3..e39b7c2630 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -75,10 +75,10 @@ if ($docc) { else { die "$0: Can't find perl.h\n"; } } else { - ($ccvers,$cpp_file) = ($cc_cmd =~ /^~~(\w+)~~(.*)/); - $isgcc = $ccvers =~ /GCC/ + ($junk,$ccvers,$cpp_file,$cc_cmd) = split(/~~/,$cc_cmd,4); + $isgcc = $cc_cmd =~ /case_hack/i or 0; # for nice debug output - $isvaxc = (!$isgcc && $ccvers =~ /VAXC/) + $isvaxc = (!$isgcc && $cc_cmd !~ /standard=/i) or 0; # again, for nice debug output print "\$isgcc: \\$isgcc\\\n" if $debug; print "\$isvaxc: \\$isvaxc\\\n" if $debug; diff --git a/vms/genconfig.pl b/vms/genconfig.pl index a4721ba4b0..781a0b72a7 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -191,12 +191,19 @@ while (<DATA>) { print OUT "d_vms_do_sockets=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "d_has_sockets=",$dosock ? "'define'\n" : "'undef'\n"; $archlib = &VMS::Filespec::vmspath($privlib); -$archlib =~ s#\]#.VMS_$archsufx\]#; $installarchlib = &VMS::Filespec::vmspath($installprivlib); -$installarchlib =~ s#\]#.VMS_$archsufx\]#; +$sitearch = &VMS::Filespec::vmspath($sitelib); +$archlib =~ s#\]#.VMS_$archsufx\]#; +print OUT "oldarchlib='$archlib'\n"; +print OUT "oldarchlibexp='$archlib'\n"; +($vers = $]) =~ tr/./_/; +$archlib =~ s#\]#.$vers\]#; +$installarchlib =~ s#\]#.VMS_$archsufx.$vers\]#; print OUT "archlib='$archlib'\n"; print OUT "archlibexp='$archlib'\n"; print OUT "installarchlib='$installarchlib'\n"; +print OUT "sitearch='$sitearch'\n"; +print OUT "sitearchexp='$sitearch'\n"; if (open(OPT,"${outdir}crtl.opt")) { while (<OPT>) { @@ -254,8 +261,9 @@ signal_t=void timetype=long builddir=perl_root:[000000] prefix=perl_root -installprivlib=perl_root:[lib] -privlib=perl_root:[lib] +installprivlib=perl_root:[lib] # The *lib constants should match the +privlib=perl_root:[lib] # equivalent *(?:ARCH)LIB_EXP constants +sitelib=perl_root:[lib.site_perl] # in config.h installbin=perl_root:[000000] installman1dir=perl_root:[man.man1] installman3dir=perl_root:[man.man3] diff --git a/vms/myconfig.com b/vms/myconfig.com index b9f1bcd476..923fbc5a3d 100644 --- a/vms/myconfig.com +++ b/vms/myconfig.com @@ -2,7 +2,7 @@ $! #!/bin/sh ---> MYCONFIG.COM $! # This script is designed to provide a handy summary of the configuration $! # information being used to build perl. This is especially useful if you -$! # are requesting help from comp.lang.perl on usenet or via mail. +$! # are requesting help from comp.lang.perl.misc on usenet or via mail. $! DCL-ified by Peter Prymmer <pvhp@lns62.lns.cornell.edu> 22-DEC-1995 $! DCL usage (choose one): @@ -39,9 +39,9 @@ /* gcc's header files don't #define direct access macros * corresponding to VAXC's variant structs */ #ifdef __GNUC__ -# define uic$v_format uic$r_uic_form.uiv$v_format -# define uic$v_group uic$r_uic_form.uiv$v_group -# define uic$v_member uic$r_uic_form.uiv$v_member +# define uic$v_format uic$r_uic_form.uic$v_format +# define uic$v_group uic$r_uic_form.uic$v_group +# define uic$v_member uic$r_uic_form.uic$v_member # define prv$v_bypass prv$r_prvdef_bits0.prv$v_bypass # define prv$v_grpprv prv$r_prvdef_bits0.prv$v_grpprv # define prv$v_readall prv$r_prvdef_bits0.prv$v_readall diff --git a/vms/vmsish.h b/vms/vmsish.h index 6492773e88..55508b9f97 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -363,4 +363,6 @@ typedef char __VMS_SEPYTOTORP__; #undef HAS_NTOHL #endif +#define TMPPATH "sys$scratch:perl-eXXXXXX" + #endif /* __vmsish_h_included */ |