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

[PATCH 5.5.660]VMS build patches

Thread Next
From:
Dan Sugalski
Date:
February 23, 2000 12:07
Subject:
[PATCH 5.5.660]VMS build patches
Message ID:
4.3.0.20000223151302.01efa560@24.8.96.48
The following patches are needed to get 5.5.660 building on VMS. It's still
got some test errors (openpid.t hangs the test harness, and some of the
other tests still fail) but at least it's mostly functional. (Possibly
completely functional, depending on what's wrong in the tests)

Hopefully this patch applies--I've been having some trouble with the
version of gnu diff on my system

In the "credit where credit's due" department, some of the subconfigure
changes (specifically the iconv stuff) are courtesy of Charles Lane.

--- configure.com;1	Fri Feb  4 06:33:01 2000
+++ configure.com	Wed Feb 23 14:02:48 2000
@@ -49,6 +49,7 @@
  $ use_debugmalloc = "N"
  $ d_secintgenv = "N"
  $ use_multiplicity = "N"
+$ cc_flags = ""
  $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
  $ max_allowed_dir_depth = 3  ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n]
  $! max_allowed_dir_depth = 2  ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n]
@@ -1152,12 +1153,12 @@
  $ WRITE CONFIG "}"
  $ CLOSE CONFIG
  $!
-$ DEFINE SYS$ERROR _NLA0:
-$ DEFINE SYS$OUTPUT _NLA0:
+$! DEFINE SYS$ERROR _NLA0:
+$! DEFINE SYS$OUTPUT _NLA0:
  $ cc/NoObj/list=ccvms.lis ccvms.c
  $ tmp = $status
-$ DEASSIGN SYS$OUTPUT
-$ DEASSIGN SYS$ERROR
+$! DEASSIGN SYS$OUTPUT
+$! DEASSIGN SYS$ERROR
  $ IF (silent) THEN GOSUB Shut_up
  $! echo "%Config-I-VMS, After cc compile $status = >''tmp'<" !diagnostic
  $!
@@ -1199,7 +1200,7 @@
  $     vms_cc_available = vms_cc_available + "cc/decc "
  $   ENDIF
  $ ELSE
-$   IF F$LOCATE("DEC",line).NE.F$LENGTH(line) 
+$   IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
  $   THEN 
  $     vms_cc_dflt = "/decc"
  $     vms_cc_available = vms_cc_available + "cc/decc "
@@ -1269,7 +1270,7 @@
  $ THEN
  $   ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
  $   Mcc = ans
-$   IF F$LOCATE("dec",ans).NE.F$LENGTH(ans)
+$   IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
  $   THEN
  $     Mcc = "cc/decc"
  $     Using_Dec_C = "Yes"
@@ -1283,7 +1284,7 @@
  $   ENDIF
  $   IF Mcc.NES.dflt
  $   THEN
-$     IF F$LOCATE("dec",dflt).NE.F$LENGTH(dflt) 
+$     IF (F$LOCATE("dec",dflt).NE.F$LENGTH(dflt)).or(F$LOCATE("compaq",dflt).NE.F$LENGTH(dflt))
  $     THEN 
  $       C_COMPILER_Replace = "CC=cc=''Mcc'"
  $     ELSE
@@ -1367,6 +1368,8 @@
  $!   DELETE/NOLOG/NOCONFIRM deccvers.*;
  $   echo "You are using Dec C ''line'"
  $   Dec_C_Version = line
+$   Dec_C_Version = Dec_C_Version + 0
+$   if Dec_C_Version.ge.60200000 THEN CC_FLAGS = CC_FLAGS + "/NOANSI_ALIAS"
  $ ENDIF
  $Vaxc_Invoke_check:
  $ IF "''Using_Vax_C'".EQS."Yes"

--- vms/subconfigure.com;1	Mon Feb 14 07:23:41 2000
+++ vms/subconfigure.com	Wed Feb 23 14:11:53 2000
@@ -37,19 +37,14 @@
  $ perl_extensions := "''extensions'"
  $ if f$length(Mcc) .eq. 0 then Mcc := "cc"
  $ MCC = f$edit(mcc, "UPCASE")
-$ IF Mcc.eqs."CC
-$ THEN
-$   C_Compiler_Replace := "CC="
-$ ELSE
-$   C_Compiler_Replace := "CC=CC=''Mcc'"
-$ ENDIF
+$ C_Compiler_Replace := "CC=CC=''Mcc'''CC_flags'"
  $ if "''Using_Dec_C'" .eqs. "Yes"
  $ THEN
  $   Checkcc := "''Mcc'/prefix=all"
  $ ELSE
  $   Checkcc := "''Mcc'"
  $ ENDIF
