From 9953f4cee02f2781ee5da2e42bcb837c1a849cb0 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 12 Dec 2013 20:45:59 +0200 Subject: First round of VMS changes. --- io.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'io.c') diff --git a/io.c b/io.c index 4f244532..ac1855ba 100644 --- a/io.c +++ b/io.c @@ -121,6 +121,11 @@ #endif #if defined(VMS) +#include +#ifndef SS$_EXBYTLM +#define SS$_EXBYTLM 0x2a14 /* VMS 8.4 seen */ +#endif +#include #define closemaybesocket(fd) close(fd) #endif @@ -462,6 +467,11 @@ nextfile(IOBUF **curfile, bool skipping) /* IOBUF management: */ errno = 0; fd = devopen(fname, binmode("r")); + if (fd == INVALID_HANDLE && errno == EMFILE) { + close_one(); + close_one(); + fd = devopen(fname, binmode("r")); + } errcode = errno; if (! do_traditional) update_ERRNO_int(errno); @@ -948,13 +958,13 @@ redirect(NODE *redir_exp, int redirtype, int *errflg) if (errno == EMFILE || errno == ENFILE) close_one(); #ifdef VMS - /* Alpha/VMS V7.1's C RTL is returning this instead + /* Alpha/VMS V7.1+ C RTL is returning these instead of EMFILE (haven't tried other post-V6.2 systems) */ -#define SS$_EXQUOTA 0x001C -#define SS$_EXBYTLM 0x2a14 /* VMS 8.4 seen */ - else if (errno == EIO && + else if ((errno == EIO || errno == EVMSERR) && (vaxc$errno == SS$_EXQUOTA || - vaxc$errno == SS$_EXBYTLM)) + vaxc$errno == SS$_EXBYTLM || + vaxc$errno == RMS$_ACC || + vaxc$errno == RMS$_SYN)) close_one(); #endif else { -- cgit v1.2.3 From 664868f72b741ba448398d609e18a4cbb1ca20be Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 10 Jan 2014 12:28:09 +0200 Subject: Update some copyright years. --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index ac1855ba..3e527da0 100644 --- a/io.c +++ b/io.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2013 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2014 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. -- cgit v1.2.3