Files
MSYS2-packages/bash/0003-bash-4.3-readline.patch
2014-03-13 23:16:19 +04:00

55 lines
2.3 KiB
Diff

diff -Naur a/bashline.c b/bashline.c
--- a/bashline.c 2014-03-13 16:36:06.186200000 +0400
+++ b/bashline.c 2014-03-13 16:36:07.293800000 +0400
@@ -71,6 +71,12 @@
# include "pcomplete.h"
#endif
+#ifdef __x86_64__
+#define IMP(x) __imp_##x
+#else
+#define IMP(x) _imp__##x
+#endif
+
/* These should agree with the defines for emacs_mode and vi_mode in
rldefs.h, even though that's not a public readline header file. */
#ifndef EMACS_EDITING_MODE
@@ -495,12 +501,12 @@
kseq[0] = CTRL('J');
kseq[1] = '\0';
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
- extern rl_command_func_t *_imp__rl_vi_editing_mode;
- if (func == rl_vi_editing_mode || func == _imp__rl_vi_editing_mode)
+ extern rl_command_func_t *IMP(rl_vi_editing_mode);
+ if (func == rl_vi_editing_mode || func == IMP(rl_vi_editing_mode))
rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap);
kseq[0] = CTRL('M');
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
- if (func == rl_vi_editing_mode || func == _imp__rl_vi_editing_mode)
+ if (func == rl_vi_editing_mode || func == IMP(rl_vi_editing_mode))
rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap);
#if defined (VI_MODE)
rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap);
@@ -519,8 +525,8 @@
kseq[0] = '~';
kseq[1] = '\0';
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
- extern rl_command_func_t *_imp__rl_tilde_expand;
- if (func == 0 || func == rl_tilde_expand || func == _imp__rl_tilde_expand)
+ extern rl_command_func_t *IMP(rl_tilde_expand);
+ if (func == 0 || func == rl_tilde_expand || func == IMP(rl_tilde_expand))
rl_bind_keyseq_in_map (kseq, bash_complete_username, emacs_meta_keymap);
rl_bind_key_if_unbound_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap);
@@ -543,8 +549,8 @@
kseq[0] = TAB;
kseq[1] = '\0';
func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
- extern rl_command_func_t *_imp__rl_tab_insert;
- if (func == 0 || func == rl_tab_insert || func == _imp__rl_tab_insert)
+ extern rl_command_func_t *IMP(rl_tab_insert);
+ if (func == 0 || func == rl_tab_insert || func == IMP(rl_tab_insert))
rl_bind_key_in_map (TAB, dynamic_complete_history, emacs_meta_keymap);
/* Tell the completer that we want a crack first. */