All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core] [PATCH] readline: add missing macros in acinclude.m4
@ 2012-07-23  9:51 ` fahad.usman
  2012-07-23 12:18   ` Fahad Usman
  2012-07-23 18:28   ` Saul Wold
  0 siblings, 2 replies; 3+ messages in thread
From: fahad.usman @ 2012-07-23  9:51 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Fahad Usman

From: Fahad Usman <fahad_usman@mentor.com>

some bash macros are missing from acinclude.m4 which are added up-stream. This
wasn't actually breaking anything but but it was causing the configure script
to not run all the tests it's intended to run. (by Christopher Larson)

Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
---
 meta/recipes-core/readline/files/acinclude.m4 |   56 +++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/readline/files/acinclude.m4 b/meta/recipes-core/readline/files/acinclude.m4
index 8a45f99..c30a7d3 100644
--- a/meta/recipes-core/readline/files/acinclude.m4
+++ b/meta/recipes-core/readline/files/acinclude.m4
@@ -1813,3 +1813,59 @@ AC_MSG_RESULT($ac_cv_rl_version)
 
 fi
 ])
+
+AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
+[
+AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
+AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
+[AC_TRY_RUN([
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+main(c, v)
+int	c;
+char	*v[];
+{
+	char	*deflocale;
+	unsigned char x;
+	int	r1, r2;
+
+#ifdef HAVE_SETLOCALE
+	/* We take a shot here.  If that locale is not known, try the
+	   system default.  We try this one because '\342' (226) is
+	   known to be a printable character in that locale. */
+	deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
+	if (deflocale == 0)
+		deflocale = setlocale(LC_ALL, "");
+#endif
+
+	x = '\342';
+	r1 = isprint(x);
+	x -= 128;
+	r2 = isprint(x);
+	exit (r1 == 0 || r2 == 0);
+}
+], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
+   [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no)
+    bash_cv_func_ctype_nonascii=no]
+)])
+AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
+if test $bash_cv_func_ctype_nonascii = yes; then
+AC_DEFINE(CTYPE_NON_ASCII)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
+[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
+[AC_TRY_LINK([
+#include <signal.h>
+],[ sig_atomic_t x; ],
+ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
+if test "$ac_cv_have_sig_atomic_t" = "no"
+then
+    AC_CHECK_TYPE(sig_atomic_t,int)
+fi
+])
-- 
1.7.1




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

* Re: [OE-core] [PATCH] readline: add missing macros in acinclude.m4
  2012-07-23  9:51 ` [OE-core] [PATCH] readline: add missing macros in acinclude.m4 fahad.usman
@ 2012-07-23 12:18   ` Fahad Usman
  2012-07-23 18:28   ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Fahad Usman @ 2012-07-23 12:18 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Fahad Usman

kindly ignore this patch, I was supposed to send it on openembedded-core

Sorry for inconvenience

--
Fahad


On Mon, Jul 23, 2012 at 2:51 PM, <fahad.usman@gmail.com> wrote:

> From: Fahad Usman <fahad_usman@mentor.com>
>
> some bash macros are missing from acinclude.m4 which are added up-stream.
> This
> wasn't actually breaking anything but but it was causing the configure
> script
> to not run all the tests it's intended to run. (by Christopher Larson)
>
> Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
> ---
>  meta/recipes-core/readline/files/acinclude.m4 |   56
> +++++++++++++++++++++++++
>  1 files changed, 56 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-core/readline/files/acinclude.m4
> b/meta/recipes-core/readline/files/acinclude.m4
> index 8a45f99..c30a7d3 100644
> --- a/meta/recipes-core/readline/files/acinclude.m4
> +++ b/meta/recipes-core/readline/files/acinclude.m4
> @@ -1813,3 +1813,59 @@ AC_MSG_RESULT($ac_cv_rl_version)
>
>  fi
>  ])
> +
> +AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
> +[
> +AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
> +AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
> +[AC_TRY_RUN([
> +#ifdef HAVE_LOCALE_H
> +#include <locale.h>
> +#endif
> +#include <stdio.h>
> +#include <ctype.h>
> +
> +main(c, v)
> +int    c;
> +char   *v[];
> +{
> +       char    *deflocale;
> +       unsigned char x;
> +       int     r1, r2;
> +
> +#ifdef HAVE_SETLOCALE
> +       /* We take a shot here.  If that locale is not known, try the
> +          system default.  We try this one because '\342' (226) is
> +          known to be a printable character in that locale. */
> +       deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
> +       if (deflocale == 0)
> +               deflocale = setlocale(LC_ALL, "");
> +#endif
> +
> +       x = '\342';
> +       r1 = isprint(x);
> +       x -= 128;
> +       r2 = isprint(x);
> +       exit (r1 == 0 || r2 == 0);
> +}
> +], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
> +   [AC_MSG_WARN(cannot check ctype macros if cross compiling --
> defaulting to no)
> +    bash_cv_func_ctype_nonascii=no]
> +)])
> +AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
> +if test $bash_cv_func_ctype_nonascii = yes; then
> +AC_DEFINE(CTYPE_NON_ASCII)
> +fi
> +])
> +
> +AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
> +[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
> +[AC_TRY_LINK([
> +#include <signal.h>
> +],[ sig_atomic_t x; ],
> +ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
> +if test "$ac_cv_have_sig_atomic_t" = "no"
> +then
> +    AC_CHECK_TYPE(sig_atomic_t,int)
> +fi
> +])
> --
> 1.7.1
>
>


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

* Re: [OE-core] [PATCH] readline: add missing macros in acinclude.m4
  2012-07-23  9:51 ` [OE-core] [PATCH] readline: add missing macros in acinclude.m4 fahad.usman
  2012-07-23 12:18   ` Fahad Usman
@ 2012-07-23 18:28   ` Saul Wold
  1 sibling, 0 replies; 3+ messages in thread
