summaryrefslogtreecommitdiffstats
path: root/SOURCES/bash-3.2.dif
blob: d6911ef8b9c744c417e84d0704eb6cfebef95b18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
--- .pkgextract
+++ .pkgextract	2006-03-27 14:15:25.000000000 +0200
@@ -0,0 +1,17 @@
+tar Oxfj ../bash-3.2-patches.tar.bz2 | patch -p0 -s
+patch -p0 -s --suffix=".manual"   < ../bash-2.03-manual.patch
+patch -p0 -s --suffix=".security" < ../bash-2.05a-security.patch
+patch -p0 -s --suffix=".2.4.4"    < ../bash-3.2-2.4.4.patch
+patch -p0 -s --suffix=".evalexp"  < ../bash-3.0-evalexp.patch
+patch -p0 -s --suffix=".warnlc"   < ../bash-3.0-warn-locale.patch
+patch -p0 -s --suffix=".nfs_redir"< ../bash-3.0-nfs_redir.patch
+patch -p0 -s --suffix=".decl"     < ../bash-3.0-decl.patch
+patch -p1 -s --suffix=".random2"  < ../bash-3.1-random.patch
+patch -p0 -s --suffix=".equote"   < ../bash-3.1-extended_quote.patch
+patch -p0 -s --suffix=".printf"   < ../bash-3.2-printf.patch
+patch -p0 -s --suffix=".plugins"  < ../bash-3.1-loadables.dif
+patch -p0 -s --suffix=".valgrind" < ../bash-3.2-valgrind.patch
+patch -p0 -s --suffix=".zerotty"  < ../readline-4.3-input.dif
+patch -p0 -s --suffix=".wrap"     < ../readline-5.2-wrap.patch
+patch -p0 -s --suffix=".conf"     < ../readline-5.2-conf.patch
+patch -p0 -s --suffix=".input"    < ../readline-5.1-input.patch
--- config-top.h
+++ config-top.h	2007-12-04 15:44:39.314025629 +0100
@@ -52,14 +52,14 @@
 /* The default value of the PATH variable. */
 #ifndef DEFAULT_PATH_VALUE
 #define DEFAULT_PATH_VALUE \
-  "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
+  "/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:."
 #endif
 
 /* The value for PATH when invoking `command -p'.  This is only used when
    the Posix.2 confstr () function, or CS_PATH define are not present. */
 #ifndef STANDARD_UTILS_PATH
 #define STANDARD_UTILS_PATH \
-  "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
+  "/bin:/usr/bin:/sbin:/usr/sbin"
 #endif
 
 /* Default primary and secondary prompt strings. */
@@ -73,15 +73,15 @@
 #define KSH_COMPATIBLE_SELECT
 
 /* System-wide .bashrc file for interactive shells. */
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
+#define SYS_BASHRC "/etc/bash.bashrc"
 
 /* System-wide .bash_logout for login shells. */
-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
+#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"
 
 /* Define this to make non-interactive shells begun with argv[0][0] == '-'
    run the startup files when not in posix mode. */
-/* #define NON_INTERACTIVE_LOGIN_SHELLS */
+#define NON_INTERACTIVE_LOGIN_SHELLS
 
 /* Define this if you want bash to try to check whether it's being run by
    sshd and source the .bashrc if so (like the rshd behavior). */
-/* #define SSH_SOURCE_BASHRC */
+#define SSH_SOURCE_BASHRC
--- general.h
+++ general.h	2006-03-27 14:15:25.000000000 +0200
@@ -21,10 +21,13 @@
 #if !defined (_GENERAL_H_)
 #define _GENERAL_H_
 
+#include <time.h>
+#include <sys/types.h>
 #include "stdc.h"
 
 #include "bashtypes.h"
 #include "chartypes.h"
+#include "bashline.h"
 
 #if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
 #  if defined (HAVE_SYS_TIME_H)
--- jobs.c
+++ jobs.c	2006-03-27 14:15:25.000000000 +0200
@@ -197,10 +197,10 @@ int previous_job = NO_JOB;
 #endif
 
 /* Last child made by the shell.  */
-pid_t last_made_pid = NO_PID;
+volatile pid_t last_made_pid = NO_PID;
 
 /* Pid of the last asynchronous child. */
-pid_t last_asynchronous_pid = NO_PID;
+volatile pid_t last_asynchronous_pid = NO_PID;
 
 /* The pipeline currently being built. */
 PROCESS *the_pipeline = (PROCESS *)NULL;
@@ -213,7 +213,7 @@ int already_making_children = 0;
 
 /* If this is non-zero, $LINES and $COLUMNS are reset after every process
    exits from get_tty_state(). */
-int check_window_size;
+int check_window_size = 1;
 
 /* Functions local to this file. */
 
--- jobs.h
+++ jobs.h	2006-03-27 14:15:25.000000000 +0200
@@ -162,7 +162,7 @@ extern pid_t fork (), getpid (), getpgrp
 extern struct jobstats js;
 
 extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp;
-extern pid_t last_made_pid, last_asynchronous_pid;
+extern volatile pid_t last_made_pid, last_asynchronous_pid;
 extern int asynchronous_notification;
 
 extern JOB **jobs;
