On Sat, Aug 26 2023, michaeljgruber wrote:
> From: Michael J Gruber
>
> Depending on compiler (gcc, g++, clang) and standard options (c99, c11),
> string.h may or may not include strings.h, leading to possibly missing
> or conflicting declarations of strcasestr.
>
> Include both so that both detection and compilation phases use the same
> (possibly optimised) implementations.
>
> Suggested-by: Thomas Schneider
> Suggested-by: Florian Weimer
> Suggested-by: Tomi Ollila
> ---
LGTM :D
Tomi
> This is related to the discussion here:
> https://nmbug.notmuchmail.org/nmweb/show/20221202191908.848227-1-qsx%40chaotikum.eu>
>
> We've been carrying FW's version of the patch in Fedora since January.
> The one here is TO's version of TS's original and tested in Fedora.
>
> compat/have_strcasestr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c
> index 3cd1838d..8e004572 100644
> --- a/compat/have_strcasestr.c
> +++ b/compat/have_strcasestr.c
> @@ -1,5 +1,6 @@
> #define _GNU_SOURCE
> -#include
> +#include /* strcasecmp() in POSIX */
> +#include /* strcasecmp() in *BSD */
>
> int
> main ()
> --
> 2.42.0.290.gfcfb41f205
___
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]