aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-11-12 23:13:16 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-11-12 23:13:16 +0200
commitcafbb82185c4a5fc2608975c048d66017456a038 (patch)
tree916adf5fa6bab4c90a465b037a6b8bc05cdef1de
parent3b0ec209b9630bd4f8689a4ecc5544c419ebd259 (diff)
downloadegawk-cafbb82185c4a5fc2608975c048d66017456a038.tar.gz
egawk-cafbb82185c4a5fc2608975c048d66017456a038.tar.bz2
egawk-cafbb82185c4a5fc2608975c048d66017456a038.zip
Initial changes for VMS building.
-rw-r--r--io.c3
-rw-r--r--vms/ChangeLog15
-rw-r--r--vms/gawkmisc.vms2
-rw-r--r--vms/vms-conf.h7
-rw-r--r--vms/vms_fwrite.c2
-rw-r--r--vms/vms_gawk.c4
6 files changed, 24 insertions, 9 deletions
diff --git a/io.c b/io.c
index 5f4365c6..2607b6cb 100644
--- a/io.c
+++ b/io.c
@@ -2567,9 +2567,6 @@ find_source(const char *src, struct stat *stb, int *errcode, int is_extlib)
size_t src_len;
size_t suffix_len;
-#ifndef SHLIBEXT /* for vms, for now */
-#define SHLIBEXT "awk"
-#endif
#define EXTLIB_SUFFIX "." SHLIBEXT
src_len = strlen(src);
suffix_len = strlen(EXTLIB_SUFFIX);
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 725a223b..7689527d 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,6 +1,19 @@
+2012-11-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.vms (os_isreadable): Change first argument type to
+ awk_input_buf_t.
+ * vms-conf.h (HAVE_STDINT_H): Define.
+ (SHLIBEXT, DEFLIBPATH): Add definitions.
+ * vms_fwrite.c (tty_fwrite): Check do_debug instead of no-longer-
+ extant which_gawk variable.
+ * vms_gawk.c (vms_gawk): Check do_debug and do_profiling instead
+ of which_gawk.
+
+ Thanks to Anders Wallin.
+
2012-08-08 Arnold D. Robbins <arnold@skeeve.com>
- * gawkmisc.pc (os_isreadable): Take IOBUF_PUBLIC instead of fd and
+ * gawkmisc.vms (os_isreadable): Take IOBUF_PUBLIC instead of fd and
use passed in info.
2012-07-29 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/vms/gawkmisc.vms b/vms/gawkmisc.vms
index 0ca3e0bf..08c8fb5e 100644
--- a/vms/gawkmisc.vms
+++ b/vms/gawkmisc.vms
@@ -147,7 +147,7 @@ int fd;
/* os_isreadable --- fd can be read from */
int
-os_isreadable(const IOBUF_PUBLIC *iobuf, bool *isdir)
+os_isreadable(const awk_input_buf_t *iobuf, bool *isdir)
{
*isdir = false;
diff --git a/vms/vms-conf.h b/vms/vms-conf.h
index 59abd5de..3aee5ca6 100644
--- a/vms/vms-conf.h
+++ b/vms/vms-conf.h
@@ -233,7 +233,7 @@
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
+#define HAVE_STDINT_H 1
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
@@ -545,6 +545,10 @@
/* Whether `time_t' is an unsigned type. */
#define TIME_T_UNSIGNED 1
+/* Extension for shared libraries */
+#define SHLIBEXT "exe"
+
+
/*******************************/
/* Gawk configuration options. */
/*******************************/
@@ -561,6 +565,7 @@
*/
#define DEFPATH ".,/AWK_LIBRARY"
+#define DEFLIBPATH ".,/AWK_LIBRARY"
#define ENVSEP ','
/*
diff --git a/vms/vms_fwrite.c b/vms/vms_fwrite.c
index 921ac2d4..1a16f58c 100644
--- a/vms/vms_fwrite.c
+++ b/vms/vms_fwrite.c
@@ -77,7 +77,7 @@ tty_fwrite( const void *buf, size_t size, size_t number, FILE *file )
chan = file_num < _NFILE ? channel[file_num] : -1;
if (chan == 0) { /* if not initialized, need to assign a channel */
if (isatty(file_num) > 0 /* isatty: 1=yes, 0=no, -1=problem */
- && which_gawk != exe_debugging) {
+ && ! do_debug) {
Dsc device;
char devnam[255+1];
diff --git a/vms/vms_gawk.c b/vms/vms_gawk.c
index 222d803d..8b20c377 100644
--- a/vms/vms_gawk.c
+++ b/vms/vms_gawk.c
@@ -80,8 +80,8 @@ vms_gawk()
int native_dcl = 1, /* assume true until we know otherwise */
short_circ; /* some options make P1, /commands, /input superfluous */
- CmdName = (which_gawk == exe_profiling) ? "PGAWK"
- : (which_gawk == exe_debugging) ? "DGAWK"
+ CmdName = do_profile ? "PGAWK"
+ : do_debug ? "DGAWK"
: "GAWK";
/* check "GAWK_P1"--it's required; its presence will tip us off */