[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, new-vms, updated. gawk-4.1.0-154-ga26ea2
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, new-vms, updated. gawk-4.1.0-154-ga26ea21 |
Date: |
Sun, 29 Dec 2013 17:38:35 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, new-vms has been updated
via a26ea21bba35f0118c7d5c4414c6f6c7fa74b16b (commit)
from 434a743610b2856078b120cb50bfe92155f8c49c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=a26ea21bba35f0118c7d5c4414c6f6c7fa74b16b
commit a26ea21bba35f0118c7d5c4414c6f6c7fa74b16b
Author: Arnold D. Robbins <address@hidden>
Date: Sun Dec 29 19:38:09 2013 +0200
Enable compiling extensions on VMS.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 328d58b..c0e1fbb 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-29 John E. Malmberg <address@hidden>
+
+ * gawkdirfd.h: Adjust include for VMS.
+ * filefuncs.c: Make it compile on VMS.
+ * fnmatch.c: Make it compile on VMS.
+
2013-12-21 Mike Frysinger <address@hidden>
* configure.ac: Remove MirBSD and OS/390 hack to create
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 61cadfe..a6e99e8 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -36,6 +36,33 @@
#define _BSD_SOURCE
+#ifdef __VMS
+#if (__CRTL_VER >= 70200000) && !defined (__VAX)
+#define _LARGEFILE 1
+#endif
+
+#ifndef __VAX
+#ifdef __CRTL_VER
+#if __CRTL_VER >= 80200000
+#define _USE_STD_STAT 1
+#endif
+#endif
+#endif
+#define _POSIX_C_SOURCE 1
+#define _XOPEN_SOURCE 1
+#include <stat.h>
+#ifndef S_ISVTX
+#define S_ISVTX (0)
+#endif
+#ifndef major
+#define major(s) (s)
+#endif
+#ifndef minor
+#define minor(s) (0)
+#endif
+#endif
+
+
#include <stdio.h>
#include <assert.h>
#include <errno.h>
diff --git a/extension/fnmatch.c b/extension/fnmatch.c
index a67bc25..a85bcc7 100644
--- a/extension/fnmatch.c
+++ b/extension/fnmatch.c
@@ -45,15 +45,29 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
+#ifdef __VMS
+#define __iswctype iswctype
+#define __btowc btowc
+#endif
+
#define _GNU_SOURCE 1 /* use GNU extensions if they're there */
#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
#else
+#ifdef __VMS
+#include "fnmatch.h" /* version that comes with gawk */
+#else
#include "../missing_d/fnmatch.h" /* version that comes with gawk */
#endif
+#define HAVE_FNMATCH_H
+#endif
#ifndef HAVE_FNMATCH
+#ifdef __VMS
+#include "fnmatch.c" /* ditto */
+#else
#include "../missing_d/fnmatch.c" /* ditto */
+#endif
#define HAVE_FNMATCH
#endif
diff --git a/extension/gawkdirfd.h b/extension/gawkdirfd.h
index a3a2b6a..d1edf65 100644
--- a/extension/gawkdirfd.h
+++ b/extension/gawkdirfd.h
@@ -35,7 +35,11 @@
* Unlike the main gawk code base, this include is NOT dependant
* upon MinGW or EMX.
*/
+#ifndef __VMS
#include "../nonposix.h"
+#else
+#include "nonposix.h"
+#endif
#ifndef DIR_TO_FD
# define DIR_TO_FD(d) (FAKE_FD_VALUE)
diff --git a/test/ChangeLog b/test/ChangeLog
index 378c6ae..dd73cbc 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-29 John E. Malmberg <address@hidden>
+
+ * fts.awk: Adjust for VMS.
+
2013-12-10 Arnold D. Robbins <address@hidden>
* Makefile.am: Remove instances of "" that were incorrect.
diff --git a/test/fts.awk b/test/fts.awk
index a1b49cb..d2e55ca 100644
--- a/test/fts.awk
+++ b/test/fts.awk
@@ -3,8 +3,19 @@
BEGIN {
Level = 0
- system("rm -fr d1 d2")
- system("mkdir d1 d2 ; touch d1/f1 d1/f2 d2/f1 d2/f2")
+ os = ""
+ if (ENVIRON["AWKLIBPATH"] == "sys$disk:[-]") {
+ os = "VMS"
+ system("create/dir/prot=o:rwed [.d1]")
+ system("create/dir/prot=o:rwed [.d2]")
+ system("copy fts.awk [.d1]f1")
+ system("copy fts.awk [.d1]f2")
+ system("copy fts.awk [.d2]f1")
+ system("copy fts.awk [.d2]f2")
+ } else {
+ system("rm -fr d1 d2")
+ system("mkdir d1 d2 ; touch d1/f1 d1/f2 d2/f1 d2/f2")
+ }
pathlist[1] = "d1"
pathlist[2] = "d2"
flags = FTS_PHYSICAL
@@ -19,7 +30,14 @@ BEGIN {
traverse(data2)
close(output)
- system("rm -fr d1 d2")
+ if (os == "VMS") {
+ system("delete [.d1]*.*;*")
+ system("delete [.d2]*.*;*")
+ system("delete d1.dir;*")
+ system("delete d2.dir;*")
+ } else {
+ system("rm -fr d1 d2")
+ }
}
function indent( i)
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 504967f..7e6c731 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-29 John E. Malmberg <address@hidden>
+
+ * descrip.mms: Build the dynamic extensions that will work.
+ Alpha and Itanium only.
+
2013-12-23 John E. Malmberg <address@hidden>
* gawkmisc.vms: Fix program name calculation on VAX.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 2000e68..f53db27 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -76,6 +76,7 @@ CFLOAT = /float=ieee/ieee_mode=denorm_results
CNAME = /NAME=(AS_IS,SHORT)
CC = cc/DECC/Prefix=All/NESTED_INCLUDE=NONE$(CFLOAT)
CFLAGS = /Incl=([],[.vms])/Obj=[]/Def=($(CDEFS))$(CNAME) $(CCFLAGS)
+CEFLAGS = /Incl=([],[.vms],[.missing_d],[.extension])$(CNAME) $(CCFLAGS)
LIBS = # DECC$SHR instead of VAXCRTL, no special link option needed
.endif !VAXC
.endif !GNUC
@@ -240,6 +241,96 @@ $(VMSCMD) : $(VMSDIR)gawk.cld
install.help : $(VMSDIR)gawk.hlp
library/help $(HELPLIB) $< /log
+
+# Build dynamic extensions - Alpha/Itanium only.
+.ifdef __VAX__
+# VAX not complete yet.
+plug_opt = [.VMS.VAX]gawk_plugin_xfer.opt
+.else
+plug_opt = [.vms]gawk_plugin.opt
+.endif
+
+ext_gawkdirfd_h = [.extension]gawkdirfd.h config.h nonposix.h
+
+extensions : filefuncs.exe fnmatch.exe inplace.exe ordchr.exe readdir.exe \
+ revoutput.exe revtwoway.exe rwarray.exe testext.exe time.exe
+
+filefuncs.exe : filefuncs.obj stack.obj gawkfts.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), stack.obj, gawkfts.obj, \
+ $(plug_opt)/opt
+
+fnmatch.exe : fnmatch.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+inplace.exe : inplace.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+ordchr.exe : ordchr.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+readdir.exe : readdir.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+revoutput.exe : revoutput.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+revtwoway.exe : revtwoway.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+rwarray.exe : rwarray.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+testext.exe : testext.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+time.exe : time.obj $(plug_opt)
+ link/share=$(MMS$TARGET) $(MMS$SOURCE), $(plug_opt)/opt
+
+stack.obj : [.extension]stack.c config.h gawkapi.h \
+ [.extension]gawkfts.h, [.extension]stack.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+gawkfts.obj : [.extension]gawkfts.c config.h [.extension]gawkfts.h \
+ $(ext_gawkdirfd_h)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, ZOS_USS, "fchdir(x)=(-1)") \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+filefuncs.obj : [.extension]filefuncs.c config.h gawkapi.h \
+ [.extension]gawkfts.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+fnmatch.obj : [.extension]fnmatch.c config.h gawkapi.h \
+ [.missing_d]fnmatch.h [.missing_d]fnmatch.c
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+inplace.obj : [.extension]inplace.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+ordchr.obj : [.extension]ordchr.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+readdir.obj : [.extension]readdir.c config.h gawkapi.h \
+ $(ext_gawkdirfd_h)
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, HAVE_DIRENT_H) \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+revoutput.obj : [.extension]revoutput.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+revtwoway.obj : [.extension]revtwoway.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H, HAVE_GETDTABLESIZE) \
+ /object=$(MMS$TARGET) $(MMS$SOURCE)
+
+rwarray.obj : [.extension]rwarray.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+testext.obj : [.extension]testext.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+time.obj : [.extension]time.c config.h gawkapi.h
+ $(CC)$(CEFLAGS)/define=(HAVE_CONFIG_H)/object=$(MMS$TARGET) $(MMS$SOURCE)
+
+
# miscellaneous other targets
tidy :
- if f$search("*.*;-1").nes."" then purge
-----------------------------------------------------------------------
Summary of changes:
extension/ChangeLog | 6 +++
extension/filefuncs.c | 27 ++++++++++++++
extension/fnmatch.c | 14 +++++++
extension/gawkdirfd.h | 4 ++
test/ChangeLog | 4 ++
test/fts.awk | 24 +++++++++++--
vms/ChangeLog | 5 +++
vms/descrip.mms | 91 +++++++++++++++++++++++++++++++++++++++++++++++++
8 files changed, 172 insertions(+), 3 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, new-vms, updated. gawk-4.1.0-154-ga26ea21,
Arnold Robbins <=