Adding upstream version 5.2.37.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
parent
cf91100bce
commit
fa1b3d3922
1435 changed files with 757174 additions and 0 deletions
31
CWRU/PLATFORMS
Normal file
31
CWRU/PLATFORMS
Normal file
|
@ -0,0 +1,31 @@
|
|||
The version of bash in this directory has been compiled on the
|
||||
following systems:
|
||||
|
||||
By chet:
|
||||
|
||||
SunOS 4.1.4
|
||||
SunOS 5.5
|
||||
BSDI BSD/OS 2.1
|
||||
FreeBSD 2.2
|
||||
NetBSD 1.2
|
||||
AIX 4.2
|
||||
AIX 4.1.4
|
||||
HP/UX 9.05, 10.01, 10.10, 10.20
|
||||
Linux 2.0.29 (libc 5.3.12)
|
||||
Linux 2.0.4 (libc 5.3.12)
|
||||
|
||||
By other testers:
|
||||
|
||||
SCO ODT 2.0
|
||||
SCO 3.2v5.0, 3.2v4.2
|
||||
SunOS 5.3
|
||||
SunOS 5.5
|
||||
BSD/OS 2.1
|
||||
FreeBSD 2.2
|
||||
SunOS 4.1.3
|
||||
Irix 5.3
|
||||
Irix 6.2
|
||||
Linux 2.0 (unknown distribution)
|
||||
Digital OSF/1 3.2
|
||||
GNU Hurd 0.1
|
||||
SVR4.2
|
20
CWRU/README
Normal file
20
CWRU/README
Normal file
|
@ -0,0 +1,20 @@
|
|||
Contents of this directory:
|
||||
|
||||
changelog - my change log since the last release
|
||||
|
||||
POSIX.NOTES - list of what changes for `posix mode'
|
||||
|
||||
README - this file
|
||||
|
||||
misc - directory with some useful tools
|
||||
|
||||
The following are distributed `as-is'. They will not apply without some
|
||||
modification.
|
||||
|
||||
sh-redir-hack - diff to parse.y to get redirections before
|
||||
compound commands
|
||||
|
||||
empty-for-wordlist - diff to parse.y to allow an empty wordlist after
|
||||
the `in' keyword in a `for' statement
|
||||
|
||||
mh-folder-comp - diffs that reportedly add MH folder completion
|
3952
CWRU/changelog
Normal file
3952
CWRU/changelog
Normal file
File diff suppressed because it is too large
Load diff
26
CWRU/misc/bison
Normal file
26
CWRU/misc/bison
Normal file
|
@ -0,0 +1,26 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# bison -- just call yacc
|
||||
#
|
||||
|
||||
# Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if [ "$1" = '-y' ]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
exec /usr/bin/yacc ${1+"$@"}
|
57
CWRU/misc/errlist.c
Normal file
57
CWRU/misc/errlist.c
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* If necessary, link with lib/sh/libsh.a
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1998-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern char *strerror();
|
||||
|
||||
extern int sys_nerr;
|
||||
|
||||
int
|
||||
main(c, v)
|
||||
int c;
|
||||
char **v;
|
||||
{
|
||||
int i, n;
|
||||
|
||||
if (c == 1) {
|
||||
for (i = 1; i < sys_nerr; i++)
|
||||
printf("%d --> %s\n", i, strerror(i));
|
||||
} else {
|
||||
for (i = 1; i < c; i++) {
|
||||
n = atoi(v[i]);
|
||||
printf("%d --> %s\n", n, strerror(n));
|
||||
}
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
|
||||
programming_error(a, b)
|
||||
char *a;
|
||||
int b;
|
||||
{
|
||||
}
|
||||
|
||||
fatal_error()
|
||||
{
|
||||
}
|
63
CWRU/misc/hpux10-dlfcn.h
Normal file
63
CWRU/misc/hpux10-dlfcn.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* HPUX 10.x stubs to implement dl* in terms of shl*
|
||||
*
|
||||
* Not needed for later versions; HPUX 11.x has dlopen() and friends.
|
||||
*
|
||||
* configure also needs to be faked out. You can create a dummy libdl.a
|
||||
* with stub entries for dlopen, dlclose, dlsym, and dlerror:
|
||||
*
|
||||
* int dlopen() { return(0);}
|
||||
* int dlclose() { return(0);}
|
||||
* int dlsym() { return(0);}
|
||||
* int dlerror() { return(0);}
|
||||
*
|
||||
* This has not been tested; I just read the manual page and coded this up.
|
||||
*
|
||||
* According to the ld manual page, you need to link bash with -dld and add
|
||||
* the -E flag to LOCAL_LDFLAGS.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1998-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if !defined (__HPUX10_DLFCN_H__)
|
||||
|
||||
#define __HPUX10_DLFCN_H__
|
||||
|
||||
#include <dl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#define RTLD_LAZY BIND_DEFERRED
|
||||
#define RTLD_NOW BIND_IMMEDIATE
|
||||
#define RTLD_GLOBAL DYNAMIC_PATH
|
||||
|
||||
char *bash_global_sym_addr;
|
||||
|
||||
#define dlopen(file,mode) (void *)shl_load((file), (mode), 0L)
|
||||
|
||||
#define dlclose(handle) shl_unload((shl_t)(handle))
|
||||
|
||||
#define dlsym(handle,name) (bash_global_sym_addr=0,shl_findsym((shl_t *)&(handle),name,TYPE_UNDEFINED,&bash_global_sym_addr), (void *)bash_global_sym_addr)
|
||||
|
||||
#define dlerror() strerror(errno)
|
||||
|
||||
#endif /* __HPUX10_DLFCN_H__ */
|
39
CWRU/misc/open-files.c
Normal file
39
CWRU/misc/open-files.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* open-files -- report files a process has open */
|
||||
|
||||
/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
main()
|
||||
{
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < getdtablesize(); i++) {
|
||||
if (fcntl(i, F_GETFD, 0) != -1)
|
||||
fprintf(stderr, "fd %d: open\n", i);
|
||||
}
|
||||
exit(0);
|
||||
}
|
47
CWRU/misc/sigs.c
Normal file
47
CWRU/misc/sigs.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* sigs - print signal dispositions for a process */
|
||||
|
||||
/* Copyright (C) 1990-2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern const char * const sys_siglist[];
|
||||
|
||||
typedef void sighandler();
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
sighandler *h;
|
||||
|
||||
for (i = 1; i < NSIG; i++) {
|
||||
h = signal(i, SIG_DFL);
|
||||
if (h != SIG_DFL) {
|
||||
if (h == SIG_IGN)
|
||||
fprintf(stderr, "%d: ignored (%s)\n", i, sys_siglist[i]);
|
||||
else
|
||||
fprintf(stderr, "%d: caught (%s)\n", i, sys_siglist[i]);
|
||||
}
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
226
CWRU/misc/sigstat.c
Normal file
226
CWRU/misc/sigstat.c
Normal file
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
* sigstat - print out useful information about signal arguments
|
||||
*
|
||||
* Chet Ramey
|
||||
* chet@po.cwru.edu
|
||||
*/
|
||||
|
||||
/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
Bash is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Bash is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Bash. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern char *strrchr();
|
||||
static char *signames[NSIG];
|
||||
|
||||
char *progname;
|
||||
|
||||
void sigstat();
|
||||
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
register int i;
|
||||
char *t;
|
||||
|
||||
if (t = strrchr(argv[0], '/'))
|
||||
progname = ++t;
|
||||
else
|
||||
progname = argv[0];
|
||||
init_signames();
|
||||
if (argc == 1) {
|
||||
for (i = 1; i < NSIG; i++)
|
||||
sigstat(i);
|
||||
exit(0);
|
||||
}
|
||||
for (i = 1; i < argc; i++)
|
||||
sigstat(atoi(argv[i]));
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
sigstat(sig)
|
||||
int sig;
|
||||
{
|
||||
struct sigaction oact;
|
||||
char *signame;
|
||||
sigset_t set, oset;
|
||||
int blocked;
|
||||
|
||||
if (sig < 0 || sig >= NSIG) {
|
||||
fprintf(stderr, "%s: %d: signal out of range\n", progname, sig);
|
||||
return;
|
||||
}
|
||||
signame = signames[sig];
|
||||
sigemptyset(&oset);
|
||||
sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
|
||||
if (sigismember(&oset, sig))
|
||||
printf("%s: signal is blocked\n", signame);
|
||||
sigaction(sig, (struct sigaction *)NULL, &oact);
|
||||
if (oact.sa_handler == SIG_IGN)
|
||||
printf("%s: signal is ignored\n", signame);
|
||||
else if (oact.sa_handler == SIG_DFL)
|
||||
printf("%s: signal is defaulted\n", signame);
|
||||
else
|
||||
printf("%s: signal is trapped (?)\n", signame);
|
||||
}
|
||||
|
||||
init_signames()
|
||||
{
|
||||
register int i;
|
||||
bzero(signames, sizeof(signames));
|
||||
|
||||
#if defined (SIGHUP) /* hangup */
|
||||
signames[SIGHUP] = "SIGHUP";
|
||||
#endif
|
||||
#if defined (SIGINT) /* interrupt */
|
||||
signames[SIGINT] = "SIGINT";
|
||||
#endif
|
||||
#if defined (SIGQUIT) /* quit */
|
||||
signames[SIGQUIT] = "SIGQUIT";
|
||||
#endif
|
||||
#if defined (SIGILL) /* illegal instruction (not reset when caught) */
|
||||
signames[SIGILL] = "SIGILL";
|
||||
#endif
|
||||
#if defined (SIGTRAP) /* trace trap (not reset when caught) */
|
||||
signames[SIGTRAP] = "SIGTRAP";
|
||||
#endif
|
||||
#if defined (SIGABRT) /* */
|
||||
signames[SIGABRT] = "SIGABRT";
|
||||
#endif
|
||||
#if defined (SIGIOT) /* IOT instruction */
|
||||
signames[SIGIOT] = "SIGIOT";
|
||||
#endif
|
||||
#if defined (SIGEMT) /* EMT instruction */
|
||||
signames[SIGEMT] = "SIGEMT";
|
||||
#endif
|
||||
#if defined (SIGFPE) /* floating point exception */
|
||||
signames[SIGFPE] = "SIGFPE";
|
||||
#endif
|
||||
#if defined (SIGKILL) /* kill (cannot be caught or ignored) */
|
||||
signames[SIGKILL] = "SIGKILL";
|
||||
#endif
|
||||
#if defined (SIGBUS) /* bus error */
|
||||
signames[SIGBUS] = "SIGBUS";
|
||||
#endif
|
||||
#if defined (SIGSEGV) /* segmentation violation */
|
||||
signames[SIGSEGV] = "SIGSEGV";
|
||||
#endif
|
||||
#if defined (SIGSYS) /* bad argument to system call */
|
||||
signames[SIGSYS] = "SIGSYS";
|
||||
#endif
|
||||
#if defined (SIGPIPE) /* write on a pipe with no one to read it */
|
||||
signames[SIGPIPE] = "SIGPIPE";
|
||||
#endif
|
||||
#if defined (SIGALRM) /* alarm clock */
|
||||
signames[SIGALRM] = "SIGALRM";
|
||||
#endif
|
||||
#if defined (SIGTERM) /* software termination signal from kill */
|
||||
signames[SIGTERM] = "SIGTERM";
|
||||
#endif
|
||||
#if defined (SIGCLD) /* Like SIGCHLD. */
|
||||
signames[SIGCLD] = "SIGCLD";
|
||||
#endif
|
||||
#if defined (SIGPWR) /* Magic thing for some machines. */
|
||||
signames[SIGPWR] = "SIGPWR";
|
||||
#endif
|
||||
#if defined (SIGPOLL) /* For keyboard input? */
|
||||
signames[SIGPOLL] = "SIGPOLL";
|
||||
#endif
|
||||
#if defined (SIGURG) /* urgent condition on IO channel */
|
||||
signames[SIGURG] = "SIGURG";
|
||||
#endif
|
||||
#if defined (SIGSTOP) /* sendable stop signal not from tty */
|
||||
signames[SIGSTOP] = "SIGSTOP";
|
||||
#endif
|
||||
#if defined (SIGTSTP) /* stop signal from tty */
|
||||
signames[SIGTSTP] = "SIGTSTP";
|
||||
#endif
|
||||
#if defined (SIGCONT) /* continue a stopped process */
|
||||
signames[SIGCONT] = "SIGCONT";
|
||||
#endif
|
||||
#if defined (SIGCHLD) /* to parent on child stop or exit */
|
||||
signames[SIGCHLD] = "SIGCHLD";
|
||||
#endif
|
||||
#if defined (SIGTTIN) /* to readers pgrp upon background tty read */
|
||||
signames[SIGTTIN] = "SIGTTIN";
|
||||
#endif
|
||||
#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local<OSTOP) */
|
||||
signames[SIGTTOU] = "SIGTTOU";
|
||||
#endif
|
||||
#if defined (SIGIO) /* input/output possible signal */
|
||||
signames[SIGIO] = "SIGIO";
|
||||
#endif
|
||||
#if defined (SIGXCPU) /* exceeded CPU time limit */
|
||||
signames[SIGXCPU] = "SIGXCPU";
|
||||
#endif
|
||||
#if defined (SIGXFSZ) /* exceeded file size limit */
|
||||
signames[SIGXFSZ] = "SIGXFSZ";
|
||||
#endif
|
||||
#if defined (SIGVTALRM) /* virtual time alarm */
|
||||
signames[SIGVTALRM] = "SIGVTALRM";
|
||||
#endif
|
||||
#if defined (SIGPROF) /* profiling time alarm */
|
||||
signames[SIGPROF] = "SIGPROF";
|
||||
#endif
|
||||
#if defined (SIGWINCH) /* window changed */
|
||||
signames[SIGWINCH] = "SIGWINCH";
|
||||
#endif
|
||||
#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
|
||||
signames[SIGLOST] = "SIGLOST";
|
||||
#endif
|
||||
#if defined (SIGUSR1) /* user defined signal 1 */
|
||||
signames[SIGUSR1] = "SIGUSR1";
|
||||
#endif
|
||||
#if defined (SIGUSR2) /* user defined signal 2 */
|
||||
signames[SIGUSR2] = "SIGUSR2";
|
||||
#endif
|
||||
#if defined (SIGMSG) /* HFT input data pending */
|
||||
signames[SIGMSG] = "SIGMSG";
|
||||
#endif
|
||||
#if defined (SIGPWR) /* power failure imminent (save your data) */
|
||||
signames[SIGPWR] = "SIGPWR";
|
||||
#endif
|
||||
#if defined (SIGDANGER) /* system crash imminent */
|
||||
signames[SIGDANGER] = "SIGDANGER";
|
||||
#endif
|
||||
#if defined (SIGMIGRATE) /* migrate process to another CPU */
|
||||
signames[SIGMIGRATE] = "SIGMIGRATE";
|
||||
#endif
|
||||
#if defined (SIGPRE) /* programming error */
|
||||
signames[SIGPRE] = "SIGPRE";
|
||||
#endif
|
||||
#if defined (SIGGRANT) /* HFT monitor mode granted */
|
||||
signames[SIGGRANT] = "SIGGRANT";
|
||||
#endif
|
||||
#if defined (SIGRETRACT) /* HFT monitor mode retracted */
|
||||
signames[SIGRETRACT] = "SIGRETRACT";
|
||||
#endif
|
||||
#if defined (SIGSOUND) /* HFT sound sequence has completed */
|
||||
signames[SIGSOUND] = "SIGSOUND";
|
||||
#endif
|
||||
|
||||
for (i = 0; i < NSIG; i++)
|
||||
if (signames[i] == (char *)NULL) {
|
||||
signames[i] = (char *)malloc (16);;
|
||||
sprintf (signames[i], "signal %d", i);
|
||||
}
|
||||
}
|
15
CWRU/sh-redir-hack
Normal file
15
CWRU/sh-redir-hack
Normal file
|
@ -0,0 +1,15 @@
|
|||
Add to `subshell' production in parse.y and recompile -DREDIRECTION_HACK to
|
||||
get `< xx (command)' sh compatibility.
|
||||
|
||||
| redirections '(' list ')'
|
||||
{
|
||||
#if defined (REDIRECTION_HACK)
|
||||
/* XXX - C News sh compatibility hack - XXX */
|
||||
$3->redirects = $1;
|
||||
$3->flags |= CMD_WANT_SUBSHELL;
|
||||
$$ = $3;
|
||||
#else
|
||||
yyerror ();
|
||||
YYABORT;
|
||||
#endif
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue