Skip to content

Commit 9ea290b

Browse files
authored
Sync HAVE_ICONV preprocessor macro usage (#15148)
HAVE_ICONV marks that PHP extension 'iconv' is available, and not only that iconv library or its functions/headers are available.
1 parent 7d92707 commit 9ea290b

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
173173
checks.
174174
- M4 macro PHP_SETUP_LIBXML doesn't define the redundant HAVE_LIBXML symbol
175175
anymore.
176+
- M4 macro PHP_SETUP_ICONV doesn't define the HAVE_ICONV symbol anymore.
176177
- TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS M4 macro have been removed.
177178
- Added pkg-config support to find libpq for the pdo_pgsql and pgsql
178179
extensions. The libpq paths can be customized with the PGSQL_CFLAGS and

build/php.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1883,7 +1883,6 @@ AC_DEFUN([PHP_SETUP_ICONV], [
18831883
fi
18841884
18851885
if test "$found_iconv" = "yes"; then
1886-
AC_DEFINE(HAVE_ICONV,1,[ ])
18871886
if test -n "$ICONV_DIR"; then
18881887
PHP_ADD_LIBRARY_WITH_PATH([$iconv_lib_name],
18891888
[$ICONV_DIR/$PHP_LIBDIR],

ext/iconv/config.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ int main(void) {
127127
LDFLAGS="$save_LDFLAGS"
128128
CFLAGS="$save_CFLAGS"
129129

130+
AC_DEFINE([HAVE_ICONV], [1],
131+
[Define to 1 if PHP extension 'iconv' is available.])
132+
130133
PHP_NEW_EXTENSION([iconv],
131134
[iconv.c],
132135
[$ext_shared],,

ext/iconv/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (PHP_ICONV != "no") {
99

1010
EXTENSION("iconv", "iconv.c", PHP_ICONV_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
1111

12-
AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled");
12+
AC_DEFINE("HAVE_ICONV", 1, "Define to 1 if PHP extension 'iconv' is available.");
1313
AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available");
1414
AC_DEFINE("ICONV_ALIASED_LIBICONV", 1, "The iconv function is called iconv() in libiconv");
1515
AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use");

0 commit comments

Comments
 (0)