Re: libedit
On Wed, Oct 09, 2019 at 11:20:22AM +0100, Patrick Welche wrote: > On Wed, Oct 09, 2019 at 11:11:54AM +0100, Patrick Welche wrote: > > On Wed, Oct 09, 2019 at 10:52:54AM +0100, Patrick Welche wrote: > > > here seems to be some sort of out by one error (/bin/sh): > > > > > > cd Ne[tab] -> cd NetBS > > > > > > That wasn't the case before this morning's update... > > > > Trivial fix on the way: > > > > The stpncpy() and strncpy() functions copy at most len characters > > The strlcpy() function copies up to size - 1 characters > > This fixes it, but seems to defeat the point of using strlcpy - rather > leave as strncpy? Already fixed by Christos - thanks! Patrick
Re: libedit
On Wed, Oct 09, 2019 at 11:11:54AM +0100, Patrick Welche wrote: > On Wed, Oct 09, 2019 at 10:52:54AM +0100, Patrick Welche wrote: > > here seems to be some sort of out by one error (/bin/sh): > > > > cd Ne[tab] -> cd NetBS > > > > That wasn't the case before this morning's update... > > Trivial fix on the way: > > The stpncpy() and strncpy() functions copy at most len characters > The strlcpy() function copies up to size - 1 characters This fixes it, but seems to defeat the point of using strlcpy - rather leave as strncpy? Cheers, Patrick Index: filecomplete.c === RCS file: /cvsroot/src/lib/libedit/filecomplete.c,v retrieving revision 1.60 diff -u -r1.60 filecomplete.c --- filecomplete.c 8 Oct 2019 19:21:40 - 1.60 +++ filecomplete.c 9 Oct 2019 10:19:36 - @@ -507,7 +507,7 @@ el_free(match_list); return NULL; } - (void)strlcpy(retstr, match_list[1], max_equal); + (void)strlcpy(retstr, match_list[1], max_equal + 1); match_list[0] = retstr; /* add NULL as last pointer to the array */
Re: libedit
On Wed, Oct 09, 2019 at 10:52:54AM +0100, Patrick Welche wrote: > here seems to be some sort of out by one error (/bin/sh): > > cd Ne[tab] -> cd NetBS > > That wasn't the case before this morning's update... Trivial fix on the way: The stpncpy() and strncpy() functions copy at most len characters The strlcpy() function copies up to size - 1 characters P
libedit
here seems to be some sort of out by one error (/bin/sh): cd Ne[tab] -> cd NetBS That wasn't the case before this morning's update... Cheers, Patrick
Re: libedit, clean auto-generated
I've nuked /use/obj (to which the various /use/src/.../obj directories point), and /use/src/compat/amd64/i386/obj. What else, or what -really- needs to be attended to? Regards, -bch On Apr 20, 2016 7:17 AM, "Robert Swindells" <r...@fdy2.co.uk> wrote: > > bch <brad.har...@gmail.com> wrote: > >So, my ./build.sh distribution has been failing for a couple days w/ > >libedit. I see an update the the UPDATING doc about clearing out > >autogenerated files, so I nuked my obj dir, and nuked > >./src/lib/libedit and re-pulled from CVS, but I'm still getting this. > >Related, or coincidence? Is there something else that I need to clean > >out? > > Did you clean out both obj directories as described in UPDATING ? > >
Re: libedit, clean auto-generated
bch <brad.har...@gmail.com> wrote: >So, my ./build.sh distribution has been failing for a couple days w/ >libedit. I see an update the the UPDATING doc about clearing out >autogenerated files, so I nuked my obj dir, and nuked >./src/lib/libedit and re-pulled from CVS, but I'm still getting this. >Related, or coincidence? Is there something else that I need to clean >out? Did you clean out both obj directories as described in UPDATING ?
libedit, clean auto-generated
So, my ./build.sh distribution has been failing for a couple days w/ libedit. I see an update the the UPDATING doc about clearing out autogenerated files, so I nuked my obj dir, and nuked ./src/lib/libedit and re-pulled from CVS, but I'm still getting this. Related, or coincidence? Is there something else that I need to clean out? Regards, -bch Build failure: [...] dependall ===> lib/libedit dependall ===> lib/libedit/readline # compile libedit/editline.o /usr/src/obj/tooldir.NetBSD-7.99.27-amd64/bin/x86_64--netbsd-gcc -O2 -std=gnu99-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror -Wconversion -fPIE -Wunused-parameter --sysroot=/usr/src/obj/destdir.amd64 -I. -I/usr/src/lib/libedit -I. -I/usr/src/lib/libedit -c -Wno-cast-qual editline.c -o editline.o In file included from editline.c:11:0: help.c:5:35: error: redefinition of 'el_func_help' static const struct el_bindings_t el_func_help[] = { ^ In file included from help.c:4:0, from editline.c:11: help.h:2:35: note: previous definition of 'el_func_help' was here static const struct el_bindings_t el_func_help[] = { ^ In file included from /usr/src/lib/libedit/map.c:56:0, from editline.c:14: ./func.h:2:24: error: redefinition of 'el_func' static const el_func_t el_func[] = { ^ In file included from editline.c:9:0: fcns.c:7:24: note: previous definition of 'el_func' was here static const el_func_t el_func[] = { ^ In file included from /usr/src/lib/libedit/map.c:57:0, from editline.c:14: ./help.h:2:35: error: redefinition of 'el_func_help' static const struct el_bindings_t el_func_help[] = { ^ In file included from editline.c:11:0: help.c:5:35: note: previous definition of 'el_func_help' was here static const struct el_bindings_t el_func_help[] = { ^ In file included from editline.c:9:0: fcns.c:58:28: error: 'func__get' defined but not used [-Werror=unused-function] protected const el_func_t* func__get(void) { return el_func; } ^ In file included from editline.c:11:0: help.c:200:32: error: 'help__get' defined but not used [-Werror=unused-function] protected const el_bindings_t* help__get(void){ return el_func_help; } ^ cc1: all warnings being treated as errors *** Failed target: editline.o *** Failed command: /usr/src/obj/tooldir.NetBSD-7.99.27-amd64/bin/x86_64--netbsd-gcc -O2 -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror -Wconversion -fPIE -Wunused-parameter --sysroot=/usr/src/obj/destdir.amd64 -I. -I/usr/src/lib/libedit -I. -I/usr/src/lib/libedit -c -Wno-cast-qual editline.c -o editline.o *** Error code 1 Stop. nbmake[6]: stopped in /usr/src/lib/libedit *** Failed target: dependall *** Failed command: cd "/usr/src/lib/libedit"; /usr/src/obj/tooldir.NetBSD-7.99.27-amd64/bin/nbmake realall *** Error code 1 Stop. nbmake[5]: stopped in /usr/src/lib/libedit *** Failed target: dependall-libedit *** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="lib/"; real="/usr/src/lib" ;; *) this="lib/${dir}/"; real="/usr/src/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /usr/src/obj/tooldir.NetBSD-7.99.27-amd64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget libedit dependall *** Error code 1 Stop. nbmake[4]: stopped in /usr/src/lib [...]
Re: Recent libedit
On Wed, Jun 03, 2015 at 12:15:19PM +0900, Ryo ONODERA wrote: For mysql56-client, I think that bundled editline should be used. We had quite a few problems with that one in the past too and it is another library that should be used natively if possible, to avoid interop problems. Joerg
Re: Recent libedit
On Jun 3, 4:57am, ryo...@yk.rim.or.jp (Ryo ONODERA) wrote: -- Subject: Re: Recent libedit | For your information, databases/mysql55-client WITH | patch-cmake_readline.cmake build is also fixed. | | Thank you. Excellent, thanks! christos
Re: Recent libedit
From: chris...@astron.com (Christos Zoulas), Date: Tue, 2 Jun 2015 15:37:07 + (UTC) In article 20150602.234915.1113846716318097965.ryo...@yk.rim.or.jp, Ryo ONODERA ryo...@yk.rim.or.jp wrote: Hi, It seems that NetBSD current's readline emulation is incomplete. It uses CPPFunction etc. and MySQL detects it. Following patch fixes databases/mysql55-client without patch-cmake_readline.cmake build. Applied, thanks. For your information, databases/mysql55-client WITH patch-cmake_readline.cmake build is also fixed. Thank you. christos -- Ryo ONODERA // ryo...@yk.rim.or.jp PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Re: Recent libedit
Hi, From: Hisashi T Fujinaka ht...@twofifty.com, Date: Tue, 2 Jun 2015 13:58:22 -0700 (PDT) On Tue, 2 Jun 2015, Christos Zoulas wrote: On Jun 3, 4:57am, ryo...@yk.rim.or.jp (Ryo ONODERA) wrote: -- Subject: Re: Recent libedit | For your information, databases/mysql55-client WITH | patch-cmake_readline.cmake build is also fixed. | | Thank you. Excellent, thanks! I'm not sure this fixes databases/mysql56-client. At least I'm still seeing build errors. It seems that MySQL 5.6 has no readline support. It supports older editline (libedit) only. Our libedit is almost fully compatible with readline, and our libedit is no longer supported. For mysql56-client, I think that bundled editline should be used. -- Hisashi T Fujinaka - ht...@twofifty.com BSEE + BSChem + BAEnglish + MSCS + $2.50 = coffee -- Ryo ONODERA // ryo...@yk.rim.or.jp PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
Recent libedit
Hi, It seems that NetBSD current's readline emulation is incomplete. It uses CPPFunction etc. and MySQL detects it. Following patch fixes databases/mysql55-client without patch-cmake_readline.cmake build. Index: readline.c === RCS file: /cvsroot/src/lib/libedit/readline.c,v retrieving revision 1.116 diff -u -r1.116 readline.c --- readline.c 26 May 2015 19:59:21 - 1.116 +++ readline.c 2 Jun 2015 14:45:00 - @@ -78,7 +78,7 @@ int rl_point = 0; int rl_end = 0; char *rl_line_buffer = NULL; -VCPFunction *rl_linefunc = NULL; +rl_vcpfunc_t *rl_linefunc = NULL; int rl_done = 0; VFunction *rl_event_hook = NULL; KEYMAP_ENTRY_ARRAY emacs_standard_keymap, @@ -107,9 +107,9 @@ char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; char *rl_completer_quote_characters = NULL; -CPFunction *rl_completion_entry_function = NULL; +rl_compentry_func_t *rl_completion_entry_function = NULL; char *(*rl_completion_word_break_hook)(void) = NULL; -CPPFunction *rl_attempted_completion_function = NULL; +rl_completion_func_t *rl_attempted_completion_function = NULL; Function *rl_pre_input_hook = NULL; Function *rl_startup1_hook = NULL; int (*rl_getc_function)(FILE *) = NULL; @@ -1831,7 +1831,7 @@ /* Just look at how many global variables modify this operation! */ return fn_complete(e, - (CPFunction *)rl_completion_entry_function, + (rl_compentry_func_t *)rl_completion_entry_function, rl_attempted_completion_function, ct_decode_string(rl_basic_word_break_characters, wbreak_conv), ct_decode_string(breakchars, sprefix_conv), @@ -2009,7 +2009,7 @@ } void -rl_callback_handler_install(const char *prompt, VCPFunction *linefunc) +rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc) { if (e == NULL) { rl_initialize(); Index: readline/readline.h === RCS file: /cvsroot/src/lib/libedit/readline/readline.h,v retrieving revision 1.35 diff -u -r1.35 readline.h --- readline/readline.h 26 May 2015 19:59:21 - 1.35 +++ readline/readline.h 2 Jun 2015 14:45:00 - @@ -39,9 +39,9 @@ /* typedefs */ typedef int Function(const char *, int); typedef void VFunction(void); -typedef void VCPFunction(char *); -typedef char*CPFunction(const char *, int); -typedef char **CPPFunction(const char *, int, int); +typedef void rl_vcpfunc_t(char *); +typedef char*rl_compentry_func_t(const char *, int); +typedef char **rl_completion_func_t(const char *, int, int); typedef char *rl_compentry_func_t(const char *, int); typedef int rl_command_func_t(int, int); @@ -108,9 +108,9 @@ extern char*rl_basic_word_break_characters; extern char*rl_completer_word_break_characters; extern char*rl_completer_quote_characters; -extern CPFunction *rl_completion_entry_function; +extern rl_compentry_func_t *rl_completion_entry_function; extern char*(*rl_completion_word_break_hook)(void); -extern CPPFunction *rl_attempted_completion_function; +extern rl_completion_func_t *rl_attempted_completion_function; extern int rl_attempted_completion_over; extern int rl_completion_type; extern int rl_completion_query_items; @@ -175,7 +175,7 @@ char *username_completion_function(const char *, int); int rl_complete(int, int); int rl_read_key(void); -char **completion_matches(const char *, CPFunction *); +char **completion_matches(const char *, rl_compentry_func_t *); voidrl_display_match_list(char **, int, int); int rl_insert(int, int); @@ -184,7 +184,7 @@ int rl_bind_key(int, rl_command_func_t *); int rl_newline(int, int); voidrl_callback_read_char(void); -voidrl_callback_handler_install(const char *, VCPFunction *); +voidrl_callback_handler_install(const char *, rl_vcpfunc_t *); voidrl_callback_handler_remove(void); voidrl_redisplay(void); int rl_get_previous_history(int, int); -- Ryo ONODERA // ryo...@yk.rim.or.jp PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3