summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/sh.sem.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2004-07-11 02:17:56 +0000
committermp <mp@FreeBSD.org>2004-07-11 02:17:56 +0000
commitbbd1addf8f9452690ad13ce5b875ee4cc9633958 (patch)
tree730792f0cc19f3bb4fb663fe727589381f5901be /contrib/tcsh/sh.sem.c
parentf2c2aa29b7d05c53575ab7ce4dc5870fd33a1310 (diff)
downloadFreeBSD-src-bbd1addf8f9452690ad13ce5b875ee4cc9633958.zip
FreeBSD-src-bbd1addf8f9452690ad13ce5b875ee4cc9633958.tar.gz
Import of tcsh-6.13.00
Diffstat (limited to 'contrib/tcsh/sh.sem.c')
-rw-r--r--contrib/tcsh/sh.sem.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/tcsh/sh.sem.c b/contrib/tcsh/sh.sem.c
index cebba05..a7839af 100644
--- a/contrib/tcsh/sh.sem.c
+++ b/contrib/tcsh/sh.sem.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.sem.c,v 3.60 2004/02/23 15:04:36 christos Exp $ */
/*
* sh.sem.c: I/O redirections and job forking. A touchy issue!
* Most stuff with builtins is incorrect
@@ -33,7 +33,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.sem.c,v 3.56 2002/03/08 17:36:46 christos Exp $")
+RCSID("$Id: sh.sem.c,v 3.60 2004/02/23 15:04:36 christos Exp $")
#include "tc.h"
#include "tw.h"
@@ -859,12 +859,12 @@ doio(t, pipein, pipeout)
(void) strncpy(tmp, short2str(cp), MAXPATHLEN);
tmp[MAXPATHLEN] = '\0';
xfree((ptr_t) cp);
- if ((fd = open(tmp, O_RDONLY)) < 0)
+ if ((fd = open(tmp, O_RDONLY|O_LARGEFILE)) < 0)
stderror(ERR_SYSTEM, tmp, strerror(errno));
-#ifdef O_LARGEFILE
/* allow input files larger than 2Gb */
+#ifndef WINNT_NATIVE
(void) fcntl(fd, O_LARGEFILE, 0);
-#endif /* O_LARGEFILE */
+#endif /*!WINNT_NATIVE*/
(void) dmove(fd, 0);
}
else if (flags & F_PIPEIN) {
@@ -875,7 +875,7 @@ doio(t, pipein, pipeout)
}
else if ((flags & F_NOINTERRUPT) && tpgrp == -1) {
(void) close(0);
- (void) open(_PATH_DEVNULL, O_RDONLY);
+ (void) open(_PATH_DEVNULL, O_RDONLY|O_LARGEFILE);
}
else {
(void) close(0);
@@ -905,9 +905,9 @@ doio(t, pipein, pipeout)
(void) dcopy(SHDIAG, 2);
if ((flags & F_APPEND) != 0) {
#ifdef O_APPEND
- fd = open(tmp, O_WRONLY | O_APPEND);
+ fd = open(tmp, O_WRONLY|O_APPEND|O_LARGEFILE);
#else /* !O_APPEND */
- fd = open(tmp, O_WRONLY);
+ fd = open(tmp, O_WRONLY|O_LARGEFILE);
(void) lseek(fd, (off_t) 0, L_XTND);
#endif /* O_APPEND */
}
@@ -921,10 +921,10 @@ doio(t, pipein, pipeout)
}
if ((fd = creat(tmp, 0666)) < 0)
stderror(ERR_SYSTEM, tmp, strerror(errno));
-#ifdef O_LARGEFILE
/* allow input files larger than 2Gb */
+#ifndef WINNT_NATIVE
(void) fcntl(fd, O_LARGEFILE, 0);
-#endif /* O_LARGEFILE */
+#endif /*!WINNT_NATIVE*/
}
(void) dmove(fd, 1);
is1atty = isatty(1);
OpenPOWER on IntegriCloud