On Thu, 19 Apr 2001, Jarkko Hietaniemi wrote:
> On Fri, Apr 20, 2001 at 02:01:04AM +0100, Graham Barr wrote:
> > On Thu, Apr 19, 2001 at 07:52:03PM -0500, Jarkko Hietaniemi wrote:
> > > On Fri, Apr 20, 2001 at 01:44:50AM +0100, Graham Barr wrote:
> > > > It should not matter if you have not built the XS. The .pm files contain
> > > > pure perl fallbacks for that case, so they should still be tested.
> > >
> > > It's perfectly possible that I broke the fallback behaviour when I did
> > > the integration, I didn't test that much.
> >
> > Ah, yes. I guess the .pm's live in the ext directory. But if the extn is
> > not built they are not installed. So you won't have the pure pperl
>
> Well, for the 9762 snapshot I incidentally added the *::Util in VMS
> to the list of extensions to be attempted :-)
Darn. extension building is broken in 9718, 9742 and adding things to the
appropriate DCL variable will hurt not help (we are currently bumping
into a shell limitation on VMS). I have a patch, but it needs
further development. Hmmm I am seriously short of time, but here it is
with respect to 9742 ... (just expect more patching later)
Especial thanks to Charles Lane and Sebastion Bazley for their helpful
discussion on this patch. Note to Charles: this does not implement multi
line extensions=' assignment in config.sh but does conceal the problems
with the current length of extensions. Since were at 276 to 300
characters in the extensions symbol now we have a comfortable factor of 3
times more room for more extensions till we hit the 1024 limit.
Files affected:
configure.com
vms/descrip_mms.template
diff -ru perl.9742/configure.com perl/configure.com
--- perl.9742/configure.com Thu Apr 12 16:39:12 2001
+++ perl/configure.com Thu Apr 19 18:40:36 2001
@@ -589,26 +589,73 @@
$!: now set up to do reads with possible shell escape and default assignment !sfn
$ GOTO Beyond_myread
$!
+$! The sub_rp splitting is intended to handle long symbols such as the dflt for
+$! extensions.
+$!
$myread:
$ ans = ""
+$ len_rp = F$LENGTH(rp)
$ If (fastread)
$ Then
-$ echo4 "''rp'"
+$ IF len_rp .GT. 210
+$ THEN
+$ i_rp = 0
+$ fastread_rp_loop:
+$ sub_rp = F$EXTRACT(i_rp,80,rp)
+$ echo4 "''sub_rp'"
+$ i_rp = i_rp + 80
+$ IF i_rp .LT. len_rp THEN GOTO fastread_rp_loop
+$ ELSE
+$ echo4 "''rp'"
+$ ENDIF
$ Else
$ If (.NOT. silent) Then echo ""
-$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ IF len_rp .GT. 210
+$ THEN
+$ i_rp = 0
+$ firstread_rp_loop:
+$ sub_rp = F$EXTRACT(i_rp,80,rp)
+$ echo4 "''sub_rp'"
+$ i_rp = i_rp + 80
+$ IF i_rp .LT. len_rp THEN GOTO firstread_rp_loop
+$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
+$ ELSE
+$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ ENDIF
$ IF (ans .EQS. "&-d")
$ THEN
$ echo4 "(OK, I will run with -d after this question.)"
$ IF (.NOT. silent) THEN echo ""
-$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ IF len_rp .GT. 210
+$ THEN
+$ i_rp = 0
+$ secondread_rp_loop:
+$ sub_rp = F$EXTRACT(i_rp,80,rp)
+$ echo4 "''sub_rp'"
+$ i_rp = i_rp + 80
+$ IF i_rp .LT. len_rp THEN GOTO secondread_rp_loop
+$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
+$ ELSE
+$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ ENDIF
$ fastread := yes
$ ENDIF
$ IF (ans .EQS. "&-s")
$ THEN
$ echo4 "(OK, I will run with -s after this question.)"
$ echo ""
-$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ IF len_rp .GT. 210
+$ THEN
+$ i_rp = 0
+$ thirdread_rp_loop:
+$ sub_rp = F$EXTRACT(i_rp,80,rp)
+$ echo4 "''sub_rp'"
+$ i_rp = i_rp + 80
+$ IF i_rp .LT. len_rp THEN GOTO thirdread_rp_loop
+$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
+$ ELSE
+$ READ SYS$COMMAND/PROMPT="''rp'" ans
+$ ENDIF
$ silent := true
$ GOSUB Shut_up
$ ENDIF
@@ -2395,48 +2442,59 @@
$ echo "SDBM_File if you have the GDBM library built on your machine."
$ echo ""
$ echo "Which modules do you want to build into perl?"
-$! we need to add Byteloader to this list:
-$ dflt = "re Fcntl Encode Errno File::Glob Filter::Util::Call IO Opcode Devel::Peek
Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread
Sys::Hostname Digest::MD5 PerlIO::Scalar MIME::Base64 XS::Typemap Time::HiRes"
-$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
+$! Note that Socket may already be linked in alongside DynaLoader via
+$! a VMS unique way. Hence Socket need not be mentioned in the extensions dflt.
+$! We do need to add to this list:
+$! Byteloader, DB_File, and Sys::Syslog (conditionally and with porting).
+$! But note that the extensions symbol is already over 250 bytes!!!
+$ dflt = "B Cwd Data::Dumper Devel::DProf Devel::Peek "
+$ dflt = dflt + "Digest::MD5 Encode Errno Fcntl File::Glob Filter::Util::Call "
+$ dflt = dflt + "IO List::Util MIME::Base64 Opcode PerlIO::Scalar POSIX "
+$ dflt = dflt + "PerlIO::Via SDBM_File "
+$ dflt = dflt + "Storable Sys::Hostname Thread Time::HiRes VMS::DCLsym "
+$ dflt = dflt + "VMS::Stdio XS::Typemap attrs re"
+$!
+$! VAX C and GCC cannot handle POSIX
+$ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
$ THEN
-$ dflt = dflt + " POSIX"
+$ dflt = dflt - " POSIX"
$ ENDIF
$ rp = "[''dflt'] "
$ GOSUB myread
-$ if ans.eqs."" then ans = "''dflt'"
+$ if ans .eqs. "" then ans = "''dflt'"
$ a = ""
$ j = 0
$ xloop1:
-$ x = f$elem(j," ",ans)
+$ x = f$element(j," ",ans)
$ j = j + 1
$ if x .eqs. " " then goto exloop1
$ xloop2:
$ k = f$locate("::",x)
-$ if k .ge. f$len(x) then goto exloop2
-$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
+$ if k .ge. f$length(x) then goto exloop2
+$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$length(x)-2,x)
$ goto xloop2
$ exloop2:
$ a = a + " " + x
$ goto xloop1
$ exloop1:
-$ ans = f$edit(a,"trim")
+$ ans = F$EDIT(a,"TRIM,COMPRESS")
$!
$ a = ""
$ j = 0
$ xloop3:
-$ x = f$elem(j," ",dflt)
+$ x = f$element(j," ",dflt)
$ j = j + 1
$ if x .eqs. " " then goto exloop3
$ xloop4:
$ k = f$locate("::",x)
-$ if k .ge. f$len(x) then goto exloop4
-$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
+$ if k .ge. f$length(x) then goto exloop4
+$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$length(x)-2,x)
$ goto xloop4
$ exloop4:
$ a = a + " " + x
$ goto xloop3
$ exloop3:
-$ dflt = f$edit(a,"trim")
+$ dflt = f$edit(a,"TRIM,COMPRESS")
$!
$ extensions = "''ans'"
$ known_extensions = "''dflt'"
@@ -5212,13 +5270,23 @@
$ WC "dlsrc='dl_vms.c'"
$ WC "doublesize='" + doublesize + "'"
$ WC "drand01='" + drand01 + "'"
-$ WC "dynamic_ext='" + extensions + "'"
+$!
+$! The extensions symbol may be quite long
+$!
+$ tmp = "dynamic_ext='" + extensions + "'"
+$ WC/symbol tmp
+$ DELETE/SYMBOL tmp
$ WC "eagain=' '"
$ WC "ebcdic='undef'"
$ WC "embedmymalloc='" + mymalloc + "'"
$ WC "eunicefix=':'"
$ WC "exe_ext='" + exe_ext + "'"
-$ WC "extensions='" + extensions + "'"
+$!
+$! The extensions symbol may be quite long
+$!
+$ tmp = "extensions='" + extensions + "'"
+$ WC/symbol tmp
+$ DELETE/SYMBOL tmp
$ WC "fflushNULL='define'"
$ WC "fflushall='undef'"
$ WC "fpostype='fpos_t'"
@@ -5329,7 +5397,12 @@
$ WC "ivdformat='" + ivdformat + "'"
$ WC "ivsize='" + ivsize + "'"
$ WC "ivtype='" + ivtype + "'"
-$ WC "known_extensions='" + known_extensions + "'"
+$!
+$! The known_extensions symbol may be quite long
+$!
+$ tmp = "known_extensions='" + known_extensions + "'"
+$ WC/symbol tmp
+$ DELETE/SYMBOL tmp
$ WC "ld='" + ld + "'"
$ WC "lddlflags='/Share'"
$ WC "ldflags='" + ldflags + "'"
@@ -5658,6 +5731,7 @@
"''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
$! Clean up after ourselves
$ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
+$!
$ echo4 "Extracting make_ext.com (without variable substitutions)"
$ Create Sys$Disk:[-]make_ext.com
$ Deck/Dollar="$EndOfTpl$"
@@ -5666,17 +5740,31 @@
$! Any changes made to it directly will be lost. If you need to make any
$! changes, please edit the template in Configure.Com instead.
$ def = F$Environment("Default")
-$ exts1 = F$Edit(p1,"Compress")
-$ p2 = F$Edit(p2,"Upcase,Compress,Trim")
-$ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
-$ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
-$ makeutil = p3
-$ if f$type('p3') .nes. "" then makeutil = 'p3'
-$ targ = F$Edit(p4,"Lowercase")
+$! p1 - how to invoke miniperl (passed in from descrip.mms)
+$ p1 = F$Edit(p1,"Upcase,Compress,Trim")
+$ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1)
+$ miniperl = "$" + F$Search(F$Parse(p1,".Exe"))
+$! p2 - how to invoke local make utility (passed in from descrip.mms)
+$ makeutil = p2
+$ if f$type('p2') .nes. "" then makeutil = 'p2'
+$! p3 - make target (passed in from descrip.mms)
+$ targ = F$Edit(p3,"Lowercase")
+$ sts = 1
+$ extensions = ""
+$ open/read CONFIG config.sh
+$ find_ext_loop:
+$ read/end=end_ext_loop CONFIG line
+$ if (f$extract(0,12,line) .NES. "extensions='")
+$ then goto find_ext_loop
+$ else extensions = f$extract(12,f$length(line),line) - "'"
+$ endif
+$ end_ext_loop:
+$ close CONFIG
+$ extensions = f$edit(extensions,"TRIM,COMPRESS")
$ i = 0
$ next_ext:
-$ ext = F$Element(i," ",p1)
-$ If ext .eqs. " " Then Goto done
+$ ext = f$element(i," ",extensions)
+$ If ext .eqs. " " .or. ext .eqs. "" Then Goto done
$ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
$ miniperl
$ deck
@@ -5708,11 +5796,12 @@
$ If redesc Then -
miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]"
"INST_ARCHLIB=[''up'.lib]"
$ makeutil 'targ'
+$ sts = $severity ! POSIX $STATUS=%X10000001
+$ if sts .EQ. 0 .AND. ext .EQS. "re" then sts = 1
$ i = i + 1
$ Set Def &def
$ Goto next_ext
$ done:
-$ sts = $Status
$ Set Def &def
$ Exit sts
$!-- make_ext.com
diff -ru perl.9742/vms/descrip_mms.template perl/vms/descrip_mms.template
--- perl.9742/vms/descrip_mms.template Mon Mar 5 18:07:26 2001
+++ perl/vms/descrip_mms.template Thu Apr 19 18:40:55 2001
@@ -231,10 +231,6 @@
# life easier for those who modify Perl and rebuild it.
INSTPERL = perl
-# Space-separated list of "dynamic" extensions which should be built for
-# run-time dynamic loading.
-dynamic_ext = $extensions
-
# Space-separated list of "static" extensions to build into perlshr (case counts).
MYEXT = DynaLoader
# object files for these extensions; the trailing comma is required if
@@ -497,7 +493,7 @@
@ Rename/Log xsloader.pm [.ext.dynaloader]
dynext : $(LIBPREREQ) $(DBG)perlshr$(E)
- @make_ext "$(dynamic_ext)" "$(MINIPERL_EXE)" "$(MMS)"
+ @make_ext "$(MINIPERL_EXE)" "$(MMS)"
[.lib]vmsish.pm : [.vms.ext]vmsish.pm
Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
@@ -1255,7 +1251,7 @@
- If F$Search("[.lib.pod]*.com;-1").nes."" Then Purge/NoConfirm/Log
[.lib.pod]*.com
clean : tidy cleantest
- - @make_ext "$(dynamic_ext)" "$(MINIPERL_EXE)" "$(MMS)" clean
+ - @make_ext "$(MINIPERL_EXE)" "$(MMS)" clean
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log
*.Opt;*/Exclude=PerlShr_*.Opt
- If F$Search("[...]*$(O);*") .nes."" Then Delete/NoConfirm/Log [...]*$(O);*
- If F$Search(F$Parse("Sys$Disk:[]","$(SOCKH)")).nes."" Then
Delete/NoConfirm/Log $(SOCKH);*
@@ -1281,7 +1277,7 @@
- @extra_pods CLEAN
realclean : clean
- - @make_ext "$(dynamic_ext)" "$(MINIPERL_EXE)" "$(MMS)" realclean
+ - @make_ext "$(MINIPERL_EXE)" "$(MMS)" realclean
- If F$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
- If F$Search("Config.H").nes."" Then Delete/NoConfirm/Log Config.H;*
End of Patch (hopefully not too late)
Peter Prymmer