From 18a9101c9f60bdc8f59da27cc1c6a161abd02c9d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 17 Jul 2021 17:32:18 +0200 Subject: [PATCH] Fix cross-compilation test results. * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include before testing __GNU_LIBRARY__. * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise. * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise. --- ChangeLog | 8 ++++++++ m4/memmem.m4 | 3 ++- m4/strcasestr.m4 | 5 +++-- m4/strstr.m4 | 5 +++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78590feae9..07ae6c7864 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-07-17 Bruno Haible + + Fix cross-compilation test results. + * m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross-compiling, include + before testing __GNU_LIBRARY__. + * m4/strstr.m4 (gl_FUNC_STRSTR_SIMPLE): Likewise. + * m4/strcasestr.m4 (gl_FUNC_STRCASESTR_SIMPLE): Likewise. + 2021-07-14 Paul Eggert regex: modernize to newer regex bugset diff --git a/m4/memmem.m4 b/m4/memmem.m4 index f4a167b483..6dac766128 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 28 +# memmem.m4 serial 29 dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -50,6 +50,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], dnl Assume that it works on all other platforms (even if not linear). AC_EGREP_CPP([Lucky user], [ +#include /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ diff --git a/m4/strcasestr.m4 b/m4/strcasestr.m4 index e9dc3e29dd..6939144bca 100644 --- a/m4/strcasestr.m4 +++ b/m4/strcasestr.m4 @@ -1,4 +1,4 @@ -# strcasestr.m4 serial 27 +# strcasestr.m4 serial 28 dnl Copyright (C) 2005, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], [gl_cv_func_strcasestr_works_always], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ -#include /* for strcasestr */ +#include /* for __GNU_LIBRARY__, strcasestr */ #ifdef __GNU_LIBRARY__ #include #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 @@ -48,6 +48,7 @@ AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE], dnl linear. AC_EGREP_CPP([Lucky user], [ +#include /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ diff --git a/m4/strstr.m4 b/m4/strstr.m4 index 9604fe226f..a32e9c1221 100644 --- a/m4/strstr.m4 +++ b/m4/strstr.m4 @@ -1,4 +1,4 @@ -# strstr.m4 serial 23 +# strstr.m4 serial 24 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], [gl_cv_func_strstr_works_always], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ -#include /* for strstr */ +#include /* for __GNU_LIBRARY__, strstr */ #ifdef __GNU_LIBRARY__ #include #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 @@ -40,6 +40,7 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], dnl linear. AC_EGREP_CPP([Lucky user], [ +#include /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ -- 2.39.5