To: roemer@in.tum.de Cc: Moritz Moeller-Herrmann Cc: vim-dev@vim.org Subject: patch 5.4.18 (was: Vim 5.4 linking error - readline related?) In-Reply-To: <19990809102116.G26118@hemd.informatik.tu-muenchen.de> Fcc: outbox From: Bram Moolenaar ------------ Stefan Romer wrote: > On Sun, 8 Aug 1999, Moritz Moeller-Herrmann wrote: > > /usr/lib/libreadline.a(history.o): In function `clear_history': > > history.o(.text+0x5d0): multiple definition of `clear_history' > > ex_getln.o:/home/moritz/download/vim-5.4/src/ex_getln.c:3201: first defined > > here > > > > I did enable the readline support in python, is there a conflict there? Or > > did an upgrade to readline after installing python cause this? > > Any ideas anyone? > > Oops, that seems to be a name clash introduced by the new history features > of Vim 5.4. Sorry, I don't use the Python integration, so I didn't know that > this identifier is already in use. Apparently no-one else noticed this so far. > > Attached is a patch that renames that Vim function. Please apply it again > a clean Vim 5.4 source. Good. Let's turn this into an official patch: Patch 5.4.18 Problem: Python: The clear_history() function also exists in a library. Solution: Rename clear_history() to clr_history(). Files: src/ex_getln.c, src/eval.c, src/proto/ex_getln.pro *** ../vim-5.4/src/ex_getln.c Sun Jul 25 22:02:05 1999 --- src/ex_getln.c Mon Aug 9 11:31:44 1999 *************** *** 3196,3202 **** * "histype" may be HIST_CMD, HIST_SEARCH, HIST_EXPR or HIST_INPUT. */ int ! clear_history(histype) int histype; { int i; --- 3196,3202 ---- * "histype" may be HIST_CMD, HIST_SEARCH, HIST_EXPR or HIST_INPUT. */ int ! clr_history(histype) int histype; { int i; *** ../vim-5.4/src/eval.c Sun Jul 25 22:02:03 1999 --- src/eval.c Mon Aug 9 11:31:39 1999 *************** *** 3152,3158 **** if (argvars[1].var_type == VAR_UNKNOWN) /* only one argument: clear entire history */ ! n = clear_history(get_histtype(get_var_string(&argvars[0]))); else if (argvars[1].var_type == VAR_NUMBER) /* index given: remove that entry */ n = del_history_idx(get_histtype(get_var_string(&argvars[0])), --- 3152,3158 ---- if (argvars[1].var_type == VAR_UNKNOWN) /* only one argument: clear entire history */ ! n = clr_history(get_histtype(get_var_string(&argvars[0]))); else if (argvars[1].var_type == VAR_NUMBER) /* index given: remove that entry */ n = del_history_idx(get_histtype(get_var_string(&argvars[0])), *** ../vim-5.4/src/proto/ex_getln.pro Sun Jul 25 22:01:58 1999 --- src/proto/ex_getln.pro Mon Aug 9 11:31:50 1999 *************** *** 17,23 **** void add_to_history __ARGS((int histype, char_u *new_entry, int in_map)); int get_history_idx __ARGS((int histype)); char_u *get_history_entry __ARGS((int histype, int idx)); ! int clear_history __ARGS((int histype)); int del_history_entry __ARGS((int histype, char_u *str)); int del_history_idx __ARGS((int histype, int idx)); void remove_key_from_history __ARGS((void)); --- 17,23 ---- void add_to_history __ARGS((int histype, char_u *new_entry, int in_map)); int get_history_idx __ARGS((int histype)); char_u *get_history_entry __ARGS((int histype, int idx)); ! int clr_history __ARGS((int histype)); int del_history_entry __ARGS((int histype, char_u *str)); int del_history_idx __ARGS((int histype, int idx)); void remove_key_from_history __ARGS((void)); *** ../vim-5.4/src/version.h Sun Aug 8 21:30:06 1999 --- src/version.h Mon Aug 9 11:37:30 1999 *************** *** 19,26 **** #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 17 ! #define VIM_VERSION_PATCHLEVEL_STR "17" /* * VIM_VERSION_NODOT is used for the runtime directory name. --- 19,26 ---- #define VIM_VERSION_MINOR_STR "4" #define VIM_VERSION_BUILD 57 #define VIM_VERSION_BUILD_STR "57" ! #define VIM_VERSION_PATCHLEVEL 18 ! #define VIM_VERSION_PATCHLEVEL_STR "18" /* * VIM_VERSION_NODOT is used for the runtime directory name. *************** *** 30,35 **** */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.17" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.17 (1999 Aug 8)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.17 (1999 Aug 8, compiled " --- 30,35 ---- */ #define VIM_VERSION_NODOT "vim54" #define VIM_VERSION_SHORT "5.4" ! #define VIM_VERSION_MEDIUM "5.4.18" ! #define VIM_VERSION_LONG "VIM - Vi IMproved 5.4.18 (1999 Aug 9)" ! #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 5.4.18 (1999 Aug 9, compiled " -- login: yes password: I don't know, please tell me password is incorrect login: yes password: incorrect --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /