[php-src] PR #14333: Sync HAVE_OPENSSL* symbols
| From: | petk | Date: | Sun, 26 May 2024 15:39:34 +0000 |
| Subject: | [php-src] PR #14333: Sync HAVE_OPENSSL* symbols | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-26321@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14333
Author: petk
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.