diff options
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ChangeLog | 8 | ||||
-rw-r--r-- | vms/gawk_plugin.opt | 5 | ||||
-rw-r--r-- | vms/generate_config_vms_h_gawk.com | 2 | ||||
-rw-r--r-- | vms/vax/ChangeLog | 7 | ||||
-rw-r--r-- | vms/vax/gawk_plugin_xfer.mar_exact | 13 | ||||
-rw-r--r-- | vms/vax/gawk_plugin_xfer.opt | 5 | ||||
-rw-r--r-- | vms/vax/macro32_exactcase.com | 16 | ||||
-rw-r--r-- | vms/vax/macro32_exactcase.patch | 11 | ||||
-rw-r--r-- | vms/vms_popen.c | 4 | ||||
-rw-r--r-- | vms/vmstest.com | 88 |
10 files changed, 155 insertions, 4 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog index 7e6c7311..ba017d64 100644 --- a/vms/ChangeLog +++ b/vms/ChangeLog @@ -1,7 +1,11 @@ 2013-12-29 John E. Malmberg <wb8tyw@qsl.net> - * descrip.mms: Build the dynamic extensions that will work. - Alpha and Itanium only. + * gawk_plugin.opt: New file. Needed to build plugins on IA64 + and ALPHA. + * generate_config_vms_h_gawk.com: Document which version + of VMS the mkstemp issue was seen. + * vms_popen: (pclose): Tolerate invalid file pointer. + * vmstest.com: Add tests for extensions ported to VMS. 2013-12-23 John E. Malmberg <wb8tyw@qsl.net> diff --git a/vms/gawk_plugin.opt b/vms/gawk_plugin.opt new file mode 100644 index 00000000..b0523d08 --- /dev/null +++ b/vms/gawk_plugin.opt @@ -0,0 +1,5 @@ +CASE_SENSITIVE=YES +SYMBOL_VECTOR=(plugin_is_GPL_compatible=DATA) +SYMBOL_VECTOR=(PLUGIN_IS_GPL_COMPATIBLE/plugin_is_GPL_compatible=DATA) +SYMBOL_VECTOR=(dl_load=PROCEDURE) +SYMBOL_VECTOR=(DL_LOAD/dl_load=PROCEDURE) diff --git a/vms/generate_config_vms_h_gawk.com b/vms/generate_config_vms_h_gawk.com index 03ad2015..3a02fdfe 100644 --- a/vms/generate_config_vms_h_gawk.com +++ b/vms/generate_config_vms_h_gawk.com @@ -135,7 +135,9 @@ $ write cvh "#pragma message disable (LONGDOUBLENYI)" $ write cvh "#endif" $! $! This stuff seems needed for VMS 7.3 and earlier, but not VMS 8.2+ +$! Need some more data as to which versions these issues are fixed in. $ write cvh "#if __VMS_VER <= 80200000" +$! mkstemp goes into an infinte loop in gawk in VAX/VMS 7.3 $ write cvh "#ifdef HAVE_MKSTEMP" $ write cvh "#undef HAVE_MKSTEMP" $ write cvh "#endif" diff --git a/vms/vax/ChangeLog b/vms/vax/ChangeLog new file mode 100644 index 00000000..526bc420 --- /dev/null +++ b/vms/vax/ChangeLog @@ -0,0 +1,7 @@ +2013-12-29 John Malmberg <wb8tyw@qsl.net> + + * ChangeLog: New directory. + * gawk_plugin_xfer.mar_exact, gawk_plugin_xfer.opt, + macro32_exactcase.com, macro32_exactcase.patch: + These are experimental files for future support of + dynamic extensions on VAX/VMS. diff --git a/vms/vax/gawk_plugin_xfer.mar_exact b/vms/vax/gawk_plugin_xfer.mar_exact new file mode 100644 index 00000000..e90babbd --- /dev/null +++ b/vms/vax/gawk_plugin_xfer.mar_exact @@ -0,0 +1,13 @@ + .PSECT GAWK_PLUGIN_XFERVECTORS - + PIC,USR,CON,REL,GBL,SHR,EXE,RD,NOWRT,QUAD + +; Exact case transfer vector and universal symbols +; + .ALIGN QUAD + .EXTERNAL plugin_is_GPL_compatible + + .TRANSFER dl_load + .MASK dl_load + JMP L^dl_load+2 + + .END diff --git a/vms/vax/gawk_plugin_xfer.opt b/vms/vax/gawk_plugin_xfer.opt new file mode 100644 index 00000000..75c134f7 --- /dev/null +++ b/vms/vax/gawk_plugin_xfer.opt @@ -0,0 +1,5 @@ +CASE_SENSITIVE=YES +UNIVERSAL=plugin_is_GPL_compatible +UNIVERSAL=dl_load +!CLUSTER=GAWK_PLUGIN_XFER +!COLLECT=GAWK_GLOBAL, GAWK_PLUGIN_XFERVECTORS diff --git a/vms/vax/macro32_exactcase.com b/vms/vax/macro32_exactcase.com new file mode 100644 index 00000000..79194e21 --- /dev/null +++ b/vms/vax/macro32_exactcase.com @@ -0,0 +1,16 @@ +$! +$! Patch the Macro32 compiler and optional assemble +$!----------------------------------------------------- +$ patched_macro = "sys$disk:[]macro32_exactcase.exe" +$ if f$search(patched_macro) .eqs. "" +$ then +$ copy sys$system:macro32.exe 'patched_macro' +$ patch @[.vms]macro32_exactcase.patch +$ endif +$! Usage: +$ xfer_file_source = p1 +$ if f$search(p1) .nes. "" +$ then +$ define/user macro32 'patched_macro' +$ macro/lis 'p1' +$ endif diff --git a/vms/vax/macro32_exactcase.patch b/vms/vax/macro32_exactcase.patch new file mode 100644 index 00000000..eda5cac7 --- /dev/null +++ b/vms/vax/macro32_exactcase.patch @@ -0,0 +1,11 @@ +macro32_exactcase.exe +SE EC +^X00000001 +RE /I +^X00012B1D +'BICB2 #^X00000020,R3' +EXIT +'BICB2 #^X00000000,R3' +EXI +U +EXI diff --git a/vms/vms_popen.c b/vms/vms_popen.c index 6c5c5086..d9568119 100644 --- a/vms/vms_popen.c +++ b/vms/vms_popen.c @@ -133,8 +133,8 @@ pclose( FILE *current ) int rval, cur = fileno(current); /* assert( cur >= 0 && cur < pipes_lim ); */ - if (pipes[cur].pmode == unopened) - return -1; /* should never happen */ + if ((cur < 0) || (pipes[cur].pmode == unopened)) + return -1; /* should never happen, but does with two-way */ rval = fclose(current); /* close temp file; if reading, we're done */ if (pipes[cur].pmode == writing) { diff --git a/vms/vmstest.com b/vms/vmstest.com index 75a6b460..f5c815bc 100644 --- a/vms/vmstest.com +++ b/vms/vmstest.com @@ -25,6 +25,7 @@ $ rm = "delete/noConfirm/noLog" $ mv = "rename/New_Vers" $ gawk = "$sys$disk:[-]gawk" $ AWKPATH_srcdir = "define/User AWKPATH sys$disk:[]" +$ AWKLIBPATH_dir = "define/User AWKLIBPATH sys$disk:[-]" $ $ listdepth = 0 $ pipeok = 0 @@ -159,6 +160,13 @@ $ type sys$input: $ list = "inetechu inetecht inetdayu inetdayt" $ gosub list_of_tests $ return +$! +$extension: echo "extension...." +$ list = "inplace1 filefuncs fnmatch fts functab4 ordchr" - + + " readdir revout revtwoway rwarray time" + gosub list_of_tests + return + $ $! list_of_tests: process 'list', a space-separated list of tests. $! Some tests assign their own 'list' and call us recursively, @@ -1805,6 +1813,86 @@ $ if $status then rm _vms_io2.tmp; $ cmp vms_io2.ok sys$disk:[]_vms_io2.vfc $ if $status then rm _vms_io2.vfc;* $ return +$! +$! +$inplace1: +$ set process/parse=extended ! ODS-5 only +$ echo "''test'" +$ filefunc_file = "[-]gawkapi.o" +$ open/write awkfile _'test'.awk +$ write awkfile "@load ""inplace""" +$! write awkfile "BEGIN {print ""before""}" +$ write awkfile " {gsub(/foo/, ""bar""); print}" +$! write awkfile "END {print ""after""}" +$ close awkfile +$ copy inplace^.1.in _'test'.1 +$ copy inplace^.2.in _'test'.2 +$ set noOn +$ AWKLIBPATH_dir +$ gawk -f _'test'.awk _'test'.1 <inplace.in >_'test'.1.tmp 2>&1 +$ if .not. $status then call exit_code '$status' _'test'.1.tmp +$ AWKLIBPATH_dir +$ gawk -f _'test'.awk _'test'.2 <inplace.in >_'test'.2.tmp 2>&1 +$ if .not. $status then call exit_code '$status' _'test'.2.tmp +$ set On +$ cmp 'test'.1.ok sys$disk:[]_'test'.1.tmp +$ if $status then rm _'test'.1.tmp;,_'test'.1; +$ cmp 'test'.2.ok sys$disk:[]_'test'.2.tmp +$ if $status then rm _'test'.2.tmp;,_'test'.2;,_'test'.awk; +$ return +$! +$filefuncs: +$fnmatch: +$functab4: +$ordchr: +$revout: +$revtwoway: +$time: +$ echo "''test'" +$ filefunc_file = "[-]gawkapi.o" +$ open/write gapi 'filefunc_file' +$ close gapi +$ set noOn +$ AWKLIBPATH_dir +$ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 +$ if .not. $status then call exit_code '$status' _'test'.tmp +$ set On +$ cmp 'test'.ok sys$disk:[]_'test'.tmp +$ if $status then rm _'test'.tmp; +$ if f$search(filefunc_file) .nes. "" then rm 'filefunc_file'; +$ return +$! +$rwarray: +$ echo "''test'" +$ set noOn +$ AWKLIBPATH_dir +$ gawk -f 'test'.awk 'test'.in >_'test'.tmp 2>&1 +$ if .not. $status then call exit_code '$status' _'test'.tmp +$ set On +$ cmp orig.out new.out +$ if $status +$ then +$ open/append tout _'test'.tmp +$ write tout "old and new are equal - GOOD" +$ close tout +$ endif +$ cmp 'test'.ok sys$disk:[]_'test'.tmp +$ if $status then rm _'test'.tmp;,orig.out;,new.out; +$ return +$! +$readdir: +$fts: +$ echo "''test'" +$ set noOn +$ AWKLIBPATH_dir +$ gawk -f 'test'.awk >_'test'.tmp 2>&1 +$ if .not. $status +$ then +$ call exit_code '$status' _'test'.tmp +$ write sys$output _'test'.tmp +$ endif +$ set On +$ return $ $clean: $ if f$search("_*.*") .nes."" then rm _*.tmp;* |