From 27e2079b30efcd6919735f4e97319de34b55219a Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 19 Oct 2025 21:44:16 +0200 Subject: [PATCH] ext/tidy: Enable tidyOptGetCategory on Windows The tidy library on Windows has been updated to tidy-html5 5.6.0 which provides tidyOptGetCategory() function and has the TidyInternalCategory enumeration. https://github.com/winlibs/libtidy --- ext/tidy/config.m4 | 3 ++- ext/tidy/config.w32 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index ef1f5878287d0..18fa9acb3d4bd 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -81,7 +81,8 @@ if test "$PHP_TIDY" != "no"; then ]) AS_VAR_IF([php_ac_cv_have_tidyoptgetcategory], [yes], [AC_DEFINE([HAVE_TIDYOPTGETCATEGORY], [1], - [Define to 1 if tidyOptGetCategory is available.])]) + [Define to 1 if Tidy library has the 'tidyOptGetCategory' function and + supports the 'TidyInternalCategory' enumeration.])]) CPPFLAGS=$old_CPPFLAGS diff --git a/ext/tidy/config.w32 b/ext/tidy/config.w32 index a1f93f2976af8..1b2436ac9dfad 100644 --- a/ext/tidy/config.w32 +++ b/ext/tidy/config.w32 @@ -21,6 +21,7 @@ if (PHP_TIDY != "no") { AC_DEFINE('HAVE_TIDY_H', 1, "Define to 1 if you have the header file.") AC_DEFINE('HAVE_TIDYOPTGETDOC', 1, "Define to 1 if Tidy library has the 'tidyOptGetDoc' function.") AC_DEFINE('HAVE_TIDYRELEASEDATE', 1, "Define to 1 if Tidy library has the 'tidyReleaseDate' function.") + AC_DEFINE('HAVE_TIDYOPTGETCATEGORY', 1, "Define to 1 if Tidy library has the 'tidyOptGetCategory' function and supports the 'TidyInternalCategory' enumeration.") ADD_FLAG('CFLAGS_TIDY', '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); if (!PHP_TIDY_SHARED) { ADD_DEF_FILE("ext\\tidy\\php_tidy.def");