--- bash-4.1-orig/bashline.c 2013-03-07 07:02:11.927579000 -0600 +++ bash-4.1/bashline.c 2013-03-07 07:33:00.579681700 -0600 @@ -68,6 +68,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 @@ -451,12 +457,12 @@ initialize_readline () 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); @@ -475,8 +481,8 @@ initialize_readline () 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); @@ -499,8 +505,8 @@ initialize_readline () 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. */