aboutsummaryrefslogtreecommitdiffstats
path: root/vms
diff options
context:
space:
mode:
Diffstat (limited to 'vms')
-rw-r--r--vms/ChangeLog47
-rw-r--r--vms/descrip.mms53
-rw-r--r--vms/gawkmisc.vms2
-rw-r--r--vms/redirect.h14
-rw-r--r--vms/vms-conf.h254
-rw-r--r--vms/vmsbuild.com28
-rw-r--r--vms/vmstest.com63
7 files changed, 263 insertions, 198 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 9a477d7f..13422217 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,50 @@
+Mon Oct 22 08:49:05 2007 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Release 3.1.6: Release tar file made.
+
+Wed May 16 19:54:00 2007 Pat Rankin <rankin@pactechdata.com>
+
+ * vms-conf.h: re-sync with configh.in.
+
+Sun Apr 29 18:09:17 2007 Pat Rankin <rankin@pactechdata.com>
+
+ * redirect.h: declare snprintf() if CRTL_VER_V732 is defined;
+ redefining __CRTL_VER in config.h causes <stdio.h> to suppress it.
+
+ * vmstest.com (fnarray): exit code has changed to 2.
+ (pid): target values now passed by command line rather than file.
+
+Fri Apr 20 16:48:30 2007 Pat Rankin <rankin@pactechdata.com>
+
+ * vms-conf.h: #define HAVE_SNPRINTF for V7.3-2 and later CRTL.
+ * redirect.h: #define snprintf to gawk_snprintf if we're using
+ missing_d/snprintf.c; avoids diagnostic about its declaration.
+
+Thu Apr 12 18:59:33 2007 Pat Rankin <rankin@pactechdata.com>
+
+ * vms-conf.h: Leave HAVE_MKSTEMP undefined; we want tmpfile().
+
+Thu Mar 29 19:30:20 2007 Pat Rankin <rankin@pactechdata.com>
+
+ * vms-conf.h: reconcile with configh.in.
+
+ * descrip.mms: compile floatcomp.c; add pgawk target and build
+ pgawk.exe for `make all'.
+ * vmsbuild.com: compile floatcomp.c; always build pgawk.exe in
+ addition to gawk.exe.
+
+Wed Jul 27 21:31:14 2005 Pat Rankin <rankin@pactechdata.com>
+
+ * vmstest.com: Format test group feedback differently (append "...")
+ to distinguish it from individual test feedback.
+ (manyfiles): Determine the number of files to use dynamically
+ instead of using hardcoded 300 in case user's open file quota
+ is generous enough to support more than that.
+ (longsub): Add error trap so that failure when gawk is built with
+ VAXCRTL doesn't cause testing to terminate.
+ (vms_io1): Invoke with normal Unix-style command line syntax.
+ (vms_cmd): New test; split off DCL-style command line from vms_io1.
+
Tue Jul 26 21:46:16 2005 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.5: Release tar file made.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 975b0fec..994ee46b 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -12,6 +12,10 @@
# gawk.exe :
# This is the default target. DEC C has become the default compiler.
#
+# pgawk.exe :
+# An alternate version which generates some profiling feedback for
+# the awk programs it executes. Included with `make all'.
+#
# awkgram.c :
# If you don't have bison but do have VMS POSIX or DEC/Shell,
# change the PARSER and PASERINIT macros to use yacc. If you don't
@@ -88,10 +92,12 @@ ECHO = write sys$output
NOOP = continue
# object files
+GAWKOBJ = eval.obj,profile.obj
+PGAWKOBJ = eval_p.obj,profile_p.obj
AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\
- field.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,\
- msg.obj,node.obj,random.obj,re.obj
-AWKOBJ2 = regex.obj,replace.obj,version.obj,eval.obj,profile.obj
+ field.obj,floatcomp.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj
+AWKOBJ2 = main.obj,msg.obj,node.obj,random.obj,re.obj,\
+ regex.obj,replace.obj,version.obj
AWKOBJS = $(AWKOBJ1),$(AWKOBJ2)
# VMSOBJS
@@ -101,11 +107,11 @@ VMSCODE = vms_misc.obj,vms_popen.obj,vms_fwrite.obj,vms_args.obj,\
VMSCMD = gawk_cmd.obj # built from .cld file
VMSOBJS = $(VMSCODE),$(VMSCMD)
-# source and documentation files
-AWKSRC = array.c,builtin.c,ext.c,eval.c,dfa.c,field.c,gawkmisc.c,\
- getopt.c,getopt1.c,io.c,main.c,msg.c,node.c,random.c,re.c,\
- random.c,regcomp.c,regex.c,regex_internal.c,regexec.c,\
- replace.c,version.c,eval.c,profile.c
+# primary source files
+AWKSRC = array.c,builtin.c,dfa.c,eval.c,eval_p.c,ext.c,field.c,\
+ floatcomp.c,gawkmisc.c,getopt.c,getopt1.c,io.c,main.c,\
+ msg.c,node.c,profile.c,profile_p.c,random.c,re.c,regcomp.c,\
+ regex.c,regex_internal.c,regexec.c,replace.c,version.c
ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\
gettext.h,mbsupport.h,protos.h,random.h
@@ -125,20 +131,41 @@ REL=3.1
PATCHLVL=5
# generic target
-all : gawk
+all : gawk,pgawk
$(NOOP)
# dummy target to allow building "gawk" in addition to explicit "gawk.exe"
gawk : gawk.exe
$(ECHO) " GAWK "
+pgawk : pgawk.exe
+ $(ECHO) " PGAWK "
# rules to build gawk
-gawk.exe : $(AWKOBJS) $(VMSOBJS) gawk.opt
+gawk.exe : $(GAWKOBJ) $(AWKOBJS) $(VMSOBJS) gawk.opt
$(LINK) $(LINKFLAGS) gawk.opt/options
+# rules to build pgawk
+pgawk.exe : $(PGAWKOBJ) $(AWKOBJS) $(VMSOBJS) pgawk.opt
+ $(LINK) $(LINKFLAGS) pgawk.opt/options
+
gawk.opt : $(MAKEFILE) # create linker options file
open/write opt gawk.opt ! ~ 'cat <<close >gawk.opt'
write opt "! GAWK -- GNU awk"
+ @ write opt "$(GAWKOBJ)"
+ @ write opt "$(AWKOBJ1)"
+ @ write opt "$(AWKOBJ2)"
+ @ write opt "$(VMSOBJS)"
+ @ write opt "psect_attr=environ,noshr !extern [noshare] char **"
+ @ write opt "stack=48 !preallocate more pages (default is 20)"
+ @ write opt "iosegment=128 !ditto (default is 32)"
+ write opt "$(LIBS)"
+ write opt "identification=""V$(REL).$(PATCHLVL)"""
+ close opt
+
+pgawk.opt : $(MAKEFILE) # create linker options file
+ open/write opt pgawk.opt
+ write opt "! PGAWK -- GNU awk w/ run-time profiling"
+ @ write opt "$(PGAWKOBJ)"
@ write opt "$(AWKOBJ1)"
@ write opt "$(AWKOBJ2)"
@ write opt "$(VMSOBJS)"
@@ -161,6 +188,8 @@ gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms
$(AWKOBJS) : awk.h gettext.h mbsupport.h regex.h dfa.h \
config.h $(VMSDIR)redirect.h
+$(GAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
+$(PGAWKOBJ) : awk.h config.h $(VMSDIR)redirect.h
random.obj : random.h
builtin.obj : random.h
awkgram.obj : awkgram.c awk.h
@@ -194,10 +223,12 @@ tidy :
- if f$search("[.*]*.*;-1").nes."" then purge [.*]
clean :
- - delete *.obj;*,gawk.opt;*
+ - delete *.obj;*,gawk.opt;*,pgawk.opt;*
spotless : clean tidy
+ - if f$search("config.h").nes."" then rename config.h config.h-old/New
- if f$search("gawk.exe").nes."" then delete gawk.exe;*
+ - if f$search("pgawk.exe").nes."" then delete pgawk.exe;*
- if f$search("gawk.dvi").nes."" then delete gawk.dvi;*
- if f$search("[.doc]texindex.exe").nes."" then delete [.doc]texindex.exe;*
diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms
index 28e06544..df5ded15 100644
--- a/vms/gawkmisc.vms
+++ b/vms/gawkmisc.vms
@@ -10,7 +10,7 @@
*
* GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GAWK is distributed in the hope that it will be useful,
diff --git a/vms/redirect.h b/vms/redirect.h
index a0de1729..943af981 100644
--- a/vms/redirect.h
+++ b/vms/redirect.h
@@ -3,14 +3,15 @@
*/
/*
- * Copyright (C) 1986, 88, 89, 91-93, 1996, 1997 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 88, 89, 91-93, 1996, 1997, 2007
+ * the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
*
* GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GAWK is distributed in the hope that it will be useful,
@@ -82,6 +83,15 @@ extern int gettimeofday(struct timeval *,void *);
#define open vms_open
#define popen vms_popen
#define pclose vms_pclose
+#ifndef HAVE_SNPRINTF
+#define snprintf gawk_snprintf /* avoid %CC-I-INTRINSICDECL diagnostic */
+#else
+#ifdef CRTL_VER_V732
+/* when overriding the version of the C library that compiler thinks is
+ in use, we need to duplicate something being suppressed in <stdio.h> */
+int snprintf(char *,size_t,const char *,...);
+#endif
+#endif
#define strerror vms_strerror
#define strdup vms_strdup
#define unlink vms_unlink
diff --git a/vms/vms-conf.h b/vms/vms-conf.h
index 5bfa3f88..91de82f7 100644
--- a/vms/vms-conf.h
+++ b/vms/vms-conf.h
@@ -3,18 +3,19 @@
/*
* config.h -- configuration definitions for gawk.
*
- * For VMS (assumes V4.6 or later; tested on V5.5-2 and V7.1)
+ * For VMS (assumes V4.6 or later; tested on V7.3-1, V8.3.
*/
/*
- * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002, 2003, 2005 the Free Software Foundation, Inc.
+ * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002, 2003, 2005
+ * the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
*
* GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* GAWK is distributed in the hope that it will be useful,
@@ -30,17 +31,19 @@
/* switch statements are enabled in awk programs */
#undef ALLOW_SWITCH
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
- systems. This function is required for `alloca.c' support on those systems.
- */
-#undef CRAY_STACKSEG_END
-
-#if 0
+#if 0 /* no longer used */
/* Define to 1 if using alloca.c. */
#define C_ALLOCA 1
#else
#define NO_ALLOCA /* vms/vms_fwrite.c needs this */
-#endif
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#define STACK_DIRECTION (-1)
+#endif /*0*/
/* dynamic loading is possible */
#undef DYNAMIC
@@ -59,42 +62,27 @@
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
-/* Define to 1 if you have the `asprintf' function. */
-#undef HAVE_ASPRINTF
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
-/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_FEOF_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
- you don't. */
-#define HAVE_DECL_FGETS_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
- don't. */
-#define HAVE_DECL_GETC_UNLOCKED 0
-
-/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
- don't. */
-#define HAVE_DECL__SNPRINTF 0
-
-/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you
- don't. */
-#define HAVE_DECL__SNWPRINTF 0
+/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+ */
+#undef HAVE_DECL_TZNAME
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
#undef HAVE_DOPRNT
@@ -105,20 +93,8 @@
/* Define to 1 if you have the `fmod' function. */
#define HAVE_FMOD 1
-/* Define to 1 if you have the `fwprintf' function. */
-#undef HAVE_FWPRINTF
-
-/* Define to 1 if you have the `getcwd' function. */
-#define HAVE_GETCWD 1
-
-/* Define to 1 if you have the `getegid' function. */
-#undef HAVE_GETEGID
-
-/* Define to 1 if you have the `geteuid' function. */
-#define HAVE_GETEUID 1
-
-/* Define to 1 if you have the `getgid' function. */
-#define HAVE_GETGID 1
+/* have getaddrinfo */
+#undef HAVE_GETADDRINFO
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
@@ -126,15 +102,9 @@
/* Define to 1 if you have the `getgroups' function. */
#undef HAVE_GETGROUPS
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
-
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
-/* Define to 1 if you have the `getuid' function. */
-#define HAVE_GETUID 1
-
/* Define to 1 if you have the `grantpt' function. */
#undef HAVE_GRANTPT
@@ -144,13 +114,16 @@
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#undef HAVE_INTMAX_T
-/* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
+/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
+/* Define to 1 if you have the `isascii' function. */
+#define HAVE_ISASCII 1
+
/* Define to 1 if you have the `iswctype' function. */
#undef HAVE_ISWCTYPE
@@ -166,9 +139,6 @@
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
-/* Define to 1 if you have the `dl' library (-ldl). */
-#undef HAVE_LIBDL
-
/* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H
@@ -181,14 +151,11 @@
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
-/* Define if you have the 'long double' type. */
-#undef HAVE_LONG_DOUBLE
-
/* Define if you have the 'long long' type. */
#undef HAVE_LONG_LONG
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
/* Define to 1 if you have the `mbrlen' function. */
#undef HAVE_MBRLEN
@@ -205,26 +172,26 @@
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
+/* Define to 1 if you have the `memcpy_ulong' function. */
+#undef HAVE_MEMCPY_ULONG
+
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have the `mempcpy' function. */
-#undef HAVE_MEMPCPY
-
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
-/* we have the mktime function */
-#define HAVE_MKTIME 1
+/* Define to 1 if you have the `memset_ulong' function. */
+#undef HAVE_MEMSET_ULONG
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
+/* we have the mktime function */
+#define HAVE_MKTIME 1
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
@@ -232,21 +199,9 @@
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
/* we have portals on /p on this system */
#undef HAVE_PORTALS
-/* Define if your printf() function supports format strings with positions. */
-#undef HAVE_POSIX_PRINTF
-
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
@@ -256,6 +211,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
+/* newer systems define this type here */
+#undef HAVE_SOCKADDR_STORAGE
+
/* we have sockets on this system */
#undef HAVE_SOCKETS
@@ -275,18 +233,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
-/* Define to 1 if you have the `stpcpy' function. */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
@@ -346,12 +295,19 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
+/* Define to 1 if you have the `tmpfile' function. */
+#define HAVE_TMPFILE 1
+/* Force snprintf.c to use tmpfile() instead of mkstemp(). */
+#ifdef HAVE_MKSTEMP
+#undef HAVE_MKSTEMP
+#endif
+
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead. */
#undef HAVE_TM_ZONE
@@ -362,9 +318,6 @@
/* Define to 1 if you have the `towupper' function. */
#undef HAVE_TOWUPPER
-/* Define to 1 if you have the `tsearch' function. */
-#undef HAVE_TSEARCH
-
/* Define to 1 if you don't have `tm_zone' but do have the external array
`tzname'. */
#define HAVE_TZNAME 1 /* (faked in vms/vms_misc.c) */
@@ -382,27 +335,24 @@
#undef HAVE_UNISTD_H
#endif
-/* Define if you have the unsigned long long type. */
+/* Define if you have the 'unsigned long long' type. */
#undef HAVE_UNSIGNED_LONG_LONG
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
-/* Define if you have the 'wchar_t' type. */
-#undef HAVE_WCHAR_T
-
/* Define to 1 if you have the `wcrtomb' function. */
#undef HAVE_WCRTOMB
/* Define to 1 if you have the `wcscoll' function. */
#undef HAVE_WCSCOLL
-/* Define to 1 if you have the `wcslen' function. */
-#undef HAVE_WCSLEN
-
/* Define to 1 if you have the `wctype' function. */
#undef HAVE_WCTYPE
@@ -415,23 +365,8 @@
/* systems should define this type here */
#undef HAVE_WINT_T
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
-
-/* Define to 1 if you have the `__fsetlocking' function. */
-#undef HAVE___FSETLOCKING
-
-/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
-
-/* Define if integer division by zero raises signal SIGFPE. */
-#define INTDIV0_RAISES_SIGFPE 1
+/* disable fatal errors on directories */
+#undef NO_DIRECTORY_FATAL
/* disable lint checks */
#undef NO_LINT
@@ -446,21 +381,18 @@
#define PACKAGE_NAME "GNU Awk"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "GNU Awk 3.1.4c"
+#define PACKAGE_STRING "GNU Awk 3.1.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "gawk"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "3.1.4c"
+#define PACKAGE_VERSION "3.1.6"
/* Define to 1 if *printf supports %F format */
#undef PRINTF_HAS_F_FORMAT
-/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
-#undef PRI_MACROS_BROKEN
-
-/* Define if compiler has function prototypes */
+/* Define to 1 if the C compiler supports function prototypes. */
#define PROTOTYPES 1
/* Define as the return type of signal handlers (`int' or `void'). */
@@ -472,27 +404,12 @@
/* The size of a `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 4
-/* Define as the maximum value of type 'size_t', if the system doesn't define
- it. */
-#define SIZE_MAX 0xffffffffUL
-
/* return type of sprintf */
#define SPRINTF_RET int
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#define STACK_DIRECTION (-1)
-
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
-/* strtod doesn't have C89 semantics */
-#define STRTOD_NOT_C89 1
-
/* some systems define this type here */
#undef TIME_T_IN_SYS_TYPES_H
@@ -506,7 +423,7 @@
#define USE_INCLUDED_STRFTIME 1
/* Version number of package */
-#define VERSION "3.1.4"
+#define VERSION "3.1.6"
/* Define to 1 if on AIX 3.
System headers sometimes define this.
@@ -518,6 +435,11 @@
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
@@ -536,6 +458,17 @@
# undef __CHAR_UNSIGNED__
#endif
+/* Enable extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+
/* Define like PROTOTYPES; this can be used by system headers. */
#define __PROTOTYPES 1
@@ -554,22 +487,22 @@
/* Define to widest signed type if <inttypes.h> doesn't define. */
#define intmax_t long int
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
-
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
-/* Define as the type of the result of subtracting two pointers, if the system
- doesn't define it. */
-#undef ptrdiff_t
-
-/* Define to empty if the C compiler doesn't support this keyword. */
-#undef signed
+/* Define to equivalent of C99 restrict keyword, or to nothing if this is not
+ supported. Do not define if restrict is supported directly. */
+#define restrict
+#if defined(__DECC) && (__DECC_VER >= 60400000)
+#undef restrict
+#endif
/* Define to `unsigned' if <sys/types.h> doesn't define. */
#undef size_t
+/* type to use in place of socklen_t if not defined */
+#undef socklen_t
+
/* Define to `int' if <sys/types.h> does not define. */
#define ssize_t int
@@ -581,7 +514,7 @@
#define uintmax_t unsigned long
#if 0
-#include <custom.h> /* overrides for stuff autoconf can't deal with */
+#include "custom.h" /* overrides for stuff autoconf can't deal with */
#else
/* Whether `time_t' is an unsigned type. */
@@ -662,6 +595,10 @@
# define __VMS_VER 60100000
#endif
#if __CRTL_VER >= 60200000
+# if __CRTL_VER >= 70320000
+# define CRTL_VER_V732
+# define HAVE_SNPRINTF 1
+# endif
# if __CRTL_VER >= 70301000
# define CRTL_VER_V731
# endif
@@ -692,6 +629,7 @@
#ifdef __GNUC__
/* #define const */
/* #undef STDC_HEADERS */
+/* #undef HAVE_STDDEF_H */
#ifndef STDC_HEADERS
#define alloca __builtin_alloca
#define environ $$PsectAttributes_NOSHR$$environ /* awful GAS kludge */
@@ -703,6 +641,6 @@
#include "vms/redirect.h"
#undef IN_CONFIG_H
-#endif /*<custom.h>*/
+#endif /*"custom.h"*/
#endif /*CONFIG_H*/
diff --git a/vms/vmsbuild.com b/vms/vmsbuild.com
index 107523bd..ea33290a 100644
--- a/vms/vmsbuild.com
+++ b/vms/vmsbuild.com
@@ -7,9 +7,10 @@ $! gawk 3.0 revised, Dec'95
$! gawk 3.0.1 revised, Nov'96
$! gawk 3.1.0 revised, Mar'01
$! gawk 3.1.1 revised, Apr'02
+$! gawk 3.1.6 revised, Mar'07
$!
$ REL = "3.1" !release version number
-$ PATCHLVL = "5"
+$ PATCHLVL = "6"
$!
$!
$ CCFLAGS = "/noList" ! "/noOpt/Debug"
@@ -65,6 +66,7 @@ $ cc builtin.c
$ cc dfa.c
$ cc ext.c
$ cc field.c
+$ cc floatcomp.c
$ cc gawkmisc.c
$ cc getopt.c
$ cc getopt1.c
@@ -78,7 +80,9 @@ $ cc regex.c
$ cc replace.c
$ cc version.c
$ cc eval.c
+$ cc eval_p.c
$ cc profile.c
+$ cc profile_p.c
$ cc [.vms]vms_misc.c
$ cc [.vms]vms_popen.c
$ cc [.vms]vms_fwrite.c
@@ -91,9 +95,9 @@ $!
$ close/noLog Fopt
$ create gawk.opt
! GAWK -- GNU awk
-array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,gawkmisc.obj
-getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.obj,random.obj
-re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.obj
+array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
+gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.obj
+random.obj,re.obj,regex.obj,replace.obj,version.obj,eval.obj,profile.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 **
@@ -104,7 +108,23 @@ $ write Fopt libs
$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
$ close Fopt
$!
+$ create pgawk.opt
+! PGAWK -- GNU awk w/ run-time profiling
+array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,field.obj,floatcomp.obj
+gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,msg.obj,node.obj
+random.obj,re.obj,regex.obj,replace.obj,version.obj,eval_p.obj,profile_p.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 **
+stack=48 !preallocate more pages (default is 20)
+iosegment=128 !ditto (default is 32)
+$ open/append Fopt pgawk.opt
+$ write Fopt libs
+$ write Fopt "identification=""V''REL'.''PATCHLVL'"""
+$ close Fopt
+$!
$ v = f$verify(1)
$ link/exe=gawk.exe gawk.opt/options
+$ link/exe=pgawk.exe pgawk.opt/options
$! 'f$verify(v)'
$ exit
diff --git a/vms/vmstest.com b/vms/vmstest.com
index 130411c6..a5cbc03d 100644
--- a/vms/vmstest.com
+++ b/vms/vmstest.com
@@ -24,7 +24,7 @@ $ exit
$
$all:
$bigtest: bigtest_list = "basic unix_tests gawk_ext vms_tests"
-$ echo "bigtest"
+$ echo "bigtest..."
$bigtest_loop: bigtest_test = f$element(0," ",bigtest_list)
$ bigtest_list = bigtest_list - bigtest_test - " "
$ if bigtest_test.nes." " then gosub 'bigtest_test'
@@ -62,7 +62,7 @@ $ basic_lst4 = "manglprm nested nfneg noloop1 noloop2" -
+ " rstest4 rstest5 scalar sortempty splitarr strcat1" -
+ " subsepnm synerr1 uninit2 uninit3 uninit4" -
+ " uninitialized unterm wjposer1 zeroe0"
-$ echo "basic"
+$ echo "basic..."
$basic_loop1: basic_test = f$element(0," ",basic_lst1)
$ basic_lst1 = basic_lst1 - basic_test - " "
$ if basic_test.nes." " then gosub 'basic_test'
@@ -83,7 +83,7 @@ $ return
$
$unix_tests: unix_tst_list = "fflush getlnhd pid pipeio1" -
+ " pipeio2 poundbang strftlng"
-$ echo "unix_tests"
+$ echo "unix_tests..."
$unix_tst_loop: unix_tst_test = f$element(0," ",unix_tst_list)
$ unix_tst_list = unix_tst_list - unix_tst_test - " "
$ if unix_tst_test.nes." " then gosub 'unix_tst_test'
@@ -94,15 +94,15 @@ $gawk_ext: gawk_ext_list = "argtest badargs clos1way fieldwdth" -
+ " fsfwfs gensub gnuops2 gnureops igncdym igncfs" -
+ " ignrcase lint manyfiles nondec posix procinfs" -
+ " regx8bit reint shadow sort1 strftime"
-$ echo "gawk_ext (gawk.extensions)"
+$ echo "gawk_ext... (gawk.extensions)"
$gawk_ext_loop: gawk_ext_test = f$element(0," ",gawk_ext_list)
$ gawk_ext_list = gawk_ext_list - gawk_ext_test - " "
$ if gawk_ext_test.nes." " then gosub 'gawk_ext_test'
$ if gawk_ext_list.nes."" then goto gawk_ext_loop
$ return
$
-$vms_tests: vms_tst_list = "vms_io1"
-$ echo "vms_tests"
+$vms_tests: vms_tst_list = "vms_io1 vms_cmd"
+$ echo "vms_tests..."
$vms_tst_loop: vms_tst_test = f$element(0," ",vms_tst_list)
$ vms_tst_list = vms_tst_list - vms_tst_test - " "
$ if vms_tst_test.nes." " then gosub 'vms_tst_test'
@@ -110,7 +110,7 @@ $ if vms_tst_list.nes."" then goto vms_tst_loop
$ return
$
$extra: extra_list = "regtest inftest inet"
-$ echo "extra"
+$ echo "extra..."
$extra_loop: extra_test = f$element(0," ",extra_list)
$ extra_list = extra_list - extra_test - " "
$ if extra_test.nes." " then gosub 'extra_test'
@@ -118,7 +118,7 @@ $ if extra_list.nes."" then goto extra_loop
$ return
$
$inet: inet_list = "inetechu inetecht inetdayu inetdayt"
-$ echo "inet"
+$ echo "inet..."
$ type sys$input:
The inet tests only work if gawk has been built with tcp/ip socket
support and your system supports the services "discard" at port 9
@@ -224,17 +224,29 @@ $ if $status then rm tmp.;
$ return
$
$manyfiles: echo "manyfiles"
+$!! this used to use a hard-coded value of 300 simultaneously open
+$!! files, but if our open file quota is generous enough then that
+$!! wouldn't exercise the ability to handle more than the maximum
+$!! number allowed at once
+$ f_cnt = 300
+$ chnlc = f$getsyi("CHANNELCNT")
+$ fillm = f$getjpi("","FILLM")
+$ if fillm.ge.chnlc then fillm = chnlc - 1
+$ if fillm.ge.f_cnt then f_cnt = fillm + 10
$ if f$search("[.junk]*.*").nes."" then rm [.junk]*.*;*
$ if f$parse("[.junk]").eqs."" then create/Dir/Prot=(O:rwed) [.junk]
-$ gawk "BEGIN { for (i = 1; i <= 300; i++) print i, i}" >tmp.
-$ echo "This may take quite a while..."
-$ echo ""
+$ gawk -v "F_CNT=''f_cnt'" "BEGIN {for (i = 1; i <= F_CNT; i++) print i, i}" >tmp.
+$ echo "(processing ''f_cnt' files; this may take quite a while)"
$ gawk -f manyfiles.awk tmp. tmp.
$ define/User sys$error _NL:
$ define/User sys$output tmp.too
$ search/Match=Nor/Output=_NL:/Log [.junk]*.* ""
$!/Log output: "%SEARCH-S-NOMATCH, <filename> - <#> records" plus 1 line summary
-$ gawk "$4!=2{++count}; END{if(NR!=301||count!=1){print ""Failed!""}}" tmp.too
+$ gawk -v "F_CNT=''f_cnt'" -f - tmp.too
+$deck !some input begins with "$"
+$4 != 2 {++count}
+END {if (NR != F_CNT+1 || count != 1) {print "\nFailed!"}}
+$eod
$ rm tmp.;,tmp.too;,[.junk]*.*;*,[]junk.dir;
$ return
$
@@ -603,7 +615,7 @@ $fnarray: echo "fnarray"
$ set noOn
$ AWKPATH_srcdir
$ gawk -f fnarray.awk >tmp. 2>&1
-$ if .not.$status then call exit_code 1
+$ if .not.$status then call exit_code 2
$ set On
$ cmp fnarray.ok tmp.
$ if $status then rm tmp.;
@@ -672,14 +684,9 @@ $ if $status then rm tmp.;
$ return
$
$pid: echo "pid"
-$ if f$search("pid.ok").eqs."" then create pid.ok
-$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp
-$ open/Write ftmp _pid.in
-$ write ftmp f$integer("%x" + f$getjpi("","PID"))
-$ write ftmp f$integer("%x" + f$getjpi("","OWNER"))
-$ close ftmp
-$ gawk -f pid.awk _pid.in >tmp. >& _NL:
-$ rm _pid.in;
+$ pid = f$integer("%x" + f$getjpi("","PID"))
+$ ppid = f$integer("%x" + f$getjpi("","OWNER"))
+$ gawk -v "ok_pid=''pid'" -v "ok_ppid=''ppid'" -f pid.awk >tmp. >& _NL:
$ cmp pid.ok tmp.
$ if $status then rm tmp.;
$ return
@@ -1217,6 +1224,7 @@ $ if $status then rm tmp.;
$ return
$
$longsub: echo "longsub"
+$ set noOn
$ gawk -f longsub.awk longsub.in >tmp.
$!! the records here are too long for DIFF to handle
$!! so assume success as long as gawk doesn't crash
@@ -1224,6 +1232,7 @@ $!! call fixup_LRL longsub.ok
$!! call fixup_LRL tmp. "purge"
$!! cmp longsub.ok tmp.
$ if $status then rm tmp.;
+$ set On
$ return
$
$arrayprm2: echo "arrayprm2"
@@ -1656,13 +1665,23 @@ $ then create vms_io1.ok
Hello
$ endif
$ ! define/User dbg$input sys$command:
-$ gawk /Input=sys$input _NL: /Output=tmp.
+$ gawk -f - >tmp.
# prior to 3.0.4, gawk crashed doing any redirection after closing stdin
BEGIN { print "Hello" >"/dev/stdout" }
$ cmp vms_io1.ok tmp.
$ if $status then rm tmp.;
$ return
$
+$vms_cmd: echo "vms_cmd"
+$ if f$search("vms_cmd.ok").eqs.""
+$ then create vms_cmd.ok
+World!
+$ endif
+$ gawk /Commands="BEGIN { print ""World!"" }" _NL: /Output=tmp.
+$ cmp vms_cmd.ok tmp.
+$ if $status then rm tmp.;
+$ return
+$
$clean:
$ if f$search("tmp.") .nes."" then rm tmp.;*
$ if f$search("tmp.too") .nes."" then rm tmp.too;*