From 095e86660fe2993f08a141146ce3fae01af4db02 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 16 Jan 2023 15:52:12 -0800 Subject: [PATCH] netkit-telnet: Drop using register storage class keyword Its dropped since c++17 and modern compilers have started to error on its use Signed-off-by: Khem Raj --- .../0001-Drop-using-register-keyword.patch | 457 ++++++++++++++++++ .../netkit-telnet/netkit-telnet_0.17.bb | 1 + 2 files changed, 458 insertions(+) create mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch diff --git a/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch b/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch new file mode 100644 index 0000000000..f508711d34 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-telnet/files/0001-Drop-using-register-keyword.patch @@ -0,0 +1,457 @@ +From af89f36fbeb5f6a078b349eed8fc4ad6fbfdf5d1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 16 Jan 2023 15:26:12 -0800 +Subject: [PATCH] Drop using register keyword + +Its gone since c++17 + +Fixes +error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] +| register char c; +| ^~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + telnet/commands.cc | 14 +++++++------- + telnet/defines.h | 1 + + telnet/sys_bsd.cc | 2 +- + telnet/telnet.cc | 18 +++++++++--------- + telnet/terminal.cc | 4 ++-- + telnet/tn3270.cc | 4 ++-- + telnet/tn3270.o | Bin 4008 -> 4008 bytes + telnet/utilities.cc | 6 +++--- + telnetd/setproctitle.c | 6 +++--- + telnetd/slc.c | 4 ++-- + telnetd/state.c | 12 ++++++------ + telnetd/sys_term.c | 4 ++-- + telnetd/telnetd.c | 4 ++-- + telnetd/termstat.c | 4 ++-- + telnetd/utility.c | 16 ++++++++-------- + 15 files changed, 50 insertions(+), 49 deletions(-) + +--- a/telnet/commands.cc ++++ b/telnet/commands.cc +@@ -192,8 +192,8 @@ static int margc; + static const char *margv[20]; + + static void makeargv(void) { +- register char *cp, *cp2, c; +- register const char **argp = margv; ++ char *cp, *cp2, c; ++ const char **argp = margv; + + margc = 0; + cp = line; +@@ -204,7 +204,7 @@ static void makeargv(void) { + cp++; + } + while ((c = *cp)!=0) { +- register int inquote = 0; ++ int inquote = 0; + while (isspace(c)) + c = *++cp; + if (c == '\0') +@@ -281,7 +281,7 @@ static const char *control(cc_t c) + * was to assign "c" to an unsigned int variable... + * Arggg.... + */ +- register unsigned int uic = (unsigned int)c; ++ unsigned int uic = (unsigned int)c; + + if (uic == 0x7f) + return ("^?"); +@@ -479,7 +479,7 @@ int send_tncmd(int (*func)(int, int), co + long opt; + + if (isprefix(name, "help") || isprefix(name, "?")) { +- register int col, len; ++ int col, len; + + printf("Usage: send %s