aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/glob/Makefile.in4
-rw-r--r--lib/malloc/Makefile.in12
-rw-r--r--lib/readline/Makefile.in30
-rw-r--r--lib/readline/complete.c4
-rw-r--r--lib/readline/display.c7
-rw-r--r--lib/readline/histfile.c4
-rw-r--r--lib/readline/isearch.c2
-rw-r--r--lib/readline/readline.h2
-rw-r--r--lib/readline/tilde.c2
-rw-r--r--lib/tilde/Makefile.in3
-rw-r--r--lib/tilde/tilde.c2
11 files changed, 59 insertions, 13 deletions
diff --git a/lib/glob/Makefile.in b/lib/glob/Makefile.in
index 2a6bf63..0a4f456 100644
--- a/lib/glob/Makefile.in
+++ b/lib/glob/Makefile.in
@@ -107,3 +107,7 @@ glob.o: $(BUILD_DIR)/config.h
glob.o: $(topdir)/bashtypes.h $(topdir)/ansi_stdlib.h $(topdir)/bashansi.h
glob.o: $(topdir)/posixstat.h $(topdir)/memalloc.h
glob.o: fnmatch.h
+
+# Rules for deficient makes, like SunOS and Solaris
+fnmatch.o: fnmatch.c
+glob.o: glob.c
diff --git a/lib/malloc/Makefile.in b/lib/malloc/Makefile.in
index 0842f92..92e12af 100644
--- a/lib/malloc/Makefile.in
+++ b/lib/malloc/Makefile.in
@@ -91,8 +91,8 @@ stubmalloc: ${STUB_OBJS}
${AR} cr libmalloc.a ${STUB_OBJS}
-test -n "$(RANLIB)" && $(RANLIB) libmalloc.a
-alloca.o: $(ALLOCA_SOURCE)
- $(CC) $(CCFLAGS) -c $(ALLOCA_SOURCE)
+alloca.o: $(srcdir)/$(ALLOCA_SOURCE)
+ $(CC) $(CCFLAGS) -c $(srcdir)/$(ALLOCA_SOURCE)
@- if test "$(ALLOCA_OBJECT)" != alloca.o ; then \
mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \
fi
@@ -103,12 +103,14 @@ mostlyclean clean:
distclean realclean maintainer-clean: clean
$(RM) Makefile
-malloc.o: malloc.c
-gmalloc.o: gmalloc.c
-
alloca.o: $(BUILD_DIR)/config.h
malloc.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h
nmalloc.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h
nmalloc2.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h
xmalloc.o: $(BUILD_DIR)/config.h $(topdir)/ansi_stdlib.h
gmalloc.o: $(BUILD_DIR)/config.h
+
+# Rules for deficient makes, like SunOS and Solaris
+stub.o: stub.c
+malloc.o: malloc.c
+gmalloc.o: gmalloc.c
diff --git a/lib/readline/Makefile.in b/lib/readline/Makefile.in
index 90e3756..01ff0cb 100644
--- a/lib/readline/Makefile.in
+++ b/lib/readline/Makefile.in
@@ -190,6 +190,7 @@ rltty.o: readline.h keymaps.h chardefs.h tilde.h
search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
search.o: readline.h keymaps.h chardefs.h tilde.h
search.o: ansi_stdlib.h history.h
+shell.o: ${BUILD_DIR}/config.h
signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
signals.o: readline.h keymaps.h chardefs.h tilde.h
signals.o: history.h
@@ -212,3 +213,32 @@ vi_mode.o: readline.h keymaps.h chardefs.h tilde.h
vi_mode.o: history.h ansi_stdlib.h
xmalloc.o: ${BUILD_DIR}/config.h
xmalloc.o: ansi_stdlib.h
+
+# Rules for deficient makes, like SunOS and Solaris
+bind.o: bind.c
+callback.o: callback.c
+complete.o: complete.c
+display.o: display.c
+funmap.o: funmap.c
+histexpand.o: histexpand.c
+histfile.o: histfile.c
+history.o: history.c
+histsearch.o: histsearch.c
+input.o: input.c
+isearch.o: isearch.c
+keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c
+kill.o: kill.c
+macro.o: macro.c
+nls.o: nls.c
+parens.o: parens.c
+readline.o: readline.c
+rltty.o: rltty.c
+search.o: search.c
+shell.o: shell.c
+signals.o: signals.c
+terminal.o: terminal.c
+tilde.o: tilde.c
+undo.o: undo.c
+util.o: util.c
+vi_mode.o: vi_mode.c
+xmalloc.o: xmalloc.c
diff --git a/lib/readline/complete.c b/lib/readline/complete.c
index b17c63e..552cb6c 100644
--- a/lib/readline/complete.c
+++ b/lib/readline/complete.c
@@ -796,7 +796,9 @@ make_quoted_replacement (match, mtype, qc)
/* If there is a single match, see if we need to quote it.
This also checks whether the common prefix of several
matches needs to be quoted. */
- should_quote = rl_strpbrk (match, rl_filename_quote_characters) != 0;
+ should_quote = rl_filename_quote_characters
+ ? (rl_strpbrk (match, rl_filename_quote_characters) != 0)
+ : 0;
do_replace = should_quote ? mtype : NO_MATCH;
/* Quote the replacement, since we found an embedded
diff --git a/lib/readline/display.c b/lib/readline/display.c
index c283f9a..609d827 100644
--- a/lib/readline/display.c
+++ b/lib/readline/display.c
@@ -1482,7 +1482,7 @@ cr ()
void
_rl_redisplay_after_sigwinch ()
{
- char *t, *oldp;
+ char *t, *oldp, *oldl, *oldlprefix;
/* Clear the current line and put the cursor at column 0. Make sure
the right thing happens if we have wrapped to a new screen line. */
@@ -1508,9 +1508,14 @@ _rl_redisplay_after_sigwinch ()
if (t)
{
oldp = rl_display_prompt;
+ oldl = local_prompt;
+ oldlprefix = local_prompt_prefix;
rl_display_prompt = ++t;
+ local_prompt = local_prompt_prefix = (char *)NULL;
rl_forced_update_display ();
rl_display_prompt = oldp;
+ local_prompt = oldl;
+ local_prompt_prefix = oldlprefix;
}
else
rl_forced_update_display ();
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c
index c3de134..9f96f1c 100644
--- a/lib/readline/histfile.c
+++ b/lib/readline/histfile.c
@@ -246,7 +246,7 @@ history_truncate_file (fname, lines)
/* Write only if there are more lines in the file than we want to
truncate to. */
- if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0666)) != -1))
+ if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
{
write (file, buffer + i, finfo.st_size - i);
close (file);
@@ -275,7 +275,7 @@ history_do_write (filename, nelements, overwrite)
mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
output = history_filename (filename);
- if ((file = open (output, mode, 0666)) == -1)
+ if ((file = open (output, mode, 0600)) == -1)
{
FREE (output);
return (errno);
diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c
index 9639a63..ce2e58b 100644
--- a/lib/readline/isearch.c
+++ b/lib/readline/isearch.c
@@ -262,7 +262,7 @@ rl_search_history (direction, invoking_key)
break;
}
- if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT))
+ if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT) && c != CTRL ('g'))
{
rl_execute_next (c);
break;
diff --git a/lib/readline/readline.h b/lib/readline/readline.h
index d6c1a5c..99ec055 100644
--- a/lib/readline/readline.h
+++ b/lib/readline/readline.h
@@ -255,7 +255,7 @@ extern int rl_pending_input;
/* Non-zero if we called this function from _rl_dispatch(). It's present
so functions can find out whether they were called from a key binding
or directly from an application. */
-int rl_dispatching;
+extern int rl_dispatching;
/* The name of the terminal to use. */
extern char *rl_terminal_name;
diff --git a/lib/readline/tilde.c b/lib/readline/tilde.c
index 1d38d9d..fe263a2 100644
--- a/lib/readline/tilde.c
+++ b/lib/readline/tilde.c
@@ -189,7 +189,7 @@ tilde_expand (string)
if (result = strchr (string, '~'))
result = xmalloc (result_size = (strlen (string) + 16));
else
- result = xmalloc (result_size = strlen (string));
+ result = xmalloc (result_size = (strlen (string) + 1));
/* Scan through STRING expanding tildes as we come to them. */
while (1)
diff --git a/lib/tilde/Makefile.in b/lib/tilde/Makefile.in
index c151036..02138fc 100644
--- a/lib/tilde/Makefile.in
+++ b/lib/tilde/Makefile.in
@@ -98,3 +98,6 @@ mostlyclean: clean
tilde.o: tilde.h $(topdir)/ansi_stdlib.h
tilde.o: $(BUILD_DIR)/config.h
+
+# Rules for deficient makes, like SunOS and Solaris
+tilde.o: tilde.c
diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c
index 1d38d9d..fe263a2 100644
--- a/lib/tilde/tilde.c
+++ b/lib/tilde/tilde.c
@@ -189,7 +189,7 @@ tilde_expand (string)
if (result = strchr (string, '~'))
result = xmalloc (result_size = (strlen (string) + 16));
else
- result = xmalloc (result_size = strlen (string));
+ result = xmalloc (result_size = (strlen (string) + 1));
/* Scan through STRING expanding tildes as we come to them. */
while (1)