Skip to content

Autotools: Obsolete PHP_TEST_BUILD, PHP_BUILD_THREAD_SAFE, and PHP_DEF_HAVE #15802

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
Sep 8, 2024

Conversation

petk
Copy link
Member

@petk petk commented Sep 8, 2024

The PHP_BUILD_THREAD_SAFE macro is a simple wrapper around setting the enable_zts variable and can't be used in PHP extensions realistically.

The PHP_TEST_BUILD macro might produce warnings on certain compiler configurations and default AC_* macros like AC_LINK_IFELSE, AC_CHECK_LIB, or AC_CHECK_FUNC are better suited for such checks. Also, a quick browse through the open-source PHP extensions doesn't find usages of this macro except in imap extension where patch is was already sent:
php/pecl-mail-imap#11

PHP_DEF_HAVE is a wrapper around AC_DEFINE and using AC_DEFINE_UNQUOTED and AS_TR_CPP are better suited for this task where also help text can be passed. Edit: Also usages around the open source PHP extensions have been checked and patches sent where found.

…F_HAVE

The PHP_BUILD_THREAD_SAFE macro is a simple wrapper around setting the
enable_zts variable and can't be used in PHP extensions realistically.

The PHP_TEST_BUILD macro might produce warnings on certain compiler
configurations and default AC_* macros like AC_LINK_IFELSE,
AC_CHECK_LIB, or AC_CHECK_FUNC are better suited for such checks. Also,
a quick browse through the open-source PHP extensions doesn't find
usages of this macro except in imap extension where patch is was already
sent:
php/pecl-mail-imap#11

PHP_DEF_HAVE is a wrapper around AC_DEFINE and using AC_DEFINE_UNQUOTED
and AS_TR_CPP are better suited for this task where also help text can
be passed.
@petk petk force-pushed the patch-obsolete-macros branch from aeecfd8 to e5bcdaf Compare September 8, 2024 11:43
@petk petk changed the title Autotools: Obsolete PHP_TEST_BUILD and PHP_BUILD_THREAD_SAFE Autotools: Obsolete PHP_TEST_BUILD, PHP_BUILD_THREAD_SAFE, and PHP_DEF_HAVE Sep 8, 2024
@petk
Copy link
Member Author

petk commented Sep 8, 2024

I'll recheck if everything works as expected and then merge coming up soon here...

@petk petk merged commit 16e218a into php:master Sep 8, 2024
10 checks passed
@petk petk deleted the patch-obsolete-macros branch September 8, 2024 19:09
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.

1 participant