Add gettext-devel to BuildRequires (AM_ICONV)
This commit is contained in:
parent
38fab2b698
commit
15251bec14
@ -1,29 +0,0 @@
|
||||
Index: tcsh/sh.misc.c
|
||||
===================================================================
|
||||
--- tcsh.orig/sh.misc.c 2005-01-05 17:06:14.000000000 +0100
|
||||
+++ tcsh/sh.misc.c 2005-01-09 16:47:41.068433880 +0100
|
||||
@@ -251,6 +251,7 @@
|
||||
closem()
|
||||
{
|
||||
int f;
|
||||
+ struct stat st;
|
||||
|
||||
#ifdef NLS_BUGS
|
||||
#ifdef NLS_CATALOGS
|
||||
@@ -267,6 +268,16 @@
|
||||
#ifdef MALLOC_TRACE
|
||||
&& f != 25
|
||||
#endif /* MALLOC_TRACE */
|
||||
+#ifdef S_ISSOCK
|
||||
+ /* NSS modules (e.g. Linux nss_ldap) might keep sockets open.
|
||||
+ * If we close such a socket, both the NSS module and tcsh think
|
||||
+ * they "own" the descriptor.
|
||||
+ *
|
||||
+ * Not closing sockets does not make the cleanup use of closem()
|
||||
+ * less reliable because tcsh never creates sockets.
|
||||
+ */
|
||||
+ && fstat(f, &st) == 0 && !S_ISSOCK(st.st_mode)
|
||||
+#endif
|
||||
)
|
||||
{
|
||||
(void) close(f);
|
@ -1,14 +0,0 @@
|
||||
--- tcsh-6.14.00/tw.color.c.colors 2006-03-23 02:59:40.000000000 +0100
|
||||
+++ tcsh-6.14.00/tw.color.c 2006-03-23 03:00:44.000000000 +0100
|
||||
@@ -80,6 +80,11 @@
|
||||
#endif
|
||||
VAR(NOS, "rc", "m"), /* Right code */
|
||||
VAR(NOS, "ec", ""), /* End code (replaces lc+no+rc) */
|
||||
+ VAR(NOS, "su", ""), /* Setuid file (u+s) */
|
||||
+ VAR(NOS, "sg", ""), /* Setgid file (g+s) */
|
||||
+ VAR(NOS, "tw", ""), /* Sticky and other writable dir (+t,o+w) */
|
||||
+ VAR(NOS, "ow", ""), /* Other writable dir (o+w) but not sticky */
|
||||
+ VAR(NOS, "st", ""), /* Sticky dir (+t) but not other writable */
|
||||
};
|
||||
|
||||
enum FileType {
|
@ -1,151 +0,0 @@
|
||||
Index: tcsh/sh.func.c
|
||||
===================================================================
|
||||
--- tcsh.orig/sh.func.c
|
||||
+++ tcsh/sh.func.c
|
||||
@@ -386,7 +386,7 @@ doif(Char **v, struct command *kp)
|
||||
Char **vv;
|
||||
|
||||
v++;
|
||||
- i = expr(&v);
|
||||
+ i = noexec ? 1 : expr(&v);
|
||||
vv = v;
|
||||
if (*vv == NULL)
|
||||
stderror(ERR_NAME | ERR_EMPTYIF);
|
||||
@@ -436,7 +436,8 @@ doelse (Char **v, struct command *c)
|
||||
{
|
||||
USE(c);
|
||||
USE(v);
|
||||
- search(TC_ELSE, 0, NULL);
|
||||
+ if (!noexec)
|
||||
+ search(TC_ELSE, 0, NULL);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@@ -446,7 +447,9 @@ dogoto(Char **v, struct command *c)
|
||||
Char *lp;
|
||||
|
||||
USE(c);
|
||||
- gotolab(lp = globone(v[1], G_ERROR));
|
||||
+ lp = globone(v[1], G_ERROR);
|
||||
+ if (!noexec)
|
||||
+ gotolab(lp);
|
||||
xfree((ptr_t) lp);
|
||||
}
|
||||
|
||||
@@ -489,7 +492,9 @@ doswitch(Char **v, struct command *c)
|
||||
v--;
|
||||
if (*v)
|
||||
stderror(ERR_SYNTAX);
|
||||
- search(TC_SWITCH, 0, lp = globone(cp, G_ERROR));
|
||||
+ lp = globone(cp, G_ERROR);
|
||||
+ if (!noexec)
|
||||
+ search(TC_SWITCH, 0, lp);
|
||||
xfree((ptr_t) lp);
|
||||
}
|
||||
|
||||
@@ -499,10 +504,10 @@ dobreak(Char **v, struct command *c)
|
||||
{
|
||||
USE(v);
|
||||
USE(c);
|
||||
- if (whyles)
|
||||
- toend();
|
||||
- else
|
||||
+ if (whyles == NULL)
|
||||
stderror(ERR_NAME | ERR_NOTWHILE);
|
||||
+ if (!noexec)
|
||||
+ toend();
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@@ -555,7 +560,7 @@ doforeach(Char **v, struct command *c)
|
||||
gflag = 0, tglob(v);
|
||||
if (gflag) {
|
||||
v = globall(v);
|
||||
- if (v == 0)
|
||||
+ if (v == 0 && !noexec)
|
||||
stderror(ERR_NAME | ERR_NOMATCH);
|
||||
}
|
||||
else {
|
||||
@@ -576,7 +581,8 @@ doforeach(Char **v, struct command *c)
|
||||
zlast = TC_FOREACH;
|
||||
if (intty)
|
||||
preread();
|
||||
- doagain();
|
||||
+ if (!noexec)
|
||||
+ doagain();
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@@ -594,11 +600,13 @@ dowhile(Char **v, struct command *c)
|
||||
* Implement prereading here also, taking care not to evaluate the
|
||||
* expression before the loop has been read up from a terminal.
|
||||
*/
|
||||
- if (intty && !again)
|
||||
+ if (noexec)
|
||||
+ status = 0;
|
||||
+ else if (intty && !again)
|
||||
status = !exp0(&v, 1);
|
||||
else
|
||||
status = !expr(&v);
|
||||
- if (*v)
|
||||
+ if (*v && !noexec)
|
||||
stderror(ERR_NAME | ERR_EXPRESSION);
|
||||
if (!again) {
|
||||
struct whyle *nwp =
|
||||
@@ -653,7 +661,8 @@ doend(Char **v, struct command *c)
|
||||
if (!whyles)
|
||||
stderror(ERR_NAME | ERR_NOTWHILE);
|
||||
btell(&whyles->w_end);
|
||||
- doagain();
|
||||
+ if (!noexec)
|
||||
+ doagain();
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@@ -664,7 +673,8 @@ docontin(Char **v, struct command *c)
|
||||
USE(c);
|
||||
if (!whyles)
|
||||
stderror(ERR_NAME | ERR_NOTWHILE);
|
||||
- doagain();
|
||||
+ if (!noexec)
|
||||
+ doagain();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -701,6 +711,8 @@ dorepeat(Char **v, struct command *kp)
|
||||
i *= getn(v[1]);
|
||||
lshift(v, 2);
|
||||
} while (v[0] != NULL && Strcmp(v[0], STRrepeat) == 0);
|
||||
+ if (noexec)
|
||||
+ i = 1;
|
||||
|
||||
if (setintr)
|
||||
#ifdef BSDSIGS
|
||||
@@ -733,7 +745,8 @@ doswbrk(Char **v, struct command *c)
|
||||
{
|
||||
USE(v);
|
||||
USE(c);
|
||||
- search(TC_BRKSW, 0, NULL);
|
||||
+ if (!noexec)
|
||||
+ search(TC_BRKSW, 0, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
Index: tcsh/sh.sem.c
|
||||
===================================================================
|
||||
--- tcsh.orig/sh.sem.c
|
||||
+++ tcsh/sh.sem.c
|
||||
@@ -283,10 +283,12 @@ execute(struct command *t, int wanttty,
|
||||
* Check if we have a builtin function and remember which one.
|
||||
*/
|
||||
bifunc = isbfunc(t);
|
||||
- if (noexec && bifunc) {
|
||||
+ if (noexec) {
|
||||
/*
|
||||
* Continue for builtins that are part of the scripting language
|
||||
*/
|
||||
+ if (bifunc == NULL)
|
||||
+ break;
|
||||
if (bifunc->bfunct != (bfunc_t)dobreak &&
|
||||
bifunc->bfunct != (bfunc_t)docontin &&
|
||||
bifunc->bfunct != (bfunc_t)doelse &&
|
@ -1,12 +0,0 @@
|
||||
diff -urN tcsh-6.13.00/nls/Makefile tcsh/nls/Makefile
|
||||
--- tcsh-6.13.00/nls/Makefile 2004-02-21 21:34:26.000000000 +0100
|
||||
+++ tcsh/nls/Makefile 2004-07-16 19:09:58.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
SUBDIRS= C et finnish french german greek italian ja pl russian \
|
||||
spanish ukrainian
|
||||
#GENCAT= gencat --new
|
||||
-#CHARSET= charset
|
||||
+CHARSET= charset
|
||||
GENCAT= gencat
|
||||
|
||||
catalogs:
|
@ -1,10 +0,0 @@
|
||||
--- tcsh-6.14.00/tw.parse.c.lsF 2005-06-20 18:56:57.000000000 +0200
|
||||
+++ tcsh-6.14.00/tw.parse.c 2005-06-20 18:57:03.000000000 +0200
|
||||
@@ -2088,6 +2088,7 @@
|
||||
Char f = items[i][w - 1];
|
||||
items[i][w - 1] = 0;
|
||||
print_with_color(items[i], w - 1, f);
|
||||
+ items[i][w - 1] = f;
|
||||
}
|
||||
else {
|
||||
/* Print filename followed by '/' or '*' or ' ' */
|
@ -1,27 +0,0 @@
|
||||
--- tcsh-6.14.00/sh.lex.c.wide-crash 2006-02-28 03:34:58.000000000 +0100
|
||||
+++ tcsh-6.14.00/sh.lex.c 2006-02-28 03:35:31.000000000 +0100
|
||||
@@ -1710,13 +1710,13 @@
|
||||
break;
|
||||
partial += r;
|
||||
i = 0;
|
||||
- while (i < partial) {
|
||||
+ while (i < partial && nchars != 0) {
|
||||
int len;
|
||||
|
||||
len = normal_mbtowc(buf + res, cbuf + i, partial - i);
|
||||
if (len == -1) {
|
||||
reset_mbtowc();
|
||||
- if (partial < MB_LEN_MAX && r > 0)
|
||||
+ if (partial - i < MB_LEN_MAX && r > 0)
|
||||
/* Maybe a partial character and there is still a chance
|
||||
to read more */
|
||||
break;
|
||||
@@ -1735,7 +1735,7 @@
|
||||
if (i != partial)
|
||||
memmove(cbuf, cbuf + i, partial - i);
|
||||
partial -= i;
|
||||
- } while (partial != 0);
|
||||
+ } while (partial != 0 && nchars != 0);
|
||||
/* Throwing away possible partial multibyte characters on error */
|
||||
return res != 0 ? res : r;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
--- tcsh-6.15.00/configure.in_old 2007-08-31 10:37:44.000000000 +0200
|
||||
+++ tcsh-6.15.00/configure.in 2007-08-31 10:38:41.000000000 +0200
|
||||
@@ -266,7 +266,8 @@
|
||||
AC_SEARCH_LIBS(tgetent, tinfo)
|
||||
AC_SEARCH_LIBS(gethostbyname, nsl)
|
||||
AC_SEARCH_LIBS(connect, socket)
|
||||
-AM_ICONV
|
||||
+AC_SEARCH_LIBS([iconv], [iconv], [AC_DEFINE([HAVE_ICONV], [1],
|
||||
+ [Define to 1 if you have the iconv () interface])])
|
||||
|
||||
dnl Checks for header files
|
||||
AC_CHECK_HEADERS([auth.h crypt.h inttypes.h shadow.h stdint.h utmp.h utmpx.h])
|
@ -10,13 +10,12 @@ Source: ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.00.tar.gz
|
||||
Patch1: tcsh-6.15.00-closem.patch
|
||||
Patch2: tcsh-6.14.00-tinfo.patch
|
||||
Patch3: tcsh-6.14.00-unprintable.patch
|
||||
Patch4: tcsh-6.15.00-iconv.patch
|
||||
Provides: csh = %{version}
|
||||
Requires(post): grep
|
||||
Requires(postun): coreutils, grep
|
||||
URL: http://www.tcsh.org/
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: autoconf, automake, ncurses-devel
|
||||
BuildRequires: autoconf, automake, ncurses-devel, gettext-devel
|
||||
|
||||
%description
|
||||
Tcsh is an enhanced but completely compatible version of csh, the C
|
||||
@ -31,7 +30,6 @@ like syntax.
|
||||
%patch1 -p1 -b .closem
|
||||
%patch2 -p1 -b .tinfo
|
||||
%patch3 -p1 -b .unprintable
|
||||
%patch4 -p1 -b .iconv
|
||||
|
||||
%build
|
||||
# For tcsh-6.14.00-tinfo.patch
|
||||
@ -102,6 +100,7 @@ fi
|
||||
* Mon Aug 27 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.15-1
|
||||
- Update to tcsh-6.15.00
|
||||
- Fix license
|
||||
- Add gettext-devel to BuildRequires (AM_ICONV)
|
||||
|
||||
* Wed Apr 25 2007 Vitezslav Crhonek <vcrhonek@redhat.com> - 6.14-16
|
||||
- Fix floating exception in print_by_column() with unprintable characters
|
||||
|
Loading…
Reference in New Issue
Block a user