All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Alex DAMIAN <alexandru.damian@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [[Patch v2]] Always use locale.h in grep
Date: Mon, 11 Mar 2013 14:22:14 -0700	[thread overview]
Message-ID: <513E4B06.1020904@linux.intel.com> (raw)
In-Reply-To: <1363015599-26709-1-git-send-email-alexandru.damian@intel.com>


Please fix the subject to reflect which recipe you are affecting.

grep: Always use locale.h

(see below also)
On 03/11/2013 08:26 AM, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> The changes in the grep 2.5 configuration always leave out
> HAVE_LOCALE_H - it has been removed from other files, but
> not from everywhere.
>
> This leads to a crash in certain configurations where the
> size of int is not the size of pointer due to using
> setlocale() while being undeclared.
>
Nice pickup on fixing this bug!

> [YOCTO #3959]
> ---
>   .../grep/grep-2.5.1a/fix64-int-to-pointer.patch       |   17 +++++++++++++++++
>   meta/recipes-extended/grep/grep_2.5.1a.bb             |    3 ++-
>   2 files changed, 19 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
>
> diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
> new file mode 100644
> index 0000000..3b91520
> --- /dev/null
> +++ b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch
> @@ -0,0 +1,17 @@
> +Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure
> +Upstream-Status: Inappropriate [ old version that will not be maintained ]
> +Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com>
> +
> +diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c
> +--- grep-2.5.1a-orig/lib/hard-locale.c	2001-03-04 07:33:12.000000000 +0200
> ++++ grep-2.5.1a/lib/hard-locale.c	2013-03-11 17:05:52.086444891 +0200
> +@@ -38,9 +38,7 @@
> + # endif
> + #endif
> +
> +-#if HAVE_LOCALE_H
> + # include <locale.h>
> +-#endif
> +
> + #if HAVE_STRING_H
> + # include <string.h>
> diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb
> index ebcbe23..b534066 100644
> --- a/meta/recipes-extended/grep/grep_2.5.1a.bb
> +++ b/meta/recipes-extended/grep/grep_2.5.1a.bb
> @@ -11,6 +11,7 @@ SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \
>              file://uclibc-fix.patch \
>              file://grep_fix_for_automake-1.12.patch \
>              file://gettext.patch \
> +           file://fix64-int-to-pointer.patch \
>              file://Makevars \
>              "
>
> @@ -21,7 +22,7 @@ inherit autotools gettext
>
>   EXTRA_OECONF = "--disable-perl-regexp --disable-ncurses"
>
> -CFLAGS += "-D PROTOTYPES"
> +CFLAGS += "-O0 -D PROTOTYPES"

You are also changing the CFLAGS here, does this need to be removed or 
documented.

Sau!
>   do_configure_prepend () {
>   	rm -f ${S}/m4/init.m4
>   	cp -f ${WORKDIR}/Makevars ${S}/po/
>



      reply	other threads:[~2013-03-11 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11 15:19 [PATCH] Always use locale.h in grep Alex DAMIAN
2013-03-11 15:26 ` [[Patch v2]] " Alex DAMIAN
2013-03-11 21:22   ` Saul Wold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513E4B06.1020904@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=alexandru.damian@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.