[php-src] PR #13365: Simplify strcasestr check in fileinfo
| From: | petk | Date: | Sat, 10 Feb 2024 09:56:44 +0000 |
| Subject: | [php-src] PR #13365: Simplify strcasestr check in fileinfo | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25041@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13365
Author: petk
The strcasestr is not present on Windows and on Solaris 10 until Solaris 11 implementation in
string.h.
At this point strcasestr is not used in the bundled libmagic (file) library due to patch removing
the strcasestr usage in file.c, however future libmagic version bump might need it again. This
simplifies the strcasestr check if available on the system without running the test code and
avoiding the unknown issue when cross-compiling. If found, the HAVE_STRCASESTR is defined, otherwise
the strcasestr.c is added to the build sources.