Commit eb222030627 for php

commit eb222030627913408258f00dcec6fa63382dd634
Author: Marc <m@pyc.ac>
Date:   Tue Sep 29 11:46:01 2026 +0200

    Windows: bump to C17 and enable C11 atomics on MSVC (#23982)

diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index bce419d784e..e542dcfec57 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -26,6 +26,11 @@ PHP 8.7 INTERNALS UPGRADE NOTES
 2. Build system changes
 ========================

+- Windows build system changes:
+  . C sources are now compiled as C17. MSVC builds require Visual Studio
+    2026 or later and enable /experimental:c11atomics.
+  . C++-only extension compiler flags can be added to CXXFLAGS_<EXTENSION>.
+
 - Unix build system changes:
   . Autoconf minimum required version upgraded to 2.71.

diff --git a/ext/intl/config.w32 b/ext/intl/config.w32
index 7369619404b..984ba94907a 100644
--- a/ext/intl/config.w32
+++ b/ext/intl/config.w32
@@ -125,8 +125,8 @@ if (PHP_INTL != "no") {
 		/* Compat for ICU before 58.1.*/
 		CHECK_LIB("icule.lib", "intl", PHP_INTL);
 		CHECK_LIB("iculx.lib", "intl", PHP_INTL);
-		ADD_FLAG("CXXFLAGS_INTL", "/std:c++17");
-		ADD_FLAG("CFLAGS_INTL", "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1");
+		ADD_FLAG("CXXFLAGS_INTL", "/std:c++17 /EHsc");
+		ADD_FLAG("CFLAGS_INTL", "/DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1");
 	} else {
 		WARNING("intl not enabled; libraries and/or headers not found");
 	}
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 6b6fbe96b52..1e6604875ff 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1625,7 +1625,10 @@ function ADD_SOURCES(dir, file_list, target, obj_dir, duplicate_sources)

 	sym = target.toUpperCase() + "_GLOBAL_OBJS";
 	flags = "CFLAGS_" + target.toUpperCase() + '_OBJ';
-	var c_flags = VS_TOOLSET ? " /std:c11" : "";
+	var c_flags = ICC_TOOLSET ? " /Qstd=c17" : " /std:c17";
+	if (VS_TOOLSET) {
+		c_flags += " /experimental:c11atomics";
+	}
 	var cxx_flags = " $(CXXFLAGS_" + target.toUpperCase() + ")";

 	var bd = get_define('BUILD_DIR');
@@ -1792,7 +1795,7 @@ function ADD_SOURCES(dir, file_list, target, obj_dir, duplicate_sources)
 						"--library=win32\\build\\cppcheck.cfg " +
 						"--library=" + cppcheck_lib + " " +
 						/* "--rule-file=win32\build\cppcheck_rules.xml " + */
-						" --std=c11 --std=c++11 " +
+						" --std=c17 --std=c++11 " +
 						"--quiet --inconclusive --template=vs -j 4 " +
 						"--suppress=unmatchedSuppression " +
 						"--suppressions-list=win32\\build\\cppcheck_suppress.txt ";
@@ -3154,7 +3157,7 @@ function toolset_get_compiler_version()

 	if (VS_TOOLSET) {
 		version = probe_binary(PHP_CL).substr(0, 5).replace('.', '');
-		if (version < 1920) {
+		if (version < 1950) {
 			ERROR("Building with MSC_VER " + version + " is no longer supported");
 		}
 		return version;