diff options
author | Miloslav Trmac <mitr@fedoraproject.org> | 2006-09-26 16:36:32 +0000 |
---|---|---|
committer | Miloslav Trmac <mitr@fedoraproject.org> | 2006-09-26 16:36:32 +0000 |
commit | 53e5ec8613055d94ca7d28382b5499c770ec6fac (patch) | |
tree | a762cfad1e58b1a0d67f04c51909ea72c242341e /tcsh-6.14.00-wide-seeks.patch | |
parent | 6c0b69de07daa610e3fca0cf3371df5ed38bf9f6 (diff) | |
download | tcsh-rebase-6.19.00-53e5ec8613055d94ca7d28382b5499c770ec6fac.tar.gz tcsh-rebase-6.19.00-53e5ec8613055d94ca7d28382b5499c770ec6fac.tar.xz tcsh-rebase-6.19.00-53e5ec8613055d94ca7d28382b5499c770ec6fac.zip |
- Fix error handling in tcsh-6.14.00-wide-seeks.patch
Diffstat (limited to 'tcsh-6.14.00-wide-seeks.patch')
-rw-r--r-- | tcsh-6.14.00-wide-seeks.patch | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/tcsh-6.14.00-wide-seeks.patch b/tcsh-6.14.00-wide-seeks.patch index 53c22a0..0375534 100644 --- a/tcsh-6.14.00-wide-seeks.patch +++ b/tcsh-6.14.00-wide-seeks.patch @@ -1,5 +1,5 @@ ---- tcsh/sh.h 2005-03-25 19:46:41.000000000 +0100 -+++ tcsh-6.14.00/sh.h 2006-07-03 03:45:30.000000000 +0200 +--- tcsh-6.14.00/sh.h.wide-seeks 2005-03-25 19:46:41.000000000 +0100 ++++ tcsh-6.14.00/sh.h 2006-09-26 18:26:33.000000000 +0200 @@ -801,6 +801,13 @@ * exactly one if the input is seekable and tell is available. * In other cases, the shell buffers enough blocks to keep all loops @@ -23,21 +23,32 @@ Char* _c_seek; } fc; #define f_seek fc._f_seek -diff -u tcsh-6.14.00/sh.lex.c tcsh-6.14.00/sh.lex.c ---- tcsh-6.14.00/sh.lex.c 2006-07-03 03:46:11.000000000 +0200 -+++ tcsh-6.14.00/sh.lex.c 2006-07-05 16:31:51.000000000 +0200 -@@ -1736,7 +1736,9 @@ +--- tcsh-6.14.00/sh.lex.c.wide-seeks 2006-09-26 18:26:33.000000000 +0200 ++++ tcsh-6.14.00/sh.lex.c 2006-09-26 18:28:10.000000000 +0200 +@@ -1694,7 +1694,8 @@ + char cbuf[BUFSIZE + 1]; + ssize_t res, r; + size_t partial; +- ++ int err; ++ + assert (nchars <= sizeof(cbuf)/sizeof(*cbuf)); + USE(use_fclens); + res = 0; +@@ -1736,7 +1737,11 @@ memmove(cbuf, cbuf + i, partial - i); partial -= i; } while (partial != 0 && nchars != 0); - /* Throwing away possible partial multibyte characters on error */ + /* Throwing away possible partial multibyte characters on error if the + stream is not seekable */ ++ err = errno; + lseek(fildes, -(off_t)partial, L_INCR); ++ errno = err; return res != 0 ? res : r; } -@@ -1753,7 +1755,13 @@ +@@ -1753,7 +1758,13 @@ (void) lseek(SHIN, fseekp, L_SET); } if (fseekp == feobp) { @@ -52,7 +63,7 @@ diff -u tcsh-6.14.00/sh.lex.c tcsh-6.14.00/sh.lex.c do c = wide_read(SHIN, fbuf[0], BUFSIZE, 1); while (c < 0 && errno == EINTR); -@@ -1926,9 +1934,9 @@ +@@ -1926,9 +1937,9 @@ return; case TCSH_F_SEEK: #ifdef WIDE_STRINGS |