All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netcat: intergrat two fixes
@ 2013-07-16  5:07 rongqing.li
  2013-07-17 19:55 ` Joe MacDonald
  0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2013-07-16  5:07 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Joe.macdonald

From: "Roy.Li" <rongqing.li@windriver.com>

1. fix a running issue on PPC, since 'char' type has different range of values
on x86 and on PPC.
2. fix a building issue.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
 .../netcat/make-netcat_flag_count_work.patch       |   34 ++++++++++++++++++++
 .../netcat/netcat/netcat-locale_h.patch            |   25 ++++++++++++++
 .../recipes-support/netcat/netcat_0.7.1.bb         |    2 ++
 3 files changed, 61 insertions(+)
 create mode 100644 meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
 create mode 100644 meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch

diff --git a/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
new file mode 100644
index 0000000..dd1938a
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
@@ -0,0 +1,34 @@
+Make netcat_flag_count() return positive value
+
+C language has 3 distinct char types:
+         char
+         unsigned char
+         signed char
+A char has the same range of values as signed char on X86,
+but same as unsigned char on PPC which made netcat_flag_count
+return a negative value, now we force variable c as signed char
+to make netcat_flag_count return positive value.
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy.Li <rongqing.li@windriver.com>
+---
+ src/flagset.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/flagset.c b/src/flagset.c
+index 442b634..54ac898 100644
+--- a/src/flagset.c
++++ b/src/flagset.c
+@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
+ 
+ int netcat_flag_count(void)
+ {
+-  register char c;
++  register signed char c;
+   register int i;
+   int ret = 0;
+ 
+-- 
+1.7.5.4
+
diff --git a/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
new file mode 100644
index 0000000..5cbcb08
--- /dev/null
+++ b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
@@ -0,0 +1,25 @@
+Apparently somewhere along the line HAVE_LOCALE_H was changed to
+HAVE_LC_MESSAGES.  Adjust netcat to match.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: netcat-0.7.1/src/intl.h
+===================================================================
+--- netcat-0.7.1.orig/src/intl.h
++++ netcat-0.7.1/src/intl.h
+@@ -25,11 +25,11 @@
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+ 
+-#ifdef HAVE_LOCALE_H
++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
+ #include <locale.h>
+ #else
+ #error You must have locale.h in your system
+-#endif	/* HAVE_LOCALE_H */
++#endif	/* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
+ 
+ /* Our dear (and very common) gettext macros */
+ #define _(String) gettext(String)
diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
index a4805a4..0bb5c87 100644
--- a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
+++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
@@ -8,6 +8,8 @@ PR = "r3"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
            file://obsolete_autoconf_macros.patch \
+           file://netcat-locale_h.patch \
+           file://make-netcat_flag_count_work.patch \
 "
 
 SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netcat: intergrat two fixes
  2013-07-16  5:07 [PATCH] netcat: intergrat two fixes rongqing.li
@ 2013-07-17 19:55 ` Joe MacDonald
  0 siblings, 0 replies; 2+ messages in thread
From: Joe MacDonald @ 2013-07-17 19:55 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3972 bytes --]

And merged.  Thanks, Roy.

-J.

[[PATCH] netcat: intergrat two fixes] On 13.07.16 (Tue 13:07) rongqing.li@windriver.com wrote:

> From: "Roy.Li" <rongqing.li@windriver.com>
> 
> 1. fix a running issue on PPC, since 'char' type has different range of values
> on x86 and on PPC.
> 2. fix a building issue.
> 
> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> ---
>  .../netcat/make-netcat_flag_count_work.patch       |   34 ++++++++++++++++++++
>  .../netcat/netcat/netcat-locale_h.patch            |   25 ++++++++++++++
>  .../recipes-support/netcat/netcat_0.7.1.bb         |    2 ++
>  3 files changed, 61 insertions(+)
>  create mode 100644 meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
>  create mode 100644 meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
> 
> diff --git a/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
> new file mode 100644
> index 0000000..dd1938a
> --- /dev/null
> +++ b/meta-networking/recipes-support/netcat/netcat/make-netcat_flag_count_work.patch
> @@ -0,0 +1,34 @@
> +Make netcat_flag_count() return positive value
> +
> +C language has 3 distinct char types:
> +         char
> +         unsigned char
> +         signed char
> +A char has the same range of values as signed char on X86,
> +but same as unsigned char on PPC which made netcat_flag_count
> +return a negative value, now we force variable c as signed char
> +to make netcat_flag_count return positive value.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Roy.Li <rongqing.li@windriver.com>
> +---
> + src/flagset.c |    2 +-
> + 1 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/src/flagset.c b/src/flagset.c
> +index 442b634..54ac898 100644
> +--- a/src/flagset.c
> ++++ b/src/flagset.c
> +@@ -134,7 +134,7 @@ unsigned short netcat_flag_next(unsigned short port)
> + 
> + int netcat_flag_count(void)
> + {
> +-  register char c;
> ++  register signed char c;
> +   register int i;
> +   int ret = 0;
> + 
> +-- 
> +1.7.5.4
> +
> diff --git a/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
> new file mode 100644
> index 0000000..5cbcb08
> --- /dev/null
> +++ b/meta-networking/recipes-support/netcat/netcat/netcat-locale_h.patch
> @@ -0,0 +1,25 @@
> +Apparently somewhere along the line HAVE_LOCALE_H was changed to
> +HAVE_LC_MESSAGES.  Adjust netcat to match.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> +
> +Index: netcat-0.7.1/src/intl.h
> +===================================================================
> +--- netcat-0.7.1.orig/src/intl.h
> ++++ netcat-0.7.1/src/intl.h
> +@@ -25,11 +25,11 @@
> + #ifdef ENABLE_NLS
> + #include <libintl.h>
> + 
> +-#ifdef HAVE_LOCALE_H
> ++#if defined(HAVE_LC_MESSAGES) || defined(HAVE_LOCALE_H)
> + #include <locale.h>
> + #else
> + #error You must have locale.h in your system
> +-#endif	/* HAVE_LOCALE_H */
> ++#endif	/* HAVE_LC_MESSAGES || HAVE_LOCALE_H */
> + 
> + /* Our dear (and very common) gettext macros */
> + #define _(String) gettext(String)
> diff --git a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
> index a4805a4..0bb5c87 100644
> --- a/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
> +++ b/meta-networking/recipes-support/netcat/netcat_0.7.1.bb
> @@ -8,6 +8,8 @@ PR = "r3"
>  
>  SRC_URI = "${SOURCEFORGE_MIRROR}/netcat/netcat-${PV}.tar.bz2 \
>             file://obsolete_autoconf_macros.patch \
> +           file://netcat-locale_h.patch \
> +           file://make-netcat_flag_count_work.patch \
>  "
>  
>  SRC_URI[md5sum] = "0a29eff1736ddb5effd0b1ec1f6fe0ef"
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-17 20:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16  5:07 [PATCH] netcat: intergrat two fixes rongqing.li
2013-07-17 19:55 ` Joe MacDonald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.