Skip to content

Conversation

@petk
Copy link
Member

@petk petk commented Jul 21, 2019

Hello, when PHP extension is enabled there is usually in most cases also a symbol
HAVE_{EXT_NAME} defined. This patch syncs the help messages a bit for the configuration headers main/php_config.php and main/config.w32.h. Help messages are based on the Autoconf's default messages for similar symbols.

Changes

  • Help messages synced to a format Define to 1 if you have the ext_name extension enabled.
  • HAVE_PHP_SOAP => HAVE_SOAP

Todo/Skipped

Skipped due to not currently having a symbol defined or the symbol is something not related to this PR:

  • ext/gettext
  • ext/iconv
  • ext/mysqlnd
  • ext/odbc
  • ext/opcache
  • ext/pcntl
  • ext/pdo
  • ext/pdo_dblib
  • ext/pdo_mysql
  • ext/pdo_oci
  • ext/pdo_odbc
  • ext/phar
  • ext/readline

It would be also good to have such step in the function where extension gets enabled and deprecate symbols such as HAVE_LIBGD, HAVE_MYSQLILIB, HAVE_LIBSODIUMLIB etc. probably more something like "prefixed" ones. For example, HAVE_PHP_EXT_{EXT_NAME}:

  • HAVE_PHP_EXT_MYSQLI
  • HAVE_PHP_EXT_SODIUM

etc. but I'll leave this be for PHP 8 then I guess.

When PHP extension is enabled there is usually defined a symbol
HAVE_{EXT_NAME}. This patch syncs this a bit and sets the help messages
for the configuration headers main/php_config.php and main/config.w32.h.

Help messages are based on the Autoconf's default messages for similar
symbols.

Additionally:
- HAVE_PHP_SOAP has been renamed to HAVE_SOAP (for Windows)
@nikic
Copy link
Member

nikic commented Jul 24, 2019

I don't see the point of this change.

@petk
Copy link
Member Author

petk commented Jul 26, 2019

I don't see the point of this change.

Opening main/php_config.h file is the problem here. There are mostly symbols quite sort of ok documented (the ones that are part of the Autoconf's macros). With these manually defined ones you don't fully understand why are they there. Are they indicating that some C library is present or that PHP extension is present... This now fully can't be solved anymore as it should for the PHP-7.4. And moving these defines to a common place would conflict with #3912...

And another issue that is solved here (in few of those files):

  • extension is enabled, on *nix build system HAVE_extension is defined and on Windows it is not.

@petk petk closed this Sep 8, 2019
@petk petk deleted the patch-sync-have-extname branch September 8, 2019 20:41
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