aboutsummaryrefslogtreecommitdiffstats
path: root/vms
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:27:41 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:27:41 +0300
commit61bb57af53ebe916d2db6e3585d4fc7ac1d99b92 (patch)
tree2bfc4e5b127618d286f57a87d416702131b1b01d /vms
parent0a9ae0c89481db540e1b817a63cc6c793a62c90d (diff)
downloadegawk-61bb57af53ebe916d2db6e3585d4fc7ac1d99b92.tar.gz
egawk-61bb57af53ebe916d2db6e3585d4fc7ac1d99b92.tar.bz2
egawk-61bb57af53ebe916d2db6e3585d4fc7ac1d99b92.zip
Move to gawk-2.15.3.
Diffstat (limited to 'vms')
-rw-r--r--vms/descrip.mms11
-rw-r--r--vms/vms_gawk.c16
-rw-r--r--vms/vms_misc.c20
-rw-r--r--vms/vmsbuild.com14
4 files changed, 36 insertions, 25 deletions
diff --git a/vms/descrip.mms b/vms/descrip.mms
index e22df05e..679dd17e 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -40,8 +40,8 @@ MAKEFILE = $(VMSDIR)Descrip.MMS
# work within the main directory, even when handling files in [.vms]
# note: use 2nd variant for either VAX C V2.x or for GNU C
-CFLAGS = /Include=[]/Object=[]/Opt=noInline/Define="GAWK" $(CCFLAGS)
-#CFLAGS = /Include=([],$(VMSDIR))/Object=[]/Define="GAWK" $(CCFLAGS)
+CFLAGS = /Include=[]/Object=[]/Opt=noInline/Define=("GAWK","HAVE_CONFIG_H") $(CCFLAGS)
+#CFLAGS = /Include=([],$(VMSDIR))/Object=[]/Define=("GAWK","HAVE_CONFIG_H") $(CCFLAGS)
# uncomment this for GNU C
#CC = gcc
@@ -85,7 +85,8 @@ ALLOCA = alloca.obj
# object files
AWKOBJS = main.obj,eval.obj,builtin.obj,msg.obj,iop.obj,io.obj,\
- field.obj,array.obj,node.obj,version.obj,missing.obj,re.obj,getopt.obj
+ field.obj,array.obj,node.obj,version.obj,missing.obj,re.obj,\
+ getopt.obj,getopt1.obj
ALLOBJS = $(AWKOBJS),awktab.obj
@@ -107,8 +108,8 @@ VMSOTHR = $(VMSDIR)Descrip.MMS,$(VMSDIR)vmsbuild.com,$(VMSDIR)version.com,\
$(VMSDIR)gawk.hlp
# Release of gawk
-REL=2.14
-PATCHLVL=0
+REL=2.15
+PATCHLVL=3
# dummy target to allow building "gawk" in addition to explicit "gawk.exe"
gawk : gawk.exe
diff --git a/vms/vms_gawk.c b/vms/vms_gawk.c
index 552139bd..0d826a49 100644
--- a/vms/vms_gawk.c
+++ b/vms/vms_gawk.c
@@ -49,9 +49,9 @@ static int vms_usage(int);
#define ARG_SIZ 250
union arg_w_prefix { /* structure used to simplify prepending of "-" */
- char value[3+ARG_SIZ+1];
+ char value[2+ARG_SIZ+1];
struct {
- char prefix[3]; /* for "-? " */
+ char prefix[2]; /* for "-?" */
char buf[ARG_SIZ];
char suffix[1]; /* room for '\0' */
} arg;
@@ -115,9 +115,9 @@ vms_gawk()
*misc_argp++ = 'C';
if (Present("VERSION")) /* /version -> -V */
*misc_argp++ = 'V';
-#else /* gawk 2.12 */
+#else /* gawk 2.12 and later */
W_cnt = 0, buf.arg.buf[0] = '\0';
- strncpy(buf.arg.prefix, "-W ", 3);
+ strncpy(buf.arg.prefix, "-W", 2);
chk_option("LINT","lint");
chk_option("POSIX","posix");
chk_option("STRICT","compat");
@@ -142,17 +142,17 @@ vms_gawk()
v_add_arg(++argc, misc_args); /* store it/them */
if (Present("FIELD_SEP")) { /* field separator */
- strncpy(buf.arg.prefix, "-F ", 3);
+ strncpy(buf.arg.prefix, "-F", 2);
if (Get_Value("FIELD_SEP", buf.arg.buf, sizeof buf.arg.buf))
v_add_arg(++argc, strdup(buf.value));
}
if (Present("VARIABLES")) { /* variables to init prior to BEGIN */
- strncpy(buf.arg.prefix, "-v ", 3);
+ strncpy(buf.arg.prefix, "-v", 2);
while (Get_Value("VARIABLES", buf.arg.buf, sizeof buf.arg.buf))
v_add_arg(++argc, strdup(buf.value));
}
if (Present("PROGFILE")) { /* program files, /input=file -> -f file */
- strncpy(buf.arg.prefix, "-f ", 3);
+ strncpy(buf.arg.prefix, "-f", 2);
while (Get_Value("PROGFILE", buf.arg.buf, sizeof buf.arg.buf))
v_add_arg(++argc, strdup(buf.value));
v_add_arg(++argc, "--");
@@ -167,7 +167,7 @@ vms_gawk()
v_add_arg(++argc, strdup(buf.value));
if (Present("OUTPUT")) { /* let other parser treat this as 'stdout' */
- strncpy(buf.arg.prefix, ">$ ", 3);
+ strncpy(buf.arg.prefix, ">$", 2);
if (Get_Value("OUTPUT", buf.arg.buf, sizeof buf.arg.buf))
v_add_arg(++argc, strdup(buf.value));
}
diff --git a/vms/vms_misc.c b/vms/vms_misc.c
index 4d065115..35be9cc7 100644
--- a/vms/vms_misc.c
+++ b/vms/vms_misc.c
@@ -107,20 +107,20 @@ unlink( const char *file_spec ) {
#ifdef open
# undef open
#endif
+extern int creat P((const char *,int,...));
+extern int open P((const char *,int,unsigned,...));
+
/* vms_open() - open a file, possibly creating it */
int
vms_open( const char *name, int mode, ... )
{
- extern int creat P((const char *,int,...));
- extern int open P((const char *,int,unsigned,...));
-
if (mode == (O_WRONLY|O_CREAT|O_TRUNC))
return creat(name, 0, "shr=nil", "mbc=24");
else {
struct stat stb;
const char *mbc, *shr = "shr=get";
- if (stat(name, &stb) < 0) { /* assume DECnet */
+ if (stat((char *)name, &stb) < 0) { /* assume DECnet */
mbc = "mbc=8";
} else { /* ordinary file; allow full sharing iff record format */
mbc = "mbc=12";
@@ -140,9 +140,9 @@ vms_devopen( const char *name, int mode )
FILE *file = NULL;
if (STREQ(name, "/dev/null"))
- return open("NL:", mode); /* "/dev/null" => "NL:" */
+ return open("NL:", mode, 0); /* "/dev/null" => "NL:" */
else if (STREQ(name, "/dev/tty"))
- return open("TT:", mode); /* "/dev/tty" => "TT:" */
+ return open("TT:", mode, 0); /* "/dev/tty" => "TT:" */
else if (strncasecmp(name, "SYS$", 4) == 0) {
name += 4; /* skip "SYS$" */
if (strncasecmp(name, "INPUT", 5) == 0 && (mode & O_WRONLY) == 0)
@@ -170,6 +170,14 @@ void tzset()
return;
}
+/* getpgrp() -- there's no such thing as process group under VMS;
+ * job tree might be close enough to be useful though.
+ */
+int getpgrp()
+{
+ return 0;
+}
+
/*----------------------------------------------------------------------*/
#ifdef NO_VMS_ARGS /* real code is in "vms/vms_args.c" */
void vms_arg_fixup( int *argc, char ***argv ) { return; } /* dummy */
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index 069a4ca8..1504ce55 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -2,9 +2,10 @@ $! vmsbuild.com -- Commands to build GAWK Pat Rankin, Dec'89
$! revised, Mar'90
$! gawk 2.13 revised, Jun'91
$! gawk 2.14 revised, Sep'92
+$! gawk 2.15 revised, Oct'93
$!
-$ REL = "2.14" !release version number
-$ PATCHLVL = "0"
+$ REL = "2.15" !release version number
+$ PATCHLVL = "3"
$!
$! [ remove "/optimize=noinline" for VAX C V2.x or DEC C ]
$! [ add "/standard=VAXC" for DEC C and "/g_float" for Alpha ]
@@ -12,7 +13,7 @@ $ if f$type(cc) .nes."STRING" then cc := cc/nolist/optimize=noinline
$ if f$type(link).nes."STRING" then link := link/nomap
$ if f$type(set_command).nes."STRING" then set_command := set command
$!
-$ cc := 'cc'/Include=[]/Define="""GAWK"""
+$ cc := 'cc'/Include=[]/Define="(""GAWK"",""HAVE_CONFIG_H"")"
$ libs = "sys$share:vaxcrtl.exe/Shareable"
$
$! uncomment for DEC C
@@ -23,7 +24,7 @@ $ ! define vaxc$library sys$library:,sys$disk:[.vms]
$ ! define c$library [],[.vms]
$!
$! uncomment next two lines for GNU C
-$ ! cc := gcc/Include=([],[.vms])/Define="""GAWK""" !use GNU C rather than VAX C
+$ ! cc := gcc/Include=([],[.vms])/Define="(""GAWK"",""HAVE_CONFIG_H"")"
$ ! libs = "gnu_cc:[000000]gcclib.olb/Library,sys$library:vaxcrtl.olb/Library"
$!
$ if f$search("config.h").eqs."" then copy [.config]vms-conf.h []config.h
@@ -48,10 +49,11 @@ $ cc version.c
$ cc missing.c
$ cc re.c
$ cc getopt.c
+$ cc getopt1.c
$ cc awktab.c
$ cc regex.c
$ cc dfa.c
-$ cc/define=("STACK_DIRECTION=(-1)","exit=vms_exit") alloca
+$ cc/define=("STACK_DIRECTION=(-1)","exit=vms_exit") alloca.c
$ cc [.vms]vms_misc.c
$ cc [.vms]vms_popen.c
$ cc [.vms]vms_fwrite.c
@@ -64,7 +66,7 @@ $ create gawk.opt
! GAWK -- Gnu AWK
main.obj,eval.obj,builtin.obj,msg.obj,iop.obj,io.obj
field.obj,array.obj,node.obj,version.obj,missing.obj
-re.obj,getopt.obj,awktab.obj,regex.obj,dfa.obj,[]alloca.obj
+re.obj,getopt.obj,getopt1.obj,awktab.obj,regex.obj,dfa.obj,[]alloca.obj
[]vms_misc.obj,vms_popen.obj,vms_fwrite.obj
[]vms_args.obj,vms_gawk.obj,vms_cli.obj,gawk_cmd.obj
psect_attr=environ,noshr !extern [noshare] char **