From 7ba44f6b304bf05ad5355d3bd4663d9bd6fb3130 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Tue, 30 Sep 2014 17:23:42 -0700 Subject: readline: update Signed-off-by: Timothy Gu --- src/readline-1.patch | 224 ++++++++++++++++++++++++++++++++++++++++++++++----- src/readline.mk | 9 +-- 2 files changed, 209 insertions(+), 24 deletions(-) diff --git a/src/readline-1.patch b/src/readline-1.patch index 54fc5ec..039cfc1 100644 --- a/src/readline-1.patch +++ b/src/readline-1.patch @@ -1,24 +1,210 @@ This file is part of MXE. See index.html for further information. -From 2ebb1d16beb6774af45bada0bae797e2852bca0a Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Sun, 9 Feb 2014 18:12:20 +0100 -Subject: [PATCH] package readline: add missing semicolon - - -diff --git a/util.c b/util.c -index 6c68ad8..15238c0 100644 ---- a/util.c -+++ b/util.c -@@ -390,6 +390,7 @@ _rl_strnicmp (string1, string2, count) - s2++; - } - while (--count != 0) -+ ; - - return (0); - } +From c0572cecbeadc8fe24c70c5c39d49210a39ac719 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 30 Sep 2014 10:32:33 -0700 +Subject: [PATCH 1/2] signals: safeguard the remaining usage of frequently + missing signals + +--- + input.c | 14 +++++++++++--- + signals.c | 6 ++++++ + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/input.c b/input.c +index 117dfe8..465f0b9 100644 +--- a/input.c ++++ b/input.c +@@ -52,7 +52,7 @@ + #if defined (FIONREAD_IN_SYS_IOCTL) + # include + #endif +- ++ + #include + #include + +@@ -532,9 +532,17 @@ rl_getc (stream) + Otherwise (not EINTR), some error occurred, also signifying EOF. */ + if (errno != EINTR) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); +- else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) ++ else if (_rl_caught_signal == SIGTERM ++#if defined(SIGHUP) ++ || _rl_caught_signal == SIGHUP ++#endif ++ ) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); +- else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) ++ else if (_rl_caught_signal == SIGINT ++#if defined(SIGQUIT) ++ || _rl_caught_signal == SIGQUIT ++#endif ++ ) + RL_CHECK_SIGNALS (); + + if (rl_signal_event_hook) +diff --git a/signals.c b/signals.c +index 61f02f9..7c921d6 100644 +--- a/signals.c ++++ b/signals.c +@@ -216,7 +216,9 @@ _rl_handle_signal (sig) + /* FALLTHROUGH */ + + case SIGTERM: ++#if defined (SIGHUP) + case SIGHUP: ++#endif + #if defined (SIGTSTP) + case SIGTSTP: + case SIGTTOU: +@@ -426,7 +428,9 @@ rl_set_signals () + + rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int); + rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term); ++#if defined (SIGHUP) + rl_maybe_set_sighandler (SIGHUP, rl_signal_handler, &old_hup); ++#endif + #if defined (SIGQUIT) + rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit); + #endif +@@ -491,7 +495,9 @@ rl_clear_signals () + overhead */ + rl_maybe_restore_sighandler (SIGINT, &old_int); + rl_maybe_restore_sighandler (SIGTERM, &old_term); ++#if defined (SIGHUP) + rl_maybe_restore_sighandler (SIGHUP, &old_hup); ++#endif + #if defined (SIGQUIT) + rl_maybe_restore_sighandler (SIGQUIT, &old_quit); + #endif +-- +1.8.3.2 + + +From 6896ffa4fc85bf0dfae58e69a860d2076c1d9fd2 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 30 Sep 2014 17:16:32 -0700 +Subject: [PATCH 2/2] Handle missing S_IS* macros more gracefully + +--- + colors.c | 14 ++++++++++++-- + colors.h | 2 +- + posixstat.h | 16 ++++++++++++++++ + 3 files changed, 29 insertions(+), 3 deletions(-) + +diff --git a/colors.c b/colors.c +index 89d9035..ec19844 100644 +--- a/colors.c ++++ b/colors.c +@@ -152,14 +152,22 @@ _rl_print_color_indicator (char *f) + { + colored_filetype = C_FILE; + ++#if defined (S_ISUID) + if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) + colored_filetype = C_SETUID; +- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) ++ else ++#endif ++#if defined (S_ISGID) ++ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) + colored_filetype = C_SETGID; +- else if (is_colored (C_CAP) && 0) //f->has_capability) ++ else ++#endif ++ if (is_colored (C_CAP) && 0) //f->has_capability) + colored_filetype = C_CAP; ++#if defined(S_IXUGO) + else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) + colored_filetype = C_EXEC; ++#endif + else if ((1 < astat.st_nlink) && is_colored (C_MULTIHARDLINK)) + colored_filetype = C_MULTIHARDLINK; + } +@@ -173,8 +181,10 @@ _rl_print_color_indicator (char *f) + colored_filetype = C_STICKY_OTHER_WRITABLE; + else + #endif ++#if defined (S_IWOTH) + if ((mode & S_IWOTH) != 0 && is_colored (C_OTHER_WRITABLE)) + colored_filetype = C_OTHER_WRITABLE; ++#endif + #if defined (S_ISVTX) + else if ((mode & S_ISVTX) != 0 && is_colored (C_STICKY)) + colored_filetype = C_STICKY; +diff --git a/colors.h b/colors.h +index fc926e5..e62edd0 100644 +--- a/colors.h ++++ b/colors.h +@@ -96,7 +96,7 @@ enum indicator_no + }; + + +-#if !S_IXUGO ++#if !S_IXUGO && defined(S_IXUSR) && defined(S_IXGRP) && defined(S_IXOTH) + # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) + #endif + +diff --git a/posixstat.h b/posixstat.h +index 3eb7f29..854a2c9 100644 +--- a/posixstat.h ++++ b/posixstat.h +@@ -78,30 +78,44 @@ + + #if defined (S_IFBLK) && !defined (S_ISBLK) + #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ ++#elif !defined (S_IFBLK) ++#define S_ISBLK(m) 0 + #endif + + #if defined (S_IFCHR) && !defined (S_ISCHR) + #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ ++#elif !defined (S_IFCHR) ++#define S_ISCHR(m) 0 + #endif + + #if defined (S_IFDIR) && !defined (S_ISDIR) + #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ ++#elif !defined (S_IFDIR) ++#define S_ISDIR(m) 0 + #endif + + #if defined (S_IFREG) && !defined (S_ISREG) + #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ ++#elif !defined (S_IFREG) ++#define S_ISREG(m) 0 + #endif + + #if defined (S_IFIFO) && !defined (S_ISFIFO) + #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ ++#elif !defined (S_IFIFO) ++#define S_ISFIFO(m) 0 + #endif + + #if defined (S_IFLNK) && !defined (S_ISLNK) + #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ ++#elif !defined (S_IFLNK) ++#define S_ISLNK(m) 0 + #endif + + #if defined (S_IFSOCK) && !defined (S_ISSOCK) + #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ ++#elif !defined (S_IFSOCK) ++#define S_ISSOCK(m) 0 + #endif + + /* +@@ -137,6 +151,8 @@ + /* These are non-standard, but are used in builtins.c$symbolic_umask() */ + #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) + #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) ++#if defined(S_IXUSR) && defined(S_IXGRP) && defined(S_IXOTH) + #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) ++#endif + + #endif /* _POSIXSTAT_H_ */ -- -1.8.4.5 +1.8.3.2 diff --git a/src/readline.mk b/src/readline.mk index f2e458d..6abf369 100644 --- a/src/readline.mk +++ b/src/readline.mk @@ -3,8 +3,8 @@ PKG := readline $(PKG)_IGNORE := -$(PKG)_VERSION := 6.2 -$(PKG)_CHECKSUM := a9761cd9c3da485eb354175fcc2fe35856bc43ac +$(PKG)_VERSION := 6.3 +$(PKG)_CHECKSUM := 017b92dc7fd4e636a2b5c9265a77ccc05798c9e1 $(PKG)_SUBDIR := readline-$($(PKG)_VERSION) $(PKG)_FILE := readline-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://ftp.gnu.org/gnu/readline/$($(PKG)_FILE) @@ -18,9 +18,8 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - $(SED) -i 's,^ *case SIGQUIT:.*,,' '$(1)/signals.c' - $(SED) -i 's,^ *case SIGTSTP:.*,,' '$(1)/signals.c' - cd '$(1)' && ./configure \ + cd '$(1)' && bash_cv_wcwidth_broken=no \ + ./configure \ $(MXE_CONFIGURE_OPTS) \ --enable-multibyte \ --without-purify \ -- cgit v0.12