From: Saul Wold @ 2012-07-23 18:28 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Fahad Usman

On 07/23/2012 02:51 AM, fahad.usman@gmail.com wrote:
> From: Fahad Usman <fahad_usman@mentor.com>
>
> some bash macros are missing from acinclude.m4 which are added up-stream. This
> wasn't actually breaking anything but but it was causing the configure script
> to not run all the tests it's intended to run. (by Christopher Larson)
>
> Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
> ---
>   meta/recipes-core/readline/files/acinclude.m4 |   56 +++++++++++++++++++++++++
>   1 files changed, 56 insertions(+), 0 deletions(-)
>
You would need a PR bump in the readline .bb files, did you test this 
with the 5.2 version and the 6.2 version?

If this was pulled from the 6.2 version, then you will need to also 
modify the 5.2 bb file to use the older version of the macro file to not 
do any gplv3 contamination, please use caution here, we need to ensure 
correct separation.

Sau!
> diff --git a/meta/recipes-core/readline/files/acinclude.m4 b/meta/recipes-core/readline/files/acinclude.m4
> index 8a45f99..c30a7d3 100644
> --- a/meta/recipes-core/readline/files/acinclude.m4
> +++ b/meta/recipes-core/readline/files/acinclude.m4
> @@ -1813,3 +1813,59 @@ AC_MSG_RESULT($ac_cv_rl_version)
>
>   fi
>   ])
> +
> +AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
> +[
> +AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
> +AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
> +[AC_TRY_RUN([
> +#ifdef HAVE_LOCALE_H
> +#include <locale.h>
> +#endif
> +#include <stdio.h>
> +#include <ctype.h>
> +
> +main(c, v)
> +int	c;
> +char	*v[];
> +{
> +	char	*deflocale;
> +	unsigned char x;
> +	int	r1, r2;
> +
> +#ifdef HAVE_SETLOCALE
> +	/* We take a shot here.  If that locale is not known, try the
> +	   system default.  We try this one because '\342' (226) is
> +	   known to be a printable character in that locale. */
> +	deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
> +	if (deflocale == 0)
> +		deflocale = setlocale(LC_ALL, "");
> +#endif
> +
> +	x = '\342';
> +	r1 = isprint(x);
> +	x -= 128;
> +	r2 = isprint(x);
> +	exit (r1 == 0 || r2 == 0);
> +}
> +], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
> +   [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no)
> +    bash_cv_func_ctype_nonascii=no]
> +)])
> +AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
> +if test $bash_cv_func_ctype_nonascii = yes; then
> +AC_DEFINE(CTYPE_NON_ASCII)
> +fi
> +])
> +
> +AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
> +[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
> +[AC_TRY_LINK([
> +#include <signal.h>
> +],[ sig_atomic_t x; ],
> +ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
> +if test "$ac_cv_have_sig_atomic_t" = "no"
> +then
> +    AC_CHECK_TYPE(sig_atomic_t,int)
> +fi
> +])
>




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

end of thread, other threads:[~2012-07-23 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <fahad.usman@gmail.com>
2012-07-23  9:51 ` [OE-core] [PATCH] readline: add missing macros in acinclude.m4 fahad.usman
2012-07-23 12:18   ` Fahad Usman
2012-07-23 18:28   ` Saul Wold

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.