Update ext/sodium preprocessor macro help texts (#15270)

The sodium extension was initially named "libsodium" in PECL and was
renamed to sodium when it was bundled to php-src. The HAVE_LIBSODIUMLIB
symbol here could indicate that PHP extension sodium is available.

Otherwise the macro is not used in the current code base. Header
php_libsodium.h became "installed"/public as of PHP-8.4.

[skip ci]
This commit is contained in:
Peter Kokot 2024-08-08 08:27:22 +02:00 committed by GitHub
parent f503cc0234
commit f661223685
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -9,7 +9,8 @@ if test "$PHP_SODIUM" != "no"; then
PHP_EVAL_INCLINE([$LIBSODIUM_CFLAGS])
PHP_EVAL_LIBLINE([$LIBSODIUM_LIBS], [SODIUM_SHARED_LIBADD])
AC_DEFINE(HAVE_LIBSODIUMLIB, 1, [ ])
AC_DEFINE([HAVE_LIBSODIUMLIB], [1],
[Define to 1 if the PHP extension 'sodium' is available.])
SODIUM_COMPILER_FLAGS="$LIBSODIUM_CFLAGS"

View File

@ -5,7 +5,7 @@ ARG_WITH("sodium", "for libsodium support", "no");
if (PHP_SODIUM != "no") {
if (CHECK_LIB("libsodium.lib", "sodium", PHP_SODIUM) && CHECK_HEADER_ADD_INCLUDE("sodium.h", "CFLAGS_SODIUM")) {
EXTENSION("sodium", "libsodium.c sodium_pwhash.c");
AC_DEFINE('HAVE_LIBSODIUMLIB', 1 , 'Have the Sodium library');
AC_DEFINE('HAVE_LIBSODIUMLIB', 1 , "Define to 1 if the PHP extension 'sodium' is available.");
PHP_INSTALL_HEADERS("ext/sodium", "php_libsodium.h");
} else {
WARNING("libsodium not enabled; libraries and headers not found");