From e68ca1e849f70031535209c6b4a8ebc3ef9235e79daea73600f107ef5af2bf98 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 7 Feb 2011 12:46:12 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=23 --- ...00-history.dif => tcsh-6.17.02-history.dif | 24 +- tcsh-6.17.02.dif | 1214 ++++++++--------- tcsh.changes | 5 + tcsh.spec | 4 +- 4 files changed, 626 insertions(+), 621 deletions(-) rename tcsh-6.16.00-history.dif => tcsh-6.17.02-history.dif (85%) diff --git a/tcsh-6.16.00-history.dif b/tcsh-6.17.02-history.dif similarity index 85% rename from tcsh-6.16.00-history.dif rename to tcsh-6.17.02-history.dif index 8b6deb0..596db48 100644 --- a/tcsh-6.16.00-history.dif +++ b/tcsh-6.17.02-history.dif @@ -1,6 +1,6 @@ --- sh.c -+++ sh.c 2007-10-15 10:03:11.216084278 +0000 -@@ -1770,7 +1770,7 @@ static Char *jobargv[2] = {STRjobs, 0} ++++ sh.c 2007-10-15 10:03:11.000000000 +0000 +@@ -1811,7 +1811,7 @@ static Char *jobargv[2] = {STRjobs, 0} * and finally go through the normal error mechanism, which * gets a chance to make the shell go away. */ @@ -10,7 +10,7 @@ void pintr(void) --- sh.err.c -+++ sh.err.c 2009-03-25 10:35:16.552001834 +0000 ++++ sh.err.c 2009-03-25 10:35:17.000000000 +0000 @@ -51,6 +51,7 @@ char *seterr = NULL; /* Holds last err #define ERR_NAME 0x10000000 #define ERR_SILENT 0x20000000 @@ -19,8 +19,8 @@ #define ERR_SYNTAX 0 #define ERR_NOTALLOWED 1 -@@ -609,7 +610,8 @@ stderror(unsigned int id, ...) - * sh.print.c. +@@ -608,7 +609,8 @@ stderror(unsigned int id, ...) + * will go to 1/2 else to FSHOUT/FSHDIAG. See flush in sh.print.c. */ flush();/*FIXRESET*/ - haderr = 1; /* Now to diagnostic output */ @@ -29,7 +29,7 @@ if (flags & ERR_NAME) xprintf("%s: ", bname);/*FIXRESET*/ if ((flags & ERR_OLD)) { -@@ -650,5 +652,6 @@ stderror(unsigned int id, ...) +@@ -649,5 +651,6 @@ stderror(unsigned int id, ...) if (tpgrp > 0) (void) tcsetpgrp(FSHTTY, tpgrp); #endif @@ -39,7 +39,7 @@ } --- sh.h +++ sh.h 2007-10-11 22:00:00.000000000 +0000 -@@ -548,6 +548,7 @@ EXTERN int neednote IZERO; /* Need to +@@ -565,6 +565,7 @@ EXTERN int neednote IZERO; /* Need to EXTERN int noexec IZERO; /* Don't execute, just syntax check */ EXTERN int pjobs IZERO; /* want to print jobs if interrupted */ EXTERN int setintr IZERO; /* Set interrupts on/off -> Wait intr... */ @@ -49,9 +49,9 @@ EXTERN int noediting IZERO; /* initial $term defaulted to noedit */ --- sh.hist.c +++ sh.hist.c 2007-10-11 22:00:00.000000000 +0000 -@@ -425,9 +425,9 @@ rechist(Char *fname, int ref) - if (shist->vec[1] && eq(shist->vec[1], STRmerge)) - loadhist(fname, 1); +@@ -1279,9 +1279,9 @@ rechist(Char *fname, int ref) + setv(STRverbose, verb, VAR_READWRITE); + } fp = xcreat(short2str(fname), 0600); + cleanup_until(fname); if (fp == -1) { @@ -60,7 +60,7 @@ return; } ftmp = SHOUT; -@@ -437,7 +437,6 @@ rechist(Char *fname, int ref) +@@ -1291,7 +1291,6 @@ rechist(Char *fname, int ref) xclose(fp); SHOUT = ftmp; didfds = oldidfds; @@ -69,7 +69,7 @@ --- sh.print.c -+++ sh.print.c 2007-10-15 10:09:15.994329114 +0000 ++++ sh.print.c 2007-10-15 10:09:16.000000000 +0000 @@ -222,7 +222,8 @@ drainoline(void) void flush(void) diff --git a/tcsh-6.17.02.dif b/tcsh-6.17.02.dif index 68cbe95..787aa4e 100644 --- a/tcsh-6.17.02.dif +++ b/tcsh-6.17.02.dif @@ -9,7 +9,7 @@ +patch -p0 -s --suffix=.history < ../tcsh-6.15.00-history.dif --- Makefile.in +++ Makefile.in 2006-04-25 12:58:31.000000000 +0000 -@@ -510,12 +510,12 @@ vgrind: +@@ -591,12 +591,12 @@ vgrind: @vgrind -t -x -h Index index >/crp/bill/csh/index.t install-strip: install @@ -23,612 +23,6 @@ chmod 755 ${DESTBIN}/tcsh$(EXEEXT) install.man: tcsh.man ---- config_f.h -+++ config_f.h 2007-07-13 10:47:30.000000000 +0000 -@@ -37,7 +37,7 @@ - */ - #ifndef _h_config_f - #define _h_config_f -- -+#include - /* - * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars - * This fixes up quoting problems and eases implementation -@@ -63,12 +63,19 @@ - */ - #if defined (NLS) && defined (HAVE_CATGETS) - # define NLS_CATALOGS -+#else -+# error No NLS Catalogs - #endif - - /* - * LOGINFIRST Source ~/.login before ~/.cshrc - */ --#undef LOGINFIRST -+#define LOGINFIRST -+ -+/* -+ * USERLOGINFIRST Source ~/.login before ~/.cshrc -+ */ -+#undef USERLOGINFIRST - - /* - * VIDEFAULT Make the VI mode editor the default -@@ -143,7 +150,7 @@ - * This can be much slower and no memory statistics will be - * provided. - */ --#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) -+#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined(__GLIBC__) - # define SYSMALLOC - #else - # undef SYSMALLOC -@@ -162,7 +169,7 @@ - * successful, set $REMOTEHOST to the name or address of the - * host - */ --#define REMOTEHOST -+#undef REMOTEHOST - - /* - * COLOR_LS_F Do you want to use builtin color ls-F ? -@@ -185,7 +192,7 @@ - * RCSID This defines if we want rcs strings in the binary or not - * - */ --#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) -+#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) && !defined(__linux__) - # ifndef __GNUC__ - # define RCSID(id) static char *rcsid = (id); - # else ---- glob.h -+++ glob.h 2006-04-25 12:58:31.000000000 +0000 -@@ -72,6 +72,7 @@ typedef struct { - #define GLOB_NOSYS (-4) /* Implementation does not support function. */ - - /* #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */ -+#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE || defined _GNU_SOURCE) - #define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ - #define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ - #define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ -@@ -82,7 +83,7 @@ typedef struct { - #define GLOB_QUOTE 0x2000 /* XXX: source compatibility */ - - #define GLOB_ABEND GLOB_ABORTED /* source compatibility */ --/* #endif */ -+#endif - - int glob (const char *, int, int (*)(const char *, int), glob_t *); - void globfree (glob_t *); ---- host.defs -+++ host.defs 2007-07-13 12:05:58.000000000 +0000 -@@ -110,7 +110,7 @@ newcode : - /* - * On convex, find the current machine type via the getsysinfo() syscall - */ --#include -+# include - - /* From: fox@convex.com (David DeSimone) */ - static char * -@@ -168,6 +168,30 @@ getconvex(void) - endcode : - enddef : - -+newdef : defined(linux) || defined(__GNU__) || defined(__GLIBC__) -+comment : Linus Torvalds's linux -+newcode : -+# include -+char * getmach(void) -+{ -+ static char* mach = "unknown"; -+ struct utsname uts; -+ if (uname(&uts) == 0) -+ mach = uts.machine; -+ return mach; -+} -+char * gethost(void) -+{ -+ static char host[256]; -+ struct utsname uts; -+ if (uname(&uts) == 0) -+ xsnprintf(host, sizeof(host), "%s-linux", uts.machine); -+ else -+ xsnprintf(host, sizeof(host), "unknown-linux"); -+ return host; -+} -+endcode : -+enddef : - - newcode : - void -@@ -434,26 +458,29 @@ machtype: defined(M_i386) : "i386" - enddef : - - --newdef : defined(linux) || defined(__GNU__) || defined(__GLIBC__) --comment : Linus Torvalds's linux -+vendor : defined(SuSE) : "suse" - vendor : defined(M_intel) : "intel" - hosttype: defined(__ia64__) : "ia64-linux" - hosttype: defined(__powerpc64__) : "powerpc64-linux" - hosttype: defined(__s390x__) : "s390x-linux" - hosttype: defined(__s390__) : "s390-linux" - hosttype: defined(__x86_64__) : "x86_64-linux" --hosttype: defined(M_i586) : "i586-linux" --hosttype: defined(M_i486) : "i486-linux" -+hosttype: defined(M_i686) : "i686-linux" -+hosttype: defined(M_i586) : "i586-linux" -+hosttype: defined(M_i486) : "i486-linux" - hosttype: defined(M_i386) : "i386-linux" -+hosttype: : gethost() - ostype : : "linux" - machtype: defined(__ia64__) : "ia64" - machtype: defined(__powerpc64__) : "powerpc64" - machtype: defined(__s390x__) : "s390x" - machtype: defined(__s390__) : "s390" - machtype: defined(__x86_64__) : "x86_64" --machtype: defined(M_i586) : "i586" --machtype: defined(M_i486) : "i486" -+machtype: defined(M_i686) : "i686" -+machtype: defined(M_i586) : "i586" -+machtype: defined(M_i486) : "i486" - machtype: defined(M_i386) : "i386" -+machtype: : getmach() - vendor : defined(__alpha) : "dec" - vendor : defined(PPC) : "apple" - hosttype: defined(__alpha) : "alpha" -@@ -464,6 +491,7 @@ machtype: defined(M_mipsel) : "mipsel - machtype: defined(M_mipseb) : "mipseb" - machtype: defined(M_mips64el) : "mips64el" - machtype: defined(M_mips64eb) : "mips64eb" -+machtype: : getmach() - enddef : - - ---- pathnames.h -+++ pathnames.h 2006-04-25 12:58:31.000000000 +0000 -@@ -33,7 +33,7 @@ - #ifndef _h_pathnames - #define _h_pathnames - --#ifdef BSD4_4 -+#if defined(BSD4_4) || defined(linux) - # include - #endif - -@@ -84,7 +84,7 @@ - # endif /* !_PATH_DOTLOGIN */ - #endif /* sgi || OREO || cray || AMIX || CDC */ - --#if (defined(_CRAYCOM) || defined(Lynx)) && !defined(_PATH_TCSHELL) -+#if (defined(_CRAYCOM) || defined(Lynx) || defined(linux)) && !defined(_PATH_TCSHELL) - # define _PATH_TCSHELL "/bin/tcsh" /* 1st class shell */ - #endif /* _CRAYCOM && !_PATH_TCSHELL */ - ---- sh.c -+++ sh.c 2010-12-10 16:10:45.187927025 +0000 -@@ -501,7 +501,8 @@ main(int argc, char **argv) - if (loginsh || (uid == 0)) { - if (*cp) { - /* only for login shells or root and we must have a tty */ -- if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) { -+ if (((cp2 = Strrchr(cp, (Char) '/')) != NULL) && -+ (Strncmp(cp, STRptssl, 3) != 0)) { - cp2 = cp2 + 1; - } - else -@@ -768,7 +769,16 @@ main(int argc, char **argv) - xfree(tmp2); - } - #else /* !WINNT_NATIVE */ -+#if defined(__GLIBC__) && __GLIBC__ >= 2 -+ { -+ char *tmpdir = getenv ("TMPDIR"); -+ if (!tmpdir) -+ tmpdir = "/tmp"; -+ shtemp = Strspl(SAVE(tmpdir), SAVE("/sh.XXXXXX")); /* For << */ -+ } -+#else - shtemp = Strspl(STRtmpsh, doldol); /* For << */ -+#endif /* __GLIBC__ */ - #endif /* WINNT_NATIVE */ - - /* -@@ -792,9 +802,9 @@ main(int argc, char **argv) - /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ - #if defined(DSPMBYTE) - #if defined(NLS) && defined(LC_CTYPE) -- if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL) && !adrof(CHECK_MBYTEVAR)) -+ if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL)) - #else -- if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) -+ if ((tcp = getenv("LANG")) != NULL) - #endif - { - autoset_dspmbyte(str2short(tcp)); -@@ -1291,6 +1313,9 @@ main(int argc, char **argv) - setintr = osetintr; - parintr = oparintr; - } -+#ifndef USERLOGINFIRST -+# undef LOGINFIRST -+#endif - #ifdef LOGINFIRST - if (loginsh) - (void) srccat(varval(STRhome), STRsldotlogin); ---- sh.dol.c -+++ sh.dol.c 2007-07-13 11:51:58.000000000 +0000 -@@ -30,6 +30,7 @@ - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -+#include - #include "sh.h" - - RCSID("$tcsh: sh.dol.c,v 3.77 2009/06/19 16:25:00 christos Exp $") -@@ -938,6 +939,31 @@ heredoc(Char *term) - Char *lbp, *obp, *mbp; - Char **vp; - int quoted; -+//#undef __GLIBC__ -+#if defined(__GLIBC__) && __GLIBC__ >= 2 -+ char *tmp = short2str(shtemp); -+ char *dot = strrchr(tmp, '.'); -+ int fd; -+ -+ if (!dot) -+ stderror(ERR_NAME | ERR_NOMATCH); -+ strcpy(dot, ".XXXXXX"); -+ -+ if ((fd = mkstemp(tmp)) < 0) -+ stderror(ERR_SYSTEM, tmp, strerror(errno)); -+ xclose(fd); -+ -+# ifndef O_TEMPORARY -+# define O_TEMPORARY 0 -+# endif -+ xclose(0); -+ if (xopen(tmp, O_RDWR|O_TEMPORARY) == -1) { -+ int oerrno = errno; -+ (void) unlink(tmp); -+ errno = oerrno; -+ stderror(ERR_SYSTEM, tmp, strerror(errno)); -+ } -+#else /* !__GLIBC__ */ - char *tmp; - #ifndef WINNT_NATIVE - struct timeval tv; -@@ -977,6 +1003,7 @@ again: - errno = oerrno; - stderror(ERR_SYSTEM, tmp, strerror(errno)); - } -+#endif /* !__GLIBC__ */ - (void) unlink(tmp); /* 0 0 inode! */ - Dv[0] = term; - Dv[1] = NULL; ---- sh.func.c -+++ sh.func.c 2010-12-09 09:15:06.106883731 +0000 -@@ -1404,14 +1404,6 @@ dosetenv(Char **v, struct command *c) - } - #endif /* apollo */ - -- /* dspkanji/dspmbyte autosetting */ -- /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ --#if defined(DSPMBYTE) -- if(eq(vp, STRLANG) && !adrof(CHECK_MBYTEVAR)) { -- autoset_dspmbyte(lp); -- } --#endif -- - if (islocale_var(vp)) { - #ifdef NLS - int k; -@@ -1433,6 +1429,13 @@ dosetenv(Char **v, struct command *c) - nlsclose(); - nlsinit(); - # endif /* NLS_CATALOGS */ -+# if defined(DSPMBYTE) -+ /* dspkanji/dspmbyte autosetting */ -+ /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ -+ if (eq(vp, STRLANG)) { -+ autoset_dspmbyte(lp); -+ } -+# endif - # ifdef SETLOCALEBUG - dont_free = 0; - # endif /* SETLOCALEBUG */ ---- sh.h -+++ sh.h 2007-07-13 11:07:44.000000000 +0000 -@@ -272,7 +272,7 @@ static inline void ignore(intptr_t a) - # else - # include - # endif /* _UWIN */ --# if SYSVREL > 3 -+# if SYSVREL > 3 || defined(linux) - # undef TIOCGLTC /* we don't need those, since POSIX has them */ - # undef TIOCSLTC - # undef CSWTCH -@@ -326,6 +326,12 @@ static inline void ignore(intptr_t a) - #if !((defined(SUNOS4) || defined(_MINIX) /* || defined(DECOSF1) */) && defined(TERMIO)) - # if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE) - # include -+# if SYSVREL > 3 || defined(linux) -+# undef TIOCGLTC /* we don't need those, since POSIX has them */ -+# undef TIOCSLTC -+# undef CSWTCH -+# define CSWTCH _POSIX_VDISABLE /* So job control works */ -+# endif /* SYSVREL > 3 */ - # endif - #endif - -@@ -1190,9 +1196,7 @@ extern char **environ; - # ifdef NLS_CATALOGS - # if defined(linux) || defined(__GNU__) || defined(__GLIBC__) - # include --# ifdef notdef --# include /* Has this changed ? */ --# endif -+# include - # include - # endif - # ifdef SUNOS4 ---- sh.sem.c -+++ sh.sem.c 2006-04-25 12:58:31.000000000 +0000 -@@ -629,10 +629,19 @@ execute(struct command *t, volatile int - * possible stopping - */ - if (bifunc) { -- func(t, bifunc); -- if (forked) -+ if (forked) { -+ func(t, bifunc); - exitstat(); -- else { -+ } else { -+ jmp_buf_t oldexit; -+ int ohaderr = haderr; -+ -+ getexit(oldexit); -+ if (setexit() == 0) -+ func(t, bifunc); -+ resexit(oldexit); -+ haderr = ohaderr; -+ - if (adrof(STRprintexitvalue)) { - int rv = getn(varval(STRstatus)); - if (rv != 0) ---- sh.set.c -+++ sh.set.c 2010-12-09 11:07:56.404647849 +0000 -@@ -1107,11 +1108,11 @@ update_dspmbyte_vars(void) - dstr1 = vp->vec[0]; - if(eq (dstr1, STRsjis)) - iskcode = 1; -- else if (eq(dstr1, STReuc)) -+ else if (eq(dstr1, STReuc) || eq(dstr1, STReucjp) || eq(dstr1, STRGB2312)) - iskcode = 2; - else if (eq(dstr1, STRbig5)) - iskcode = 3; -- else if (eq(dstr1, STRutf8)) -+ else if (eq(dstr1, STRutf8) || eq(dstr1, STRutfx8)) - iskcode = 4; - else if ((dstr1[0] - '0') >= 0 && (dstr1[0] - '0') <= 3) { - iskcode = 0; -@@ -1195,7 +1196,7 @@ update_dspmbyte_vars(void) - _enable_mbdisp = 0; - dspmbyte_ls = 0; - } --#ifdef MBYTEDEBUG /* Sorry, use for beta testing */ -+# ifdef MBYTEDEBUG /* Sorry, use for beta testing */ - { - Char mbmapstr[300]; - for (lp = 0; lp < 256; lp++) -@@ -1203,7 +1204,7 @@ update_dspmbyte_vars(void) - mbmapstr[lp] = 0; - setcopy(STRmbytemap, mbmapstr, VAR_READWRITE); - } --#endif /* MBYTEMAP */ -+# endif /* MBYTEMAP */ - } - - /* dspkanji/dspmbyte autosetting */ -@@ -1212,6 +1213,7 @@ void - autoset_dspmbyte(const Char *pcp) - { - int i; -+ struct varent *vp; - static const struct dspm_autoset_Table { - Char *n; - Char *v; -@@ -1234,13 +1236,18 @@ autoset_dspmbyte(const Char *pcp) - #if defined(HAVE_NL_LANGINFO) && defined(CODESET) - static const struct dspm_autoset_Table dspmc[] = { - { STRstarutfstar8, STRutf8 }, -+ { STRutfx8, STRutf8 }, - { STReuc, STReuc }, -+ { STReucjp, STReuc }, - { STRGB2312, STReuc }, - { STRLANGBIG5, STRbig5 }, - { NULL, NULL } - }; - Char *codeset; - -+ if ((vp = adrof(CHECK_MBYTEVAR))) -+ unsetv1(vp); -+ - codeset = str2short(nl_langinfo(CODESET)); - if (*codeset != '\0') { - for (i = 0; dspmc[i].n; i++) { ---- tc.alloc.c -+++ tc.alloc.c 2006-04-25 12:58:31.000000000 +0000 -@@ -486,7 +486,7 @@ smalloc(size_t n) - { - ptr_t ptr; - -- n = n ? n : 1; -+ n = n ? n+1 : 1; - - #ifdef HAVE_SBRK - if (membot == NULL) -@@ -509,7 +509,7 @@ srealloc(ptr_t p, size_t n) - { - ptr_t ptr; - -- n = n ? n : 1; -+ n = n ? n+1 : 1; - - #ifdef HAVE_SBRK - if (membot == NULL) -@@ -533,7 +533,7 @@ scalloc(size_t s, size_t n) - ptr_t ptr; - - n *= s; -- n = n ? n : 1; -+ n = n ? n+1 : 1; - - #ifdef HAVE_SBRK - if (membot == NULL) -@@ -558,8 +558,10 @@ scalloc(size_t s, size_t n) - void - sfree(ptr_t p) - { -- if (p && !dont_free) -+ if (p && !dont_free) { - free(p); -+ p = (ptr_t)NULL; -+ } - } - - #endif /* SYSMALLOC */ ---- tc.const.c -+++ tc.const.c 2006-04-25 12:58:31.000000000 +0000 -@@ -127,10 +127,12 @@ Char STRmmliteral[] = { '-', 'G', '\0' } - Char STRmmliteral[] = { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' }; - # endif - Char STReuc[] = { 'e', 'u', 'c', '\0' }; -+Char STReucjp[] = { 'e', 'u', 'c', '-', 'j', 'p', '\0' }; - Char STRsjis[] = { 's', 'j', 'i', 's', '\0' }; - Char STRbig5[] = { 'b', 'i', 'g', '5', '\0' }; - Char STRutf8[] = { 'u', 't', 'f', '8', '\0' }; - Char STRstarutfstar8[] = { '*', 'u', 't', 'f', '*', '8', '\0' }; -+Char STRutfx8[] = { 'u', 't', 'f', '-', '8', '\0' }; - Char STRGB2312[] = { 'g', 'b', '2', '3', '1', '2', '\0' }; - # ifdef MBYTEDEBUG /* Sorry, use for beta testing */ - Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' }; -@@ -430,7 +432,7 @@ Char STRkilldup[] = { 'k', 'i', 'l', 'l - Char STRshlvl[] = { 's', 'h', 'l', 'v', 'l', '\0' }; - Char STRKSHLVL[] = { 'S', 'H', 'L', 'V', 'L', '\0' }; - Char STRLANG[] = { 'L', 'A', 'N', 'G', '\0' }; --Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' }; -+Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' }; - Char STRLC_CTYPE[] = { 'L', 'C', '_', 'C', 'T', 'Y', 'P', 'E' ,'\0' }; - Char STRLC_NUMERIC[] = { 'L', 'C', '_', 'N', 'U', 'M', 'E', 'R', 'I', - 'C', '\0' }; ---- tc.func.c -+++ tc.func.c 2007-07-13 11:15:03.000000000 +0000 -@@ -689,9 +689,13 @@ auto_lock(void) - handle_pending_signals(); - errno = 0; - } -- if (spw != NULL) /* shadowed passwd */ -+ if (spw != NULL) /* shadowed passwd */ - srpp = spw->sp_pwdp; -+ else -+ srpp = pw->pw_passwd; /* nis extended passwd? */ - } -+ endspent(); -+ endpwent(); - - #else - -@@ -1902,7 +1906,7 @@ getremotehost(int dest_fd) - * have not caught up yet. - */ - addr.s_addr = inet_addr(name); -- if (addr.s_addr != (unsigned int)~0) -+ if (addr.s_addr != ~0U) - host = name; - else { - if (sptr != name) { ---- tc.str.c -+++ tc.str.c 2006-04-25 12:58:31.000000000 +0000 -@@ -278,7 +278,7 @@ s_strlen(const Char *str) - { - size_t n; - -- for (n = 0; *str++; n++) -+ for (n = 0; str && *str; n++, str++) - continue; - return (n); - } ---- tc.who.c -+++ tc.who.c 2006-04-25 12:58:31.000000000 +0000 -@@ -260,6 +260,9 @@ watch_login(int force) - } - stlast = sta.st_mtime; - #ifdef HAVE_GETUTENT -+# ifndef HAVE_UTMPX_H -+ utmpname( _PATH_UTMP ); -+# endif - setutent(); - #else - if ((utmpfd = xopen(TCSH_PATH_UTMP, O_RDONLY|O_LARGEFILE)) < 0) { ---- tcsh.man -+++ tcsh.man 2006-04-25 12:58:31.000000000 +0000 -@@ -567,7 +567,7 @@ Repeating \fIdabbrev-expand\fR without a - changes to the next previous word etc., skipping identical matches - much like \fIhistory-search-backward\fR does. - .TP 8 --.B delete-char \fR(not bound) -+.B delete-char \fR(bound to `Del' if using the standard \fI/etc/csh.cshrc\fR) - Deletes the character under the cursor. - See also \fIdelete-char-or-list-or-eof\fR. - .TP 8 ---- tw.color.c -+++ tw.color.c 2007-07-13 11:18:16.000000000 +0000 -@@ -177,7 +177,7 @@ parseLS_COLORS(const Char *value) - size_t i, len; - const Char *v; /* pointer in value */ - char *c; /* pointer in colors */ -- Extension *volatile e; /* pointer in extensions */ -+ static Extension *volatile e; /* pointer in extensions */ - jmp_buf_t osetexit; - size_t omark; - -@@ -305,12 +305,13 @@ print_color(const Char *fname, size_t le - break; - } - if (i == nvariables) { -- for (i = 0; i < nextensions; i++) -- if (len >= extensions[i].extension.len -- && strncmp(last - extensions[i].extension.len, -- extensions[i].extension.s, -- extensions[i].extension.len) == 0) { -- color = &extensions[i].color; -+ int j; -+ for (j = 0; j < nextensions; j++) -+ if (len >= extensions[j].extension.len -+ && strncmp(last - extensions[j].extension.len, -+ extensions[j].extension.s, -+ extensions[j].extension.len) == 0) { -+ color = &extensions[j].color; - break; - } - } ---- tw.h -+++ tw.h 2006-04-25 12:58:31.000000000 +0000 -@@ -33,6 +33,10 @@ - #ifndef _h_tw - #define _h_tw - -+#ifndef _h_sh -+# include "sh.h" -+#endif -+ - #define TW_PATH 0x1000 - #define TW_ZERO 0x0fff - --- config/linux +++ config/linux 2007-07-13 11:22:07.000000000 +0000 @@ -70,7 +70,7 @@ @@ -707,6 +101,170 @@ +#define MCLoadBySet NL_CAT_LOCALE + #endif /* _h_config */ +--- config_f.h ++++ config_f.h 2007-07-13 10:47:30.000000000 +0000 +@@ -37,7 +37,7 @@ + */ + #ifndef _h_config_f + #define _h_config_f +- ++#include + /* + * SHORT_STRINGS Use at least 16 bit characters instead of 8 bit chars + * This fixes up quoting problems and eases implementation +@@ -66,12 +66,19 @@ + */ + #if defined (NLS) && defined (HAVE_CATGETS) + # define NLS_CATALOGS ++#else ++# error No NLS Catalogs + #endif + + /* + * LOGINFIRST Source ~/.login before ~/.cshrc + */ +-#undef LOGINFIRST ++#define LOGINFIRST ++ ++/* ++ * USERLOGINFIRST Source ~/.login before ~/.cshrc ++ */ ++#undef USERLOGINFIRST + + /* + * VIDEFAULT Make the VI mode editor the default +@@ -146,7 +153,7 @@ + * This can be much slower and no memory statistics will be + * provided. + */ +-#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) ++#if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) || defined(__GLIBC__) + # define SYSMALLOC + #else + # undef SYSMALLOC +@@ -165,7 +172,7 @@ + * successful, set $REMOTEHOST to the name or address of the + * host + */ +-#define REMOTEHOST ++#undef REMOTEHOST + + /* + * COLOR_LS_F Do you want to use builtin color ls-F ? +@@ -188,7 +195,7 @@ + * RCSID This defines if we want rcs strings in the binary or not + * + */ +-#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) ++#if !defined(lint) && !defined(SABER) && !defined(__CLCC__) && !defined(__linux__) + # ifndef __GNUC__ + # define RCSID(id) static char *rcsid = (id); + # else +--- glob.h ++++ glob.h 2006-04-25 12:58:31.000000000 +0000 +@@ -72,6 +72,7 @@ typedef struct { + #define GLOB_NOSYS (-4) /* Implementation does not support function. */ + + /* #if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) */ ++#if (!defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _BSD_SOURCE || defined _GNU_SOURCE) + #define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ + #define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ + #define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ +@@ -84,7 +85,7 @@ typedef struct { + #define GLOB_DOT 0x8000 /* don't skip dotfiles (except . and ..) */ + + #define GLOB_ABEND GLOB_ABORTED /* source compatibility */ +-/* #endif */ ++#endif + + int glob (const char *, int, int (*)(const char *, int), glob_t *); + void globfree (glob_t *); +--- host.defs ++++ host.defs 2007-07-13 12:05:58.000000000 +0000 +@@ -110,7 +110,7 @@ newcode : + /* + * On convex, find the current machine type via the getsysinfo() syscall + */ +-#include ++# include + + /* From: fox@convex.com (David DeSimone) */ + static char * +@@ -168,6 +168,30 @@ getconvex(void) + endcode : + enddef : + ++newdef : defined(linux) || defined(__GNU__) || defined(__GLIBC__) ++comment : Linus Torvalds's linux ++newcode : ++# include ++char * getmach(void) ++{ ++ static char* mach = "unknown"; ++ struct utsname uts; ++ if (uname(&uts) == 0) ++ mach = uts.machine; ++ return mach; ++} ++char * gethost(void) ++{ ++ static char host[256]; ++ struct utsname uts; ++ if (uname(&uts) == 0) ++ xsnprintf(host, sizeof(host), "%s-linux", uts.machine); ++ else ++ xsnprintf(host, sizeof(host), "unknown-linux"); ++ return host; ++} ++endcode : ++enddef : + + newcode : + void +@@ -450,26 +474,29 @@ machtype: defined(M_i386) : "i386-pc- + enddef : + + +-newdef : defined(linux) || defined(__GNU__) || defined(__GLIBC__) +-comment : Linus Torvalds's linux ++vendor : defined(SuSE) : "suse" + vendor : defined(M_intel) : "intel" + hosttype: defined(__ia64__) : "ia64-linux" + hosttype: defined(__powerpc64__) : "powerpc64-linux" + hosttype: defined(__s390x__) : "s390x-linux" + hosttype: defined(__s390__) : "s390-linux" + hosttype: defined(__x86_64__) : "x86_64-linux" +-hosttype: defined(M_i586) : "i586-linux" +-hosttype: defined(M_i486) : "i486-linux" ++hosttype: defined(M_i686) : "i686-linux" ++hosttype: defined(M_i586) : "i586-linux" ++hosttype: defined(M_i486) : "i486-linux" + hosttype: defined(M_i386) : "i386-linux" ++hosttype: : gethost() + ostype : : "linux" + machtype: defined(__ia64__) : "ia64" + machtype: defined(__powerpc64__) : "powerpc64" + machtype: defined(__s390x__) : "s390x" + machtype: defined(__s390__) : "s390" + machtype: defined(__x86_64__) : "x86_64" +-machtype: defined(M_i586) : "i586" +-machtype: defined(M_i486) : "i486" ++machtype: defined(M_i686) : "i686" ++machtype: defined(M_i586) : "i586" ++machtype: defined(M_i486) : "i486" + machtype: defined(M_i386) : "i386" ++machtype: : getmach() + vendor : defined(__alpha) : "dec" + vendor : defined(PPC) : "apple" + hosttype: defined(__alpha) : "alpha" +@@ -480,6 +507,7 @@ machtype: defined(M_mipsel) : "mipsel + machtype: defined(M_mipseb) : "mipseb" + machtype: defined(M_mips64el) : "mips64el" + machtype: defined(M_mips64eb) : "mips64eb" ++machtype: : getmach() + enddef : + + --- nls/C/set1 +++ nls/C/set1 2006-04-25 12:58:31.000000000 +0000 @@ -1,5 +1,6 @@ @@ -815,3 +373,445 @@ $set 1 1 Синтаксична помилка 2 %s не дозволя╓ться +--- pathnames.h ++++ pathnames.h 2006-04-25 12:58:31.000000000 +0000 +@@ -33,7 +33,7 @@ + #ifndef _h_pathnames + #define _h_pathnames + +-#ifdef BSD4_4 ++#if defined(BSD4_4) || defined(linux) + # include + #endif + +@@ -84,7 +84,7 @@ + # endif /* !_PATH_DOTLOGIN */ + #endif /* sgi || OREO || cray || AMIX || CDC */ + +-#if (defined(_CRAYCOM) || defined(Lynx)) && !defined(_PATH_TCSHELL) ++#if (defined(_CRAYCOM) || defined(Lynx) || defined(linux)) && !defined(_PATH_TCSHELL) + # define _PATH_TCSHELL "/bin/tcsh" /* 1st class shell */ + #endif /* _CRAYCOM && !_PATH_TCSHELL */ + +--- sh.c ++++ sh.c 2010-12-10 16:10:45.000000000 +0000 +@@ -501,7 +501,8 @@ main(int argc, char **argv) + if (loginsh || (uid == 0)) { + if (*cp) { + /* only for login shells or root and we must have a tty */ +- if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) { ++ if (((cp2 = Strrchr(cp, (Char) '/')) != NULL) && ++ (Strncmp(cp, STRptssl, 3) != 0)) { + cp2 = cp2 + 1; + } + else +@@ -768,7 +769,16 @@ main(int argc, char **argv) + xfree(tmp2); + } + #else /* !WINNT_NATIVE */ ++#if defined(__GLIBC__) && __GLIBC__ >= 2 ++ { ++ char *tmpdir = getenv ("TMPDIR"); ++ if (!tmpdir) ++ tmpdir = "/tmp"; ++ shtemp = Strspl(SAVE(tmpdir), SAVE("/sh.XXXXXX")); /* For << */ ++ } ++#else + shtemp = Strspl(STRtmpsh, doldol); /* For << */ ++#endif /* __GLIBC__ */ + #endif /* WINNT_NATIVE */ + + /* +@@ -792,9 +802,9 @@ main(int argc, char **argv) + /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ + #if defined(DSPMBYTE) + #if defined(NLS) && defined(LC_CTYPE) +- if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL) && !adrof(CHECK_MBYTEVAR)) ++ if (((tcp = setlocale(LC_CTYPE, NULL)) != NULL || (tcp = getenv("LANG")) != NULL)) + #else +- if ((tcp = getenv("LANG")) != NULL && !adrof(CHECK_MBYTEVAR)) ++ if ((tcp = getenv("LANG")) != NULL) + #endif + { + autoset_dspmbyte(str2short(tcp)); +@@ -1303,6 +1313,9 @@ main(int argc, char **argv) + setintr = osetintr; + parintr = oparintr; + } ++#ifndef USERLOGINFIRST ++# undef LOGINFIRST ++#endif + #ifdef LOGINFIRST + if (loginsh) + (void) srccat(varval(STRhome), STRsldotlogin); +--- sh.dol.c ++++ sh.dol.c 2007-07-13 11:51:58.000000000 +0000 +@@ -30,6 +30,7 @@ + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ ++#include + #include "sh.h" + + RCSID("$tcsh: sh.dol.c,v 3.80 2010/05/12 15:02:47 christos Exp $") +@@ -938,6 +939,31 @@ heredoc(Char *term) + Char *lbp, *obp, *mbp; + Char **vp; + int quoted; ++//#undef __GLIBC__ ++#if defined(__GLIBC__) && __GLIBC__ >= 2 ++ char *tmp = short2str(shtemp); ++ char *dot = strrchr(tmp, '.'); ++ int fd; ++ ++ if (!dot) ++ stderror(ERR_NAME | ERR_NOMATCH); ++ strcpy(dot, ".XXXXXX"); ++ ++ if ((fd = mkstemp(tmp)) < 0) ++ stderror(ERR_SYSTEM, tmp, strerror(errno)); ++ xclose(fd); ++ ++# ifndef O_TEMPORARY ++# define O_TEMPORARY 0 ++# endif ++ xclose(0); ++ if (xopen(tmp, O_RDWR|O_TEMPORARY) == -1) { ++ int oerrno = errno; ++ (void) unlink(tmp); ++ errno = oerrno; ++ stderror(ERR_SYSTEM, tmp, strerror(errno)); ++ } ++#else /* !__GLIBC__ */ + char *tmp; + #ifndef WINNT_NATIVE + struct timeval tv; +@@ -978,6 +1004,7 @@ again: + errno = oerrno; + stderror(ERR_SYSTEM, tmp, strerror(errno)); + } ++#endif /* !__GLIBC__ */ + (void) unlink(tmp); /* 0 0 inode! */ + Dv[0] = term; + Dv[1] = NULL; +--- sh.func.c ++++ sh.func.c 2010-12-09 09:15:06.000000000 +0000 +@@ -1401,14 +1401,6 @@ dosetenv(Char **v, struct command *c) + } + #endif /* apollo */ + +- /* dspkanji/dspmbyte autosetting */ +- /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ +-#if defined(DSPMBYTE) +- if(eq(vp, STRLANG) && !adrof(CHECK_MBYTEVAR)) { +- autoset_dspmbyte(lp); +- } +-#endif +- + if (islocale_var(vp)) { + #ifdef NLS + int k; +@@ -1434,6 +1426,13 @@ dosetenv(Char **v, struct command *c) + nlsclose(); + nlsinit(); + # endif /* NLS_CATALOGS */ ++# if defined(DSPMBYTE) ++ /* dspkanji/dspmbyte autosetting */ ++ /* PATCH IDEA FROM Issei.Suzuki VERY THANKS */ ++ if (eq(vp, STRLANG)) { ++ autoset_dspmbyte(lp); ++ } ++# endif + # ifdef SETLOCALEBUG + dont_free = 0; + # endif /* SETLOCALEBUG */ +--- sh.h ++++ sh.h 2007-07-13 11:07:44.000000000 +0000 +@@ -284,7 +284,7 @@ typedef long tcsh_number_t; + # else + # include + # endif /* _UWIN */ +-# if SYSVREL > 3 ++# if SYSVREL > 3 || defined(linux) + # undef TIOCGLTC /* we don't need those, since POSIX has them */ + # undef TIOCSLTC + # undef CSWTCH +@@ -338,6 +338,12 @@ typedef long tcsh_number_t; + #if !((defined(SUNOS4) || defined(_MINIX) /* || defined(DECOSF1) */) && defined(TERMIO)) + # if !defined(_VMS_POSIX) && !defined(WINNT_NATIVE) + # include ++# if SYSVREL > 3 || defined(linux) ++# undef TIOCGLTC /* we don't need those, since POSIX has them */ ++# undef TIOCSLTC ++# undef CSWTCH ++# define CSWTCH _POSIX_VDISABLE /* So job control works */ ++# endif /* SYSVREL > 3 */ + # endif + #endif + +@@ -1203,9 +1209,7 @@ extern char **environ; + # ifdef NLS_CATALOGS + # if defined(linux) || defined(__GNU__) || defined(__GLIBC__) + # include +-# ifdef notdef +-# include /* Has this changed ? */ +-# endif ++# include + # include + # endif + # ifdef SUNOS4 +--- sh.sem.c ++++ sh.sem.c 2006-04-25 12:58:31.000000000 +0000 +@@ -629,10 +629,19 @@ execute(struct command *t, volatile int + * possible stopping + */ + if (bifunc) { +- func(t, bifunc); +- if (forked) ++ if (forked) { ++ func(t, bifunc); + exitstat(); +- else { ++ } else { ++ jmp_buf_t oldexit; ++ int ohaderr = haderr; ++ ++ getexit(oldexit); ++ if (setexit() == 0) ++ func(t, bifunc); ++ resexit(oldexit); ++ haderr = ohaderr; ++ + if (adrof(STRprintexitvalue)) { + int rv = getn(varval(STRstatus)); + if (rv != 0) +--- sh.set.c ++++ sh.set.c 2010-12-09 11:07:56.000000000 +0000 +@@ -1115,11 +1115,11 @@ update_dspmbyte_vars(void) + dstr1 = vp->vec[0]; + if(eq (dstr1, STRsjis)) + iskcode = 1; +- else if (eq(dstr1, STReuc)) ++ else if (eq(dstr1, STReuc) || eq(dstr1, STReucjp) || eq(dstr1, STRGB2312)) + iskcode = 2; + else if (eq(dstr1, STRbig5)) + iskcode = 3; +- else if (eq(dstr1, STRutf8)) ++ else if (eq(dstr1, STRutf8) || eq(dstr1, STRutfx8)) + iskcode = 4; + else if ((dstr1[0] - '0') >= 0 && (dstr1[0] - '0') <= 3) { + iskcode = 0; +@@ -1203,7 +1203,7 @@ update_dspmbyte_vars(void) + _enable_mbdisp = 0; + dspmbyte_ls = 0; + } +-#ifdef MBYTEDEBUG /* Sorry, use for beta testing */ ++# ifdef MBYTEDEBUG /* Sorry, use for beta testing */ + { + Char mbmapstr[300]; + for (lp = 0; lp < 256; lp++) +@@ -1211,7 +1211,7 @@ update_dspmbyte_vars(void) + mbmapstr[lp] = 0; + setcopy(STRmbytemap, mbmapstr, VAR_READWRITE); + } +-#endif /* MBYTEMAP */ ++# endif /* MBYTEMAP */ + } + + /* dspkanji/dspmbyte autosetting */ +@@ -1220,6 +1220,7 @@ void + autoset_dspmbyte(const Char *pcp) + { + int i; ++ struct varent *vp; + static const struct dspm_autoset_Table { + Char *n; + Char *v; +@@ -1242,13 +1243,18 @@ autoset_dspmbyte(const Char *pcp) + #if defined(HAVE_NL_LANGINFO) && defined(CODESET) + static const struct dspm_autoset_Table dspmc[] = { + { STRstarutfstar8, STRutf8 }, ++ { STRutfx8, STRutf8 }, + { STReuc, STReuc }, ++ { STReucjp, STReuc }, + { STRGB2312, STReuc }, + { STRLANGBIG5, STRbig5 }, + { NULL, NULL } + }; + Char *codeset; + ++ if ((vp = adrof(CHECK_MBYTEVAR))) ++ unsetv1(vp); ++ + codeset = str2short(nl_langinfo(CODESET)); + if (*codeset != '\0') { + for (i = 0; dspmc[i].n; i++) { +--- tc.alloc.c ++++ tc.alloc.c 2006-04-25 12:58:31.000000000 +0000 +@@ -486,7 +486,7 @@ smalloc(size_t n) + { + ptr_t ptr; + +- n = n ? n : 1; ++ n = n ? n+1 : 1; + + #ifdef HAVE_SBRK + if (membot == NULL) +@@ -509,7 +509,7 @@ srealloc(ptr_t p, size_t n) + { + ptr_t ptr; + +- n = n ? n : 1; ++ n = n ? n+1 : 1; + + #ifdef HAVE_SBRK + if (membot == NULL) +@@ -533,7 +533,7 @@ scalloc(size_t s, size_t n) + ptr_t ptr; + + n *= s; +- n = n ? n : 1; ++ n = n ? n+1 : 1; + + #ifdef HAVE_SBRK + if (membot == NULL) +@@ -558,8 +558,10 @@ scalloc(size_t s, size_t n) + void + sfree(ptr_t p) + { +- if (p && !dont_free) ++ if (p && !dont_free) { + free(p); ++ p = (ptr_t)NULL; ++ } + } + + #endif /* SYSMALLOC */ +--- tc.const.c ++++ tc.const.c 2006-04-25 12:58:31.000000000 +0000 +@@ -129,10 +129,12 @@ Char STRmmliteral[] = { '-', 'G', '\0' } + Char STRmmliteral[] = { '-', '-', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\0' }; + # endif + Char STReuc[] = { 'e', 'u', 'c', '\0' }; ++Char STReucjp[] = { 'e', 'u', 'c', '-', 'j', 'p', '\0' }; + Char STRsjis[] = { 's', 'j', 'i', 's', '\0' }; + Char STRbig5[] = { 'b', 'i', 'g', '5', '\0' }; + Char STRutf8[] = { 'u', 't', 'f', '8', '\0' }; + Char STRstarutfstar8[] = { '*', 'u', 't', 'f', '*', '8', '\0' }; ++Char STRutfx8[] = { 'u', 't', 'f', '-', '8', '\0' }; + Char STRGB2312[] = { 'g', 'b', '2', '3', '1', '2', '\0' }; + # ifdef MBYTEDEBUG /* Sorry, use for beta testing */ + Char STRmbytemap[] = { 'm', 'b', 'y', 't', 'e', 'm', 'a', 'p', '\0' }; +@@ -436,7 +438,7 @@ Char STRkilldup[] = { 'k', 'i', 'l', 'l + Char STRshlvl[] = { 's', 'h', 'l', 'v', 'l', '\0' }; + Char STRKSHLVL[] = { 'S', 'H', 'L', 'V', 'L', '\0' }; + Char STRLANG[] = { 'L', 'A', 'N', 'G', '\0' }; +-Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' }; ++Char STRLC_ALL[] = { 'L', 'C', '_', 'A', 'L', 'L', '\0' }; + Char STRLC_CTYPE[] = { 'L', 'C', '_', 'C', 'T', 'Y', 'P', 'E' ,'\0' }; + Char STRLC_NUMERIC[] = { 'L', 'C', '_', 'N', 'U', 'M', 'E', 'R', 'I', + 'C', '\0' }; +--- tc.func.c ++++ tc.func.c 2007-07-13 11:15:03.000000000 +0000 +@@ -689,9 +689,13 @@ auto_lock(void) + handle_pending_signals(); + errno = 0; + } +- if (spw != NULL) /* shadowed passwd */ ++ if (spw != NULL) /* shadowed passwd */ + srpp = spw->sp_pwdp; ++ else ++ srpp = pw->pw_passwd; /* nis extended passwd? */ + } ++ endspent(); ++ endpwent(); + + #else + +@@ -1902,7 +1906,7 @@ getremotehost(int dest_fd) + * have not caught up yet. + */ + addr.s_addr = inet_addr(name); +- if (addr.s_addr != (unsigned int)~0) ++ if (addr.s_addr != ~0U) + host = name; + else { + if (sptr != name) { +--- tc.str.c ++++ tc.str.c 2006-04-25 12:58:31.000000000 +0000 +@@ -335,7 +335,7 @@ s_strlen(const Char *str) + { + size_t n; + +- for (n = 0; *str++; n++) ++ for (n = 0; str && *str; n++, str++) + continue; + return (n); + } +--- tc.who.c ++++ tc.who.c 2006-04-25 12:58:31.000000000 +0000 +@@ -260,6 +260,9 @@ watch_login(int force) + } + stlast = sta.st_mtime; + #ifdef HAVE_GETUTENT ++# ifndef HAVE_UTMPX_H ++ utmpname( _PATH_UTMP ); ++# endif + setutent(); + #else + if ((utmpfd = xopen(TCSH_PATH_UTMP, O_RDONLY|O_LARGEFILE)) < 0) { +--- tcsh.man ++++ tcsh.man 2006-04-25 12:58:31.000000000 +0000 +@@ -578,7 +578,7 @@ Repeating \fIdabbrev-expand\fR without a + changes to the next previous word etc., skipping identical matches + much like \fIhistory-search-backward\fR does. + .TP 8 +-.B delete-char \fR(not bound) ++.B delete-char \fR(bound to `Del' if using the standard \fI/etc/csh.cshrc\fR) + Deletes the character under the cursor. + See also \fIdelete-char-or-list-or-eof\fR. + .TP 8 +--- tw.color.c ++++ tw.color.c 2007-07-13 11:18:16.000000000 +0000 +@@ -177,7 +177,7 @@ parseLS_COLORS(const Char *value) + size_t i, len; + const Char *v; /* pointer in value */ + char *c; /* pointer in colors */ +- Extension *volatile e; /* pointer in extensions */ ++ static Extension *volatile e; /* pointer in extensions */ + jmp_buf_t osetexit; + size_t omark; + +@@ -302,12 +302,13 @@ print_color(const Char *fname, size_t le + break; + } + if (i == nvariables) { +- for (i = 0; i < nextensions; i++) +- if (len >= extensions[i].extension.len +- && strncmp(last - extensions[i].extension.len, +- extensions[i].extension.s, +- extensions[i].extension.len) == 0) { +- color = &extensions[i].color; ++ int j; ++ for (j = 0; j < nextensions; j++) ++ if (len >= extensions[j].extension.len ++ && strncmp(last - extensions[j].extension.len, ++ extensions[j].extension.s, ++ extensions[j].extension.len) == 0) { ++ color = &extensions[j].color; + break; + } + } +--- tw.h ++++ tw.h 2006-04-25 12:58:31.000000000 +0000 +@@ -33,6 +33,10 @@ + #ifndef _h_tw + #define _h_tw + ++#ifndef _h_sh ++# include "sh.h" ++#endif ++ + #define TW_PATH 0x1000 + #define TW_ZERO 0x0fff + diff --git a/tcsh.changes b/tcsh.changes index 04572f6..d97b7e7 100644 --- a/tcsh.changes +++ b/tcsh.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 7 12:45:48 UTC 2011 - werner@suse.de + +- Renew some patches to make it build + ------------------------------------------------------------------- Tue Dec 14 18:20:38 CET 2010 - werner@suse.de diff --git a/tcsh.spec b/tcsh.spec index faeacbe..368bf6b 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -38,7 +38,7 @@ Patch2: tcsh-6.15.00-utf8.dif Patch3: tcsh-6.15.00-pipe.dif Patch4: tcsh-6.17.00-longjmp.dif Patch5: tcsh-6.16.00-norm-cmd.dif -Patch6: tcsh-6.16.00-history.dif +Patch6: tcsh-6.17.02-history.dif Patch7: tcsh-6.15.00-blanks.dif Patch8: tcsh-6.15.00-fullpath.dif Patch9: tcsh-6.17.02-multibyte.patch @@ -78,7 +78,7 @@ Authors: %patch11 -p0 -b .mailbox %patch12 -p1 -b .catalog %patch13 -p0 -b .kanji -%patch +%patch -b .0 sh $RPM_SOURCE_DIR/nls-iconv %build