summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Malmberg <wb8tyw@qsl.net>2021-07-26 08:09:02 -0500
committerJohn Malmberg <wb8tyw@qsl.net>2021-07-26 08:09:02 -0500
commit41658f8679967bd276973c3fe02f6d4db94975e3 (patch)
treee81c60572d37102f0850a192c82353b65ffc7290
parent93881c26428a4d07ee348c34b59f3b9586853535 (diff)
downloadgawk-41658f8679967bd276973c3fe02f6d4db94975e3.tar.gz
Add dynarray_resize to OpenVMS
-rw-r--r--vms/ChangeLog5
-rw-r--r--vms/descrip.mms34
-rw-r--r--vms/vmsbuild.com11
3 files changed, 40 insertions, 10 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 7d80c4bf..71045d01 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,8 @@
+2021-07-26 John E. Malmberg <wb8tyw@qsl.net>
+
+ * descrip.mms: Add dynarray_resize to build.
+ * vmsbuild.com: Add dynarray_resize to build.
+
2021-01-08 Arnold D. Robbins <arnold@skeeve.com>
* gawkmisc.vms (quote): Make const char *.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 59816898..462a1642 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -38,10 +38,11 @@
#
# location of various source files, relative to the 'main' directory
-SUPPORT = [.support]
-VMSDIR = [.vms]
-DOCDIR = [.doc]
-MISSNGD = [.missing_d]
+MALLOC = sys$disk:[.support.malloc]
+SUPPORT = sys$disk:[.support]
+VMSDIR = sys$disk:[.vms]
+DOCDIR = sys$disk:[.doc]
+MISSNGD = sys$disk:[.missing_d]
MAKEFILE = $(VMSDIR)Descrip.MMS
# debugging &c !'ccflags' is an escape to allow external compile flags
@@ -53,6 +54,11 @@ CDEFS = "GAWK","HAVE_CONFIG_H"
.ifdef GNUC
# assumes VAX
+# GCC has not been tested for decades.
+# GCC/VAX since OpenVMS 5.5 can use the AACRTL060 redistributable
+# kit instead of vaxcrtl.olb for much better results.
+# This will likely need a lot of changes if GCC is re-implemented
+# for OpenVMS.
CC = gcc
CFLAGS = /Incl=([],$(VMSDIR))/Obj=[]/Def=($(CDEFS)) $(CCFLAGS)
LIBS = gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library
@@ -64,6 +70,10 @@ LIBS = gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library
.else !!GNUC
.ifdef VAXC
# always VAX; versions of VAX C older than V3.2 won't work
+# VAXC SUPPORT will likely be removed in a future release
+# VAXC should not be used past OpenVMS/VAX 5.4
+# Before VAX 5.4 consider using GCC/VAX
+# Obviously this has also not been tested for decades
CC = cc
CFLAGS = /Incl=[]/Obj=[]/Opt=noInline/Def=($(CDEFS)) $(CCFLAGS)
LIBS = sys$share:vaxcrtl.exe/Shareable
@@ -76,7 +86,7 @@ CFLOAT = /float=ieee/ieee_mode=denorm_results
.endif
CNAME = /NAME=(AS_IS,SHORT)
CC = cc/DECC/Prefix=All/NESTED_INCLUDE=NONE$(CFLOAT)
-CINC1 = [],[.VMS],$(SUPPORT)
+CINC1 = sys$disk:[],sys$disk:[.VMS],$(SUPPORT)
CFLAGS = /Incl=($(CINC1))/Obj=[]/Def=($(CDEFS))$(CNAME) $(CCFLAGS)
CEFLAGS = /Incl=($(CINC1),[.missing_d],[.extension])$(CNAME) $(CCFLAGS)
LIBS = # DECC$SHR instead of VAXCRTL, no special link option needed
@@ -104,7 +114,7 @@ NOOP = continue
# object files
GAWKOBJ = eval.obj,profile.obj
AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,cint_array.obj,\
- command.obj,debug.obj,dfa.obj,ext.obj,field.obj,\
+ command.obj,debug.obj,dfa.obj,dynarrray_resize.obj,ext.obj,field.obj,\
floatcomp.obj,gawkapi.obj,gawkmisc.obj,getopt.obj,getopt1.obj
AWKOBJ2 = int_array.obj,io.obj,localeinfo.obj,main.obj,mpfr.obj,msg.obj,\
@@ -171,6 +181,11 @@ cint_array.obj : cint_array.c
command.obj : command.c cmd.h
debug.obj : debug.c cmd.h
dfa.obj : $(SUPPORT)dfa.c $(SUPPORT)dfa.h
+
+dynarrray_resize.obj : $(MALLOC)dynarray_resize.c $(MALLOC)dynarray.h
+ $define/user malloc $(MALLOC)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
ext.obj : ext.c
eval.obj : eval.c
field.obj : field.c
@@ -189,9 +204,14 @@ node.obj : node.c
profile.obj : profile.c
random.obj : $(SUPPORT)random.c $(SUPPORT)random.h
re.obj : re.c
+
regex.obj : $(SUPPORT)regex.c $(SUPPORT)regcomp.c \
$(SUPPORT)regex_internal.c $(SUPPORT)regexec.c \
- $(SUPPORT)regex.h $(SUPPORT)regex_internal.h
+ $(SUPPORT)regex.h $(SUPPORT)regex_internal.h \
+ $(MALLOC)dynarray.h
+ $define/user malloc $(MALLOC)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
str_array.obj : str_array.c
symbol.obj : symbol.c
version.obj : version.c
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index 9582c01c..30c15e90 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -19,7 +19,8 @@ $ then
$! assumes VAX
$ CC = "gcc"
$ if f$type(gcc).eqs."STRING" then CC = gcc
-$ CFLAGS = "/Incl=([],[.vms],[.SUPPORT])/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
+$ CFLAGS = "/Incl=([],[.vms],[.SUPPORT],[.SUPPORT.MALLOC])"
+$ CFLAGS = CFLAGS + "/Obj=[]/Def=(''CDEFS')''CCFLAGS'"
$ LIBS = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library"
$ if p2.eqs."DO_GNUC_SETUP" then set command gnu_cc:[000000]gcc
$ else !!GNUC
@@ -41,7 +42,7 @@ $ endif
$ CC = "cc/DECC/Prefix=All"
$ CNAME = "/NAME=(AS_IS,SHORT)
$ CINC = "/NESTED_INCLUDE=NONE"
-$ CINC1 = "[],[.vms],[.support]"
+$ CINC1 = "[],[.vms],[.support],[.support.malloc]"
$ CFLAGS = "/Incl=(''CINC1')/Obj=[]/Def=(''CDEFS')''CINC'''CCFLAGS'"
$ CFLAGS = CNAME + CFLOAT + CFLAGS
$ LIBS = "" ! DECC$SHR instead of VAXCRTL, no special link option needed
@@ -82,6 +83,8 @@ $ cc array.c
$ cc awkgram.c
$ cc builtin.c
$ cc [.support]dfa.c
+$ define/user malloc sys$disk:[.support.malloc]
+$ cc [.support.malloc]dynarray_resize.c
$ cc ext.c
$ cc field.c
$ cc floatcomp.c
@@ -95,6 +98,7 @@ $ cc msg.c
$ cc node.c
$ cc [.support]random.c
$ cc re.c
+$ define/user malloc sys$disk:[.support.malloc]
$ cc [.support]regex.c
$ cc replace.c
$ cc version.c
@@ -121,7 +125,8 @@ $!
$ close/noLog Fopt
$ create gawk.opt
! GAWK -- GNU awk
-array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
+array.obj,awkgram.obj,builtin.obj,dfa.obj,dynarray_resize.obj
+ext.obj,field.obj,floatcomp.obj
gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,localeinfo.obj
main.obj,msg.obj,node.obj
random.obj,re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj