Skip to content

Commit f661223

Browse files
authored
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]
1 parent f503cc0 commit f661223

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext/sodium/config.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ if test "$PHP_SODIUM" != "no"; then
99
PHP_EVAL_INCLINE([$LIBSODIUM_CFLAGS])
1010
PHP_EVAL_LIBLINE([$LIBSODIUM_LIBS], [SODIUM_SHARED_LIBADD])
1111

12-
AC_DEFINE(HAVE_LIBSODIUMLIB, 1, [ ])
12+
AC_DEFINE([HAVE_LIBSODIUMLIB], [1],
13+
[Define to 1 if the PHP extension 'sodium' is available.])
1314

1415
SODIUM_COMPILER_FLAGS="$LIBSODIUM_CFLAGS"
1516

ext/sodium/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG_WITH("sodium", "for libsodium support", "no");
55
if (PHP_SODIUM != "no") {
66
if (CHECK_LIB("libsodium.lib", "sodium", PHP_SODIUM) && CHECK_HEADER_ADD_INCLUDE("sodium.h", "CFLAGS_SODIUM")) {
77
EXTENSION("sodium", "libsodium.c sodium_pwhash.c");
8-
AC_DEFINE('HAVE_LIBSODIUMLIB', 1 , 'Have the Sodium library');
8+
AC_DEFINE('HAVE_LIBSODIUMLIB', 1 , "Define to 1 if the PHP extension 'sodium' is available.");
99
PHP_INSTALL_HEADERS("ext/sodium", "php_libsodium.h");
1010
} else {
1111
WARNING("libsodium not enabled; libraries and headers not found");

0 commit comments

Comments
 (0)