SHA256
1
0
forked from pool/tcsh
OBS User unknown 2007-07-23 19:31:32 +00:00 committed by Git OBS Bridge
parent f1eb7d5f6e
commit f0e901a346
4 changed files with 95 additions and 3 deletions

77
tcsh-6.15.00-longjmp.dif Normal file
View File

@ -0,0 +1,77 @@
--- sh.h
+++ sh.h 2007-07-23 12:01:10.230408643 +0200
@@ -640,7 +640,7 @@ EXTERN int SHDIAG IZERO; /* Diagnostic
EXTERN int OLDSTD IZERO; /* Old standard input (def for cmds) */
-#if SYSVREL == 4 && defined(_UTS)
+#if (SYSVREL == 4 && defined(_UTS)) || defined(__linux__)
/*
* From: fadden@uts.amdahl.com (Andy McFadden)
* we need sigsetjmp for UTS4, but not UTS2.1
@@ -658,7 +658,7 @@ EXTERN int OLDSTD IZERO; /* Old standa
#ifdef SIGSETJMP
typedef struct { sigjmp_buf j; } jmp_buf_t;
-# define setexit() sigsetjmp(reslab.j)
+# define setexit() sigsetjmp(reslab.j, 1)
# define _reset() siglongjmp(reslab.j, 1)
#else
typedef struct { jmp_buf j; } jmp_buf_t;
--- sh.c
+++ sh.c 2007-07-23 12:02:41.640206073 +0200
@@ -78,7 +78,7 @@ extern int NLSMapsAreInited;
* ported to Apple Unix (TM) (OREO) 26 -- 29 Jun 1987
*/
-jmp_buf_t reslab INIT_ZERO_STRUCT;
+jmp_buf_t reslab;
static const char tcshstr[] = "tcsh";
@@ -178,6 +178,8 @@ main(int argc, char **argv)
int osetintr;
struct sigaction oparintr;
+ memset(&reslab, 0, sizeof(reslab));
+
#ifdef WINNT_NATIVE
nt_init();
#endif /* WINNT_NATIVE */
@@ -2026,7 +2028,10 @@ process(int catch)
#endif /* SIG_WINDOW */
setcopy(STR_, InputBuf, VAR_READWRITE | VAR_NOGLOB);
cmd_done:
- cleanup_until(&paraml);
+ if (cleanup_reset())
+ cleanup_until(&paraml);
+ else
+ haderr = 1;
}
exitset--;
cleanup_pop_mark(omark);
--- sh.decls.h
+++ sh.decls.h 2007-07-23 15:37:27.493023737 +0200
@@ -90,6 +90,7 @@ extern void cleanup_push_internal(voi
#define cleanup_push(v, f) cleanup_push_internal(v, f)
#endif
);
+extern int cleanup_reset (void);
extern void cleanup_ignore(void *);
extern void cleanup_until (void *);
extern void cleanup_until_mark(void);
--- sh.err.c
+++ sh.err.c 2007-07-23 15:39:48.944172212 +0200
@@ -448,6 +448,12 @@ cleanup_until(void *last_var)
abort();
}
+int
+cleanup_reset(void)
+{
+ return (cleanup_sp > cleanup_mark);
+}
+
void
cleanup_until_mark(void)
{

View File

@ -1,9 +1,10 @@
--- .pkgextract
+++ .pkgextract 2006-04-25 14:58:31.000000000 +0200
@@ -0,0 +1,3 @@
@@ -0,0 +1,4 @@
+patch -p0 -s --suffix=.spell < ../tcsh-6.15.00-spelling.dif
+patch -p0 -s --suffix=.utf8 < ../tcsh-6.15.00-utf8.dif
+patch -p0 -s --suffix=.pipe < ../tcsh-6.15.00-pipe.dif
+patch -p0 -s --suffix=.longjmp < ../tcsh-6.15.00-longjmp.dif
--- Makefile.in
+++ Makefile.in 2006-04-25 14:58:31.000000000 +0200
@@ -510,12 +510,12 @@ vgrind:

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 23 16:26:34 CEST 2007 - werner@suse.de
- Add workaround to avoid run onto already cleaned stack pointer
after an error (bug #293395)
-------------------------------------------------------------------
Thu Jul 19 12:21:34 CEST 2007 - werner@suse.de

View File

@ -18,7 +18,7 @@ Group: System/Shells
Requires: gawk textutils
Autoreqprov: on
Version: 6.15.00
Release: 3
Release: 5
Summary: The C SHell
Source: ftp.astron.com:/pub/tcsh/tcsh-6.15.00.tar.bz2
Source1: nls-iconv
@ -28,6 +28,7 @@ Patch: tcsh-6.15.00.dif
Patch1: tcsh-6.15.00-spelling.dif
Patch2: tcsh-6.15.00-utf8.dif
Patch3: tcsh-6.15.00-pipe.dif
Patch4: tcsh-6.15.00-longjmp.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -49,12 +50,13 @@ Authors:
%patch1 -p0 -b .spell
%patch2 -p0 -b .utf8
%patch3 -p0 -b .pipe
%patch4 -p0 -b .longjmp
%patch
sh $RPM_SOURCE_DIR/nls-iconv
%build
CC=gcc
CFLAGS="$RPM_OPT_FLAGS -pipe"
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -pipe"
export CC CFLAGS
%ifarch %ix86
CPU=i586
@ -73,6 +75,9 @@ Authors:
--disable-rpath \
--with-gnu-ld
make
#
# requires a working terminal on stdin
# make check
make catalogs
%install
@ -128,6 +133,9 @@ Authors:
%{_datadir}/locale/*/LC_MESSAGES/tcsh
%changelog
* Mon Jul 23 2007 - werner@suse.de
- Add workaround to avoid run onto already cleaned stack pointer
after an error (bug #293395)
* Thu Jul 19 2007 - werner@suse.de
- Small correction in bindkey.tcsh: for urxvt, mlterm, and konsole
* Mon Jul 16 2007 - werner@suse.de