From cb2c5de3db0e6f8d37eb8ac3129d4840879dfed9 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 29 May 2024 07:04:05 +0200 Subject: [PATCH] Add PHP_SBINDIR (#13363) The PHP_SBINDIR symbol was defined on *nix systems but never used. This adds the constant similar to PHP_BINDIR also to PHP. On Windows it is the value of prefix configuration when PHP was built (same value as PHP_BINDIR). --- UPGRADING | 1 + main/main.stub.php | 5 +++++ main/main_arginfo.h | 3 ++- win32/build/config.w32.h.in | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index 3cee5b9bc4b..ab17035d54a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -638,6 +638,7 @@ PHP 8.4 UPGRADE NOTES - Core: . PHP_OUTPUT_HANDLER_PROCESSED. + . PHP_SBINDIR. - Intl: . The IntlDateFormatter class exposes now the new PATTERN constant diff --git a/main/main.stub.php b/main/main.stub.php index fd8ac28dd8b..b5f848dacc8 100644 --- a/main/main.stub.php +++ b/main/main.stub.php @@ -84,6 +84,11 @@ const PHP_PREFIX = UNKNOWN; * @cvalue PHP_BINDIR */ const PHP_BINDIR = UNKNOWN; +/** + * @var string + * @cvalue PHP_SBINDIR + */ +const PHP_SBINDIR = UNKNOWN; #ifndef PHP_WIN32 /** * @var string diff --git a/main/main_arginfo.h b/main/main_arginfo.h index 9c12a065792..28a7d15f896 100644 --- a/main/main_arginfo.h +++ b/main/main_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7ff3d7dc2636153044513390669cb46e9a5b5a0a */ + * Stub hash: 793b455a47a0422cee767ef2f6a448a369520542 */ static void register_main_symbols(int module_number) { @@ -19,6 +19,7 @@ static void register_main_symbols(int module_number) REGISTER_STRING_CONSTANT("PHP_EXTENSION_DIR", PHP_EXTENSION_DIR, CONST_PERSISTENT); REGISTER_STRING_CONSTANT("PHP_PREFIX", PHP_PREFIX, CONST_PERSISTENT); REGISTER_STRING_CONSTANT("PHP_BINDIR", PHP_BINDIR, CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("PHP_SBINDIR", PHP_SBINDIR, CONST_PERSISTENT); #if !defined(PHP_WIN32) REGISTER_STRING_CONSTANT("PHP_MANDIR", PHP_MANDIR, CONST_PERSISTENT); #endif diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in index 4e4226f9c15..e2b38e8c7c1 100644 --- a/win32/build/config.w32.h.in +++ b/win32/build/config.w32.h.in @@ -12,6 +12,7 @@ #define PHP_CONFIG_FILE_PATH "" #define PEAR_INSTALLDIR "@PREFIX@\\pear" #define PHP_BINDIR "@PREFIX@" +#define PHP_SBINDIR "@PREFIX@" #define PHP_DATADIR "@PREFIX@" #define PHP_EXTENSION_DIR "@PREFIX@\\ext" #define PHP_INCLUDE_PATH ".;@PREFIX@\\pear"