From 6109bebd80c2873d9a5763436902b17a0d68d21c Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 1 Sep 2019 05:08:39 +0200 Subject: Added gnu-netcat from old portage --- .../gnu-netcat/files/gnu-netcat-LC_CTYPE.patch | 19 +++++++++++++++++++ .../gnu-netcat/files/gnu-netcat-close.patch | 16 ++++++++++++++++ .../gnu-netcat/files/gnu-netcat-flagcount.patch | 22 ++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch create mode 100644 net-analyzer/gnu-netcat/files/gnu-netcat-close.patch create mode 100644 net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch (limited to 'net-analyzer/gnu-netcat/files') diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch new file mode 100644 index 0000000..1c67f92 --- /dev/null +++ b/net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch @@ -0,0 +1,19 @@ +In russian locale, netcat error messages display as '???????' + +Need to set LC_CTYPE along with LC_MESSAGES to correctly display messages in +locales other then C/POSIX +Required for correct i18n support in glibc. + +(bug #200875 by Михаил) + + +--- a/src/netcat.c ++++ b/src/netcat.c +@@ -157,6 +157,7 @@ + connect_sock.domain = PF_INET; + + #ifdef ENABLE_NLS ++ setlocale(LC_CTYPE, ""); + setlocale(LC_MESSAGES, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch new file mode 100644 index 0000000..5c3e4fa --- /dev/null +++ b/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch @@ -0,0 +1,16 @@ +--- netcat-0.7.1.org/doc/netcat.1 2004-01-11 21:48:18.000000000 +0100 ++++ netcat-0.7.1/doc/netcat.1 2010-02-12 17:03:02.000000000 +0100 +@@ -256,6 +256,13 @@ + source address for the connecting socket. + .Sh "Advanced Options" + .IX Subsection "Advanced Options" ++.IP "\fB\-c" 4 ++.IX Item "-c" ++.PD 0 ++.IP "\fB\-\-close" 4 ++.IX Item "--close" ++.PD ++closes connection on EOF from stdin. + .IP "\fB\-i \s-1SECS\s0\fR" 4 + .IX Item "-i SECS" + .PD 0 diff --git a/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch b/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch new file mode 100644 index 0000000..df029a6 --- /dev/null +++ b/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch @@ -0,0 +1,22 @@ +--- bad/netcat-0.7.1/src/flagset.c 2003-12-10 17:18:07.000000000 +0100 ++++ good/netcat-0.7.1/src/flagset.c 2007-03-04 17:38:10.000000000 +0100 +@@ -134,7 +134,7 @@ + + int netcat_flag_count(void) + { +- register char c; ++ register unsigned char c; + register int i; + int ret = 0; + +@@ -154,8 +154,8 @@ + Assumed that the bit number 1 is the sign, and that we will shift the + bit 1 (or the bit that takes its place later) until the the most right, + WHY it has to keep the wrong sign? */ +- ret -= (c >> 7); +- c <<= 1; ++ ret += (c & 1); ++ c >>= 1; + } + } + -- cgit v1.2.3