readline: add missing macros in acinclude.m4
PATCH 1/1 readline: add missing macros in acinclude.m4
From: Fahad Usman <[email protected]>
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)
--- meta/recipes-core/readline/files/acinclude.m4 | 56 +++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-)
meta/recipes-core/readline/files/acinclude.m4 +56 -0
@@ -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 +])
Signature · 1 line
1.7.1
kindly ignore this patch, I was supposed to send it on openembedded-core
Sorry for inconvenience
--
Fahad
Quoted 84 lines · On Mon, Jul 23, 2012 at 2:51 PM, <[email protected]> wrote:
From: Fahad Usman <[email protected]>
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 <[email protected]>--- meta/recipes-core/readline/files/acinclude.m4 | 56 +++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-)meta/recipes-core/readline/files/acinclude.m4 +37
-0@@ -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)
meta/recipes-core/readline/files/acinclude.m4 +19
-1+ 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
Quoted 11 lines · On 07/23/2012 02:51 AM, [email protected] wrote:
From: Fahad Usman <[email protected]>
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 <[email protected]>--- 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!
Quoted 65 lines
meta/recipes-core/readline/files/acinclude.m4 +56
-0@@ -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 +])