compat: probe for strcasestr more thoroughly

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 <qsx@chaotikum.eu>
Suggested-by: Florian Weimer <fweimer@redhat.com>
Suggested-by: Tomi Ollila <tomi.ollila@iki.fi>
This commit is contained in:
Michael J Gruber 2023-08-26 16:53:12 +02:00 committed by David Bremner
parent 9a1126241d
commit a84dc2f7e6

View file

@ -1,5 +1,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include <strings.h> #include <strings.h> /* strcasecmp() in POSIX */
#include <string.h> /* strcasecmp() in *BSD */
int int
main () main ()