diff options
Diffstat (limited to 'app-shells/bash/files/bash-3.0-cross-signals.patch')
-rw-r--r-- | app-shells/bash/files/bash-3.0-cross-signals.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/app-shells/bash/files/bash-3.0-cross-signals.patch b/app-shells/bash/files/bash-3.0-cross-signals.patch new file mode 100644 index 0000000..ca0850b --- /dev/null +++ b/app-shells/bash/files/bash-3.0-cross-signals.patch @@ -0,0 +1,91 @@ +--- bash-3.0/Makefile.in ++++ bash-3.0/Makefile.in +@@ -607,7 +607,11 @@ + + ${LIBINTL_H}: ${INTL_LIBRARY} + +-mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c ++$(SUPPORT_SRC)mksignames.h: $(SUPPORT_SRC)mksignames.sh ++ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" /bin/sh $(SUPPORT_SRC)mksignames.sh ++ mv mksignames.h $(SUPPORT_SRC)mksignames.h ++ ++mksignames$(EXEEXT): $(SUPPORT_SRC)mksignames.c $(SUPPORT_SRC)mksignames.h + $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)mksignames.c + + mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h +--- bash-3.0/support/mksignames.c ++++ bash-3.0/support/mksignames.c +@@ -30,9 +30,7 @@ + # include "ansi_stdlib.h" + #endif /* HAVE_STDLIB_H */ + +-#if !defined (NSIG) +-# define NSIG 64 +-#endif ++#include "mksignames.h" + + /* + * Special traps: +--- bash-3.0/support/mksignames.sh ++++ bash-3.0/support/mksignames.sh +@@ -0,0 +1,60 @@ ++#!/bin/sh ++ ++input_header=mksignames.input.h ++output_header=mksignames.h ++ ++rm -f $input_header $output_header ++ ++cat >> $input_header << _ACEOF ++#include <config.h> ++#include <stdio.h> ++#include <sys/types.h> ++#include <signal.h> ++#if defined (HAVE_STDLIB_H) ++# include <stdlib.h> ++#else ++# include "ansi_stdlib.h" ++#endif /* HAVE_STDLIB_H */ ++ ++#if !defined (NSIG) ++# define NSIG 64 ++#endif ++ ++_ACEOF ++ ++deflist="NSIG SIGRTMAX SIGRTMIN SIGLOST SIGMSG SIGDANGER SIGMIGRATE SIGPRE ++SIGVIRT SIGALRM1 SIGWAITING SIGGRANT SIGKAP SIGRETRACT SIGSOUND SIGSAK SIGLWP ++SIGFREEZE SIGTHAW SIGCANCEL SIGDIL SIGCLD SIGPWR SIGPOLL SIGWINDOW SIGHUP ++SIGINT SIGQUIT SIGILL SIGTRAP SIGIOT SIGABRT SIGEMT SIGFPE SIGKILL SIGBUS ++SIGSEGV SIGSYS SIGPIPE SIGALRM SIGTERM SIGURG SIGSTOP SIGTSTP SIGCONT SIGCHLD ++SIGTTIN SIGTTOU SIGIO SIGXCPU SIGXFSZ SIGVTALRM SIGPROF SIGWINCH SIGINFO ++SIGUSR1 SIGUSR2 SIGKILLTHR" ++ ++for def in $deflist ; do ++ echo "#undef $def" >> $output_header ++ cat >> $input_header << _ACEOF ++#if defined($def) ++MKSIGNAMES_$def $def ++#endif ++_ACEOF ++done ++ ++if test "x${CPPFLAGS+set}" != "xset" ; then ++ if test -f "./mksignames.c" ; then ++ CPPFLAGS="-I.. -I../include" ++ else ++ CPPFLAGS="-I. -Iinclude" ++ fi ++fi ++if test "x${CPP+set}" != "xset" ; then ++ CPP="gcc -E" ++fi ++if test "x${EGREP+set}" != "xset" ; then ++ EGREP="grep" ++fi ++$CPP $CPPFLAGS $input_header \ ++ | $EGREP '^MKSIGNAMES_' \ ++ | sed 's/MKSIGNAMES_/#define /' \ ++ >> $output_header ++echo "/* $CPP $CPPFLAGS */" >> $output_header ++rm -f $input_header |