diff options
Diffstat (limited to 'meta-networking/recipes-support/tnftp')
3 files changed, 108 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch new file mode 100644 index 0000000000..bbd6c78434 --- /dev/null +++ b/meta-networking/recipes-support/tnftp/tnftp/0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch | |||
@@ -0,0 +1,77 @@ | |||
1 | From 46477eb182af51b5da8299b295a6d61e566e3693 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 14 Jun 2024 06:27:19 +0000 | ||
4 | Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t | ||
5 | |||
6 | Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/refresh.c.diff?r1=1.57&r2=1.58&only_with_tag=MAIN&f=h] | ||
7 | |||
8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
9 | --- | ||
10 | libedit/refresh.c | 16 +++++++++------- | ||
11 | 1 file changed, 9 insertions(+), 7 deletions(-) | ||
12 | |||
13 | diff --git a/libedit/refresh.c b/libedit/refresh.c | ||
14 | index 093f993..a6d4574 100644 | ||
15 | --- a/libedit/refresh.c | ||
16 | +++ b/libedit/refresh.c | ||
17 | @@ -111,7 +111,7 @@ re_nextline(EditLine *el) | ||
18 | */ | ||
19 | if (el->el_refresh.r_cursor.v + 1 >= el->el_terminal.t_size.v) { | ||
20 | int i, lins = el->el_terminal.t_size.v; | ||
21 | - wchar_t *firstline = el->el_vdisplay[0]; | ||
22 | + wint_t *firstline = el->el_vdisplay[0]; | ||
23 | |||
24 | for(i = 1; i < lins; i++) | ||
25 | el->el_vdisplay[i - 1] = el->el_vdisplay[i]; | ||
26 | @@ -340,7 +340,8 @@ re_refresh(EditLine *el) | ||
27 | ELRE_DEBUG(1, (__F, "updating %d lines.\r\n", el->el_refresh.r_newcv)); | ||
28 | for (i = 0; i <= el->el_refresh.r_newcv; i++) { | ||
29 | /* NOTE THAT re_update_line MAY CHANGE el_display[i] */ | ||
30 | - re_update_line(el, el->el_display[i], el->el_vdisplay[i], i); | ||
31 | + re_update_line(el, (wchar_t *)el->el_display[i], | ||
32 | + (wchar_t *)el->el_vdisplay[i], i); | ||
33 | |||
34 | /* | ||
35 | * Copy the new line to be the current one, and pad out with | ||
36 | @@ -349,8 +350,9 @@ re_refresh(EditLine *el) | ||
37 | * end of the screen line, it won't be a NUL or some old | ||
38 | * leftover stuff. | ||
39 | */ | ||
40 | - re__copy_and_pad(el->el_display[i], el->el_vdisplay[i], | ||
41 | - (size_t) el->el_terminal.t_size.h); | ||
42 | + re__copy_and_pad((wchar_t *)el->el_display[i], | ||
43 | + (wchar_t *)el->el_vdisplay[i], | ||
44 | + (size_t) el->el_terminal.t_size.h); | ||
45 | } | ||
46 | ELRE_DEBUG(1, (__F, | ||
47 | "\r\nel->el_refresh.r_cursor.v=%d,el->el_refresh.r_oldcv=%d i=%d\r\n", | ||
48 | @@ -361,7 +363,7 @@ re_refresh(EditLine *el) | ||
49 | terminal_move_to_line(el, i); | ||
50 | terminal_move_to_char(el, 0); | ||
51 | /* This wcslen should be safe even with MB_FILL_CHARs */ | ||
52 | - terminal_clear_EOL(el, (int) wcslen(el->el_display[i])); | ||
53 | + terminal_clear_EOL(el, (int) wcslen((const wchar_t *)el->el_display[i])); | ||
54 | #ifdef DEBUG_REFRESH | ||
55 | terminal_overwrite(el, L"C\b", 2); | ||
56 | #endif /* DEBUG_REFRESH */ | ||
57 | @@ -1097,7 +1099,7 @@ re_refresh_cursor(EditLine *el) | ||
58 | static void | ||
59 | re_fastputc(EditLine *el, wint_t c) | ||
60 | { | ||
61 | - wchar_t *lastline; | ||
62 | + wint_t *lastline; | ||
63 | int w; | ||
64 | |||
65 | w = wcwidth(c); | ||
66 | @@ -1132,7 +1134,7 @@ re_fastputc(EditLine *el, wint_t c) | ||
67 | el->el_cursor.v++; | ||
68 | lastline = el->el_display[++el->el_refresh.r_oldcv]; | ||
69 | } | ||
70 | - re__copy_and_pad(lastline, L"", (size_t)el->el_terminal.t_size.h); | ||
71 | + re__copy_and_pad((wchar_t *)lastline, L"", (size_t)el->el_terminal.t_size.h); | ||
72 | |||
73 | if (EL_HAS_AUTO_MARGINS) { | ||
74 | if (EL_HAS_MAGIC_MARGINS) { | ||
75 | -- | ||
76 | 2.35.5 | ||
77 | |||
diff --git a/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch b/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch new file mode 100644 index 0000000000..c041d0a9da --- /dev/null +++ b/meta-networking/recipes-support/tnftp/tnftp/0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 5c8334f86d139de987c716a0d5acc0f40d8d3b7d Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Fri, 14 Jun 2024 06:38:37 +0000 | ||
4 | Subject: [PATCH] Add casts to appease conversions between wchar_t and wint_t | ||
5 | |||
6 | Upstream-Status: Backport [http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/terminal.c.diff?r1=1.43&r2=1.44&only_with_tag=MAIN&f=h] | ||
7 | |||
8 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
9 | --- | ||
10 | libedit/terminal.c | 3 ++- | ||
11 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/libedit/terminal.c b/libedit/terminal.c | ||
14 | index 19cee48..13f7bcd 100644 | ||
15 | --- a/libedit/terminal.c | ||
16 | +++ b/libedit/terminal.c | ||
17 | @@ -594,7 +594,8 @@ mc_again: | ||
18 | * NOTE THAT terminal_overwrite() WILL CHANGE | ||
19 | * el->el_cursor.h!!! | ||
20 | */ | ||
21 | - terminal_overwrite(el, &el->el_display[ | ||
22 | + terminal_overwrite(el, | ||
23 | + (wchar_t *)&el->el_display[ | ||
24 | el->el_cursor.v][el->el_cursor.h], | ||
25 | (size_t)(where - el->el_cursor.h)); | ||
26 | |||
27 | -- | ||
28 | 2.35.5 | ||
29 | |||
diff --git a/meta-networking/recipes-support/tnftp/tnftp_20230507.bb b/meta-networking/recipes-support/tnftp/tnftp_20230507.bb index bdd9759f26..4ab694fbba 100644 --- a/meta-networking/recipes-support/tnftp/tnftp_20230507.bb +++ b/meta-networking/recipes-support/tnftp/tnftp_20230507.bb | |||
@@ -16,6 +16,8 @@ DEPENDS = "ncurses" | |||
16 | 16 | ||
17 | SRC_URI = "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \ | 17 | SRC_URI = "https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \ |
18 | file://0001-libedit-Include-missing-header-stdc-predef.h.patch \ | 18 | file://0001-libedit-Include-missing-header-stdc-predef.h.patch \ |
19 | file://0001-Add-casts-to-appease-conversions-between-wchar_t-and.patch \ | ||
20 | file://0002-Add-casts-to-appease-conversions-between-wchar_t-and.patch \ | ||
19 | " | 21 | " |
20 | 22 | ||
21 | inherit autotools update-alternatives pkgconfig | 23 | inherit autotools update-alternatives pkgconfig |