--- parse.y
+++ parse.y	2006-03-27 14:15:25.000000000 +0200
@@ -1182,7 +1182,7 @@ input_file_descriptor ()
 
 #if defined (READLINE)
 char *current_readline_prompt = (char *)NULL;
-char *current_readline_line = (char *)NULL;
+unsigned char *current_readline_line = (unsigned char *)NULL;
 int current_readline_line_index = 0;
 
 static int
--- shell.c
+++ shell.c	2006-03-27 14:15:25.000000000 +0200
@@ -460,7 +460,7 @@ main (argc, argv, env)
   if (dump_translatable_strings)
     read_but_dont_execute = 1;
 
-  if (running_setuid && privileged_mode == 0)
+  if (running_setuid && privileged_mode == 0 /* && act_like_sh == 0 */)
     disable_priv_mode ();
 
   /* Need to get the argument to a -c option processed in the
--- subst.c
+++ subst.c	2006-03-27 14:15:25.000000000 +0200
@@ -2717,6 +2717,7 @@ call_expand_word_internal (w, q, i, c, e
       last_command_exit_value = EXECUTION_FAILURE;
       exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
       /* NOTREACHED */
+      return NULL; /* make stupid compiler happy */
     }
   else
     return (result);
--- variables.c
+++ variables.c	2006-03-27 14:15:25.000000000 +0200
@@ -1191,8 +1191,10 @@ assign_random (self, value, unused)
      arrayind_t unused;
 {
   sbrand (strtoul (value, (char **)NULL, 10));
+#if !defined(linux)
   if (subshell_environment)
     seeded_subshell = 1;
+#endif
   return (self);
 }
 
--- builtins/shopt.def
+++ builtins/shopt.def	2006-03-27 14:15:25.000000000 +0200
@@ -252,9 +252,9 @@ reset_shopt_options ()
   allow_null_glob_expansion = glob_dot_filenames = 0;
   cdable_vars = mail_warning = 0;
   no_exit_on_failed_exec = print_shift_error = 0;
-  check_hashed_filenames = cdspelling = expand_aliases = check_window_size = 0;
+  check_hashed_filenames = cdspelling = expand_aliases = 0;
 
-  source_uses_path = promptvars = 1;
+  check_window_size = source_uses_path = promptvars = 1;
 
 #if defined (EXTENDED_GLOB)
   extended_glob = 0;
--- doc/Makefile.in
+++ doc/Makefile.in	2006-03-27 14:15:25.000000000 +0200
@@ -141,7 +141,7 @@ BASHREF_FILES = $(srcdir)/bashref.texi $
 	${RM} $@
 	-${DVIPS} $<
 
-all: ps info dvi text html
+all: info html
 nodvi: ps info text html
 
 PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps 
--- doc/bash.1
+++ doc/bash.1	2006-03-27 14:15:25.000000000 +0200
@@ -4370,8 +4370,8 @@ file (the \fIinputrc\fP file).
 The name of this file is taken from the value of the
 .SM
 .B INPUTRC
-variable.  If that variable is unset, the default is
-.IR ~/.inputrc .
+environment variable. If that variable is unset, readline will read both
+.IR /etc/inputrc " and " ~/.inputrc .
 When a program which uses the readline library starts up, the
 initialization file is read, and the key bindings and variables
 are set.
@@ -8816,6 +8816,9 @@ The individual login shell cleanup file,
 .TP
 .FN ~/.inputrc
 Individual \fIreadline\fP initialization file
+.TP
+.FN /etc/inputrc
+System \fBreadline\fP initialization file
 .PD
 .SH AUTHORS
 Brian Fox, Free Software Foundation
--- support/printenv.c
+++ support/printenv.c	2007-12-06 16:33:46.899561365 +0100
@@ -27,6 +27,7 @@
 #if defined (HAVE_CONFIG_H)
 #  include  <config.h>
 #endif
+#include  <stdio.h>
 
 #include "bashansi.h"
 
--- support/rlvers.sh
+++ support/rlvers.sh	2006-03-27 14:15:25.000000000 +0200
@@ -27,10 +27,10 @@ TDIR=$TMPDIR/rlvers
 
 # defaults
 CC=cc
-RL_LIBDIR=/usr/local/lib
-RL_INCDIR=/usr/local/include
+RL_LIBDIR=/lib
+RL_INCDIR=/usr/include
 
-TERMCAP_LIB="-ltermcap"
+TERMCAP_LIB="-lncurses"
 
 # cannot rely on the presence of getopts
 while [ $# -gt 0 ]; do
--- support/shobj-conf
+++ support/shobj-conf	2006-09-22 16:11:58.000000000 +0200
@@ -108,10 +108,11 @@ sunos5*|solaris2*)
 linux*-*|gnu*-*|k*bsd*-gnu-*)
 	SHOBJ_CFLAGS=-fPIC
 	SHOBJ_LD='${CC}'
-	SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+	SHOBJ_LDFLAGS='-shared'
 
-	SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+	SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
 	SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+	SHLIB_LIBS=-lncurses
 	;;
 
 freebsd2* | netbsd*)