Skip to content

Sync HAVE_OPENSSL* symbols #14333

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
Jun 11, 2024
Merged

Sync HAVE_OPENSSL* symbols #14333

merged 1 commit into from
Jun 11, 2024

Conversation

petk
Copy link
Member

@petk petk commented May 26, 2024

Hello, there is one more inconsistency in the build systems that I'd like to sync.

I've left this one as the last "HAVE_* symbols sync" in the PHP-8.4-dev branch (hopefully it is the last for the time being). These symbols are very error prone defined in the form of HAVE_<extension> but I'll leave this be for now.

So, now we have for the ext/openssl the HAVE_OPENSSL defined to 1 on Windows, and HAVE_OPENSSL_EXT defined to 1 on both. On Windows the HAVE_OPENSSL_EXT is additionally defined to value 0 if the ext/openssl is built as shared. From my point of view this is not consistent and doesn't make much sense to be practical in extensions. Although, I understand the motivation of 0 and 1 value.

My suggestion here would be:

  • Define HAVE_OPENSSL_EXT in the same style on both systems (undefined - extension is not available, defined to 1 - extension is available)
  • Remove the HAVE_OPENSSL as it was only defined on Windows and it was in the past defined also elsewhere

I've quickly scanned the PECL community open source extensions and so far only oath is using this HAVE_OPENSSL_EXT symbol with #if HAVE_OPENSSL_EXT, which can be resolved quite simple. I'll also recheck the extensions again but it doesn't seem to be problematic.

Your thoughts are welcome. Thanks.

@petk petk requested a review from bukka as a code owner May 26, 2024 15:39
petk added a commit to petk/pecl-web_services-oauth that referenced this pull request May 26, 2024
This replaces the HAVE_OPENSSL_EXT condition with more reliable
zend_hash_str_exists. If the openssl extension is loaded as a shared
module on *nix, this symbol is also defined but openssl shared object
(openssl.so) might not be loaded at the runtime.

See: php/php-src#14333
This syncs few inconsistencies between the Windows and Autotools build
systems:
- HAVE_OPENSSL_EXT is now defined in the same style on both systems
  (undefined - extension is not available, defined to 1 - extension is
  available)
- HAVE_OPENSSL removed as it was only defined on Windows
@petk petk force-pushed the patch-openssl-have-symbols branch from 3523f9d to fcfe8bf Compare June 7, 2024 21:52
@petk
Copy link
Member Author

petk commented Jun 11, 2024

Then merge coming up here.

@petk petk merged commit 61a0e3b into php:master Jun 11, 2024
10 of 11 checks passed
@petk petk deleted the patch-openssl-have-symbols branch June 11, 2024 17:18
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