From 75e7234f70823a2eec52540eb45b9b19239f79cf Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:34:04 +0100 Subject: [PATCH 1/3] Drop redundant macro definitions from mbfl_defs.h These are defined by the standard include headers we already use. These cause conflicts which cause compiler warnings on some toolchains (see GH-17112). Closes GH-17114. --- ext/mbstring/libmbfl/mbfl/mbfl_defs.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_defs.h b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h index 297b122bdd71a..a51bee8111314 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_defs.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_defs.h @@ -31,18 +31,6 @@ #ifndef MBFL_DEFS_H #define MBFL_DEFS_H -#ifndef NULL -#ifdef __cplusplus -#define NULL (0L) -#else -#define NULL (void *)(0L) -#endif -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX ((size_t)~0) -#endif - #ifdef _WIN32 #ifdef MBFL_DLL_EXPORT #define MBFLAPI __declspec(dllexport) From 754aa7706b4128880a71aaafc42b3331ec0acb37 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:32:35 +0100 Subject: [PATCH 2/3] Resolve GH-17112 for lower branches See https://github.com/php/php-src/pull/17114#issuecomment-2533050450 --- ext/mbstring/libmbfl/mbfl/mbfl_encoding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index b25ec71eef9de..2072b848bd5bd 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -31,9 +31,9 @@ #ifndef MBFL_ENCODING_H #define MBFL_ENCODING_H +#include "zend.h" #include "mbfl_defs.h" #include "mbfl_consts.h" -#include "zend.h" enum mbfl_no_encoding { mbfl_no_encoding_invalid = -1, From 901ebd1c1a6884f6a87a9664b901137054d7c21a Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 11 Dec 2024 19:48:24 +0100 Subject: [PATCH 3/3] Update HTML5 serializer comments --- ext/dom/html5_serializer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/dom/html5_serializer.c b/ext/dom/html5_serializer.c index f0048aa4aae89..26eef9d5f968c 100644 --- a/ext/dom/html5_serializer.c +++ b/ext/dom/html5_serializer.c @@ -27,7 +27,7 @@ #include /* This file implements the HTML 5 serialization algorithm. - * https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments (Date 2023-12-14) + * https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments (Date 2024-12-11) */ #define TRY(x) do { if (UNEXPECTED((x) != SUCCESS)) { return FAILURE; } } while (0) @@ -371,7 +371,9 @@ zend_result dom_html5_serialize(dom_html5_serialize_context *ctx, const xmlNode children = node->children; } - /* Step 4 */ + /* Step 4 concerns shadow roots, but we don't have these, so skip. */ + + /* Step 5 */ return dom_html5_serialize_node(ctx, children, node); }