summaryrefslogtreecommitdiff
path: root/net-analyzer/gnu-netcat/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/gnu-netcat/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/gnu-netcat/files')
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-LC_CTYPE.patch19
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-close.patch16
-rw-r--r--net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch22
3 files changed, 57 insertions, 0 deletions
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 000000000000..1c67f92e6c2a
--- /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 000000000000..eb1862d1fd52
--- /dev/null
+++ b/net-analyzer/gnu-netcat/files/gnu-netcat-close.patch
@@ -0,0 +1,16 @@
+--- a/doc/netcat.1
++++ b/doc/netcat.1
+@@ -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 000000000000..765212cb0e99
--- /dev/null
+++ b/net-analyzer/gnu-netcat/files/gnu-netcat-flagcount.patch
@@ -0,0 +1,22 @@
+--- a/src/flagset.c
++++ b/src/flagset.c
+@@ -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;
+ }
+ }
+