Skip to content

Simplify strcasestr check in fileinfo #13365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

petk
Copy link
Member

@petk petk commented Feb 10, 2024

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.

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.
@petk petk merged commit 801787d into php:master Feb 10, 2024
@petk petk deleted the patch-autoconf-fileinfo-strcasestr branch February 10, 2024 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants