aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:35:31 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:35:31 +0300
commit8ceb5f934787eb7be5fb452fb39179df66119954 (patch)
tree56a80fc5c118f7c2ebad7ab44bd8be048b2f7ec2 /io.c
parent2f83a4e72166e811a9f0b4726c19a3d5a0b17dcb (diff)
downloadegawk-8ceb5f934787eb7be5fb452fb39179df66119954.tar.gz
egawk-8ceb5f934787eb7be5fb452fb39179df66119954.tar.bz2
egawk-8ceb5f934787eb7be5fb452fb39179df66119954.zip
Move to gawk-2.15.6.
Diffstat (limited to 'io.c')
-rw-r--r--io.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/io.c b/io.c
index 7fe21ecf..03b73daa 100644
--- a/io.c
+++ b/io.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991, 1992, 1993 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-1995 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Progamming Language.
@@ -75,7 +75,8 @@ extern FILE *fdopen();
#include "popen.h"
#define popen(c,m) os_popen(c,m)
#define pclose(f) os_pclose(f)
-#elif defined (OS2) /* OS/2, but not family mode */
+#else
+#if defined (OS2) /* OS/2, but not family mode */
#if defined (_MSC_VER)
#define popen(c,m) _popen(c,m)
#define pclose(f) _pclose(f)
@@ -83,6 +84,7 @@ extern FILE *fdopen();
#else
extern FILE *popen();
#endif
+#endif
static struct redirect *red_head = NULL;
@@ -188,10 +190,10 @@ IOBUF *iop;
cnt = 0;
retval = 1;
} else {
- NR += 1;
- FNR += 1;
+ NR += 1;
+ FNR += 1;
+ set_record(begin, cnt, 1);
}
- set_record(begin, cnt, 1);
return retval;
}
@@ -524,8 +526,13 @@ int exitwarn;
if (status) {
char *s = strerror(errno);
- warning("failure status (%d) on %s close of \"%s\" (%s)",
- status, what, rp->value, s);
+ /*
+ * Too many people have complained about this.
+ * As of 2.15.6, it is now under lint control.
+ */
+ if (do_lint)
+ warning("failure status (%d) on %s close of \"%s\" (%s)",
+ status, what, rp->value, s);
if (! do_unix) {
/* set ERRNO too so that program can get at it */
@@ -646,7 +653,8 @@ devopen(name, mode)
const char *name, *mode;
{
int openfd = INVALID_HANDLE;
- const char *cp, *ptr;
+ const char *cp;
+ char *ptr;
int flag = 0;
struct stat buf;
extern double strtod();
@@ -806,7 +814,7 @@ const char *name, *mode;
char tbuf[BUFSIZ], *cp;
int i;
#if defined(NGROUPS_MAX) && NGROUPS_MAX > 0
-#if defined(atarist) || defined(__svr4__) || defined(__osf__)
+#if defined(atarist) || defined(__svr4__) || defined(__osf__) || defined(__bsdi__)
gid_t groupset[NGROUPS_MAX];
#else
int groupset[NGROUPS_MAX];