-$ cc_flags = ""
+$! cc_flags = ""
  $ if use_multiplicity .eqs. "Y"
  $ THEN
  $   perl_usemultiplicity = "define"
@@ -75,6 +70,7 @@
  $ perl_i_sysvfs = "undef"
  $ perl_i_ustat = "undef"
  $ perl_d_llseek="undef"
+$ perl_d_iconv="undef"
  $ perl_d_madvise="undef"
  $ perl_selectminbits=32
  $ perl_d_msync="undef"
@@ -1224,6 +1220,98 @@
  $   ENDIF
  $ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
  $!
+$! Check for sys/file.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/utsname.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_sysutsname="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_sysutsname="undef"
+$     ELSE
+$       perl_i_sysutsname="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_sysutsname is ''perl_i_sysutsname'"
+$!
+$! Check for syslog.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <syslog.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_syslog="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_syslog="undef"
+$     ELSE
+$       perl_i_syslog="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_syslog is ''perl_i_syslog'"
+$!
  $! Check for poll.h
  $!
  $ OS
@@ -1316,6 +1404,52 @@
  $   ENDIF
  $ WRITE_RESULT "i_sysuio is ''perl_i_sysuio'"
  $!
+$! Check for sys/mode.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/mode.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_sysmode="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_sysmode="undef"
+$     ELSE
+$       perl_i_sysmode="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_sysmode is ''perl_i_sysmode'"
+$!
  $! Check for sys/access.h
  $!
  $ OS
@@ -2035,7 +2169,60 @@
  $   ENDIF
  $ WRITE_RESULT "d_mkstemps is ''perl_d_mkstemps'"
  $!
-$! Check for mkstemp
+$! Check for iconv
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <iconv.h>
+$ WS "int main()
+$ WS "{"
+$ WS "  iconv_t cd;"
+$ WS "  char *inbuf, *outbuf;"
+$ WS "  size_t inleft, outleft;"
+$ WS "  iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_iconv="undef"
+$     perl_i_iconv="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$  THEN
+$       perl_d_iconv="undef"
+$       perl_i_iconv="undef"
+$     ELSE
+$       perl_d_iconv="define"
+$       perl_i_iconv="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_iconv is ''perl_d_iconv'"
+$ WRITE_RESULT "i_iconv is ''perl_i_iconv'"
+$!
+$! Check for mkdtemp
  $!
  $ OS
  $ WS "#ifdef __DECC
@@ -2990,6 +3177,7 @@
  $   perl_d_attribut="define"
  $   perl_vms_cc_type="gcc"
  $ ELSE
+$   perl_vms_cc_type="cc"
  $   perl_d_attribut="undef"
  $ ENDIF
  $
@@ -3774,6 +3962,9 @@
  $ WC "fflushall='undef'"
  $ WC "d_stdio_stream_array='undef'"
  $ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
+$ WC "i_syslog='" + perl_i_syslog + "'"
+$ WC "i_sysmode='" + perl_i_sysmode + "'"
+$ WC "i_sysutsname='" + perl_i_sysutsname + "'"
  $ WC "i_machcthreads='" + perl_i_machcthreads + "'"
  $ WC "i_pthread='" + perl_i_pthread + "'"
  $ WC "d_fstatvfs='" + perl_d_fstatvfs + "'"
@@ -3821,6 +4012,9 @@
  $ WC "sPRIo64='" + perl_sPRIo64 + "'"
  $ WC "sPRIx64='" + perl_sPRIx64 + "'"
  $ WC "d_llseek='" + perl_d_llseek + "'"
+$ WC "d_iconv='" + perl_d_iconv +"'"
+$ WC "i_iconv='" + perl_i_iconv +"'"
+$ WC "inc_version_list_init='""""'"
  $ WC "uselargefiles='" + perl_uselargefiles + "'"
  $ WC "uselongdouble='" + perl_uselongdouble + "'"
  $ WC "usemorebits='" + perl_usemorebits + "'"

--- vms/descrip_mms.template;1	Sun Feb 20 10:45:15 2000
+++ vms/descrip_mms.template	Wed Feb 23 12:45:15 2000
@@ -834,6 +834,10 @@
  	@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
  	@ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
  
+[.lib.pod]perlunicode.pod : [.pod]perlunicode.pod
+	@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+	@ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
  [.lib.pod]perlxs.pod : [.pod]perlxs.pod
  	@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
  	@ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)


## End of Patch ##

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


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