From ac1ebfc8838112e39cf56ee62380811d40d97e16 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 02:04:17 +0200 Subject: [PATCH 1/7] Publish header files explicitly While glob style matches are convenient, we're better off to installing the headers we want to publish *explicitly*. Otherwise, we may end up with issues we cannot easily fix without breaking ABI compatibility. And we may confuse users by installing headers which they can't even use, such as Windows specific headers on non Windows systems. --- .github/labeler.yml | 275 ++++++++++++++++++++++++++++++++++++++-- configure.ac | 143 ++++++++++++++++++++- ext/gd/config.m4 | 19 ++- ext/gd/config.w32 | 19 ++- ext/mysqlnd/config.w32 | 30 ++++- ext/mysqlnd/config9.m4 | 30 ++++- ext/pcre/config.w32 | 11 +- ext/pcre/config0.m4 | 11 +- ext/standard/config.m4 | 66 +++++++++- ext/standard/config.w32 | 66 +++++++++- win32/build/config.w32 | 165 +++++++++++++++++++++++- 11 files changed, 816 insertions(+), 19 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 00807db1d135b..b476e801982e5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -393,8 +393,8 @@ "ABI break": - changed-files: - any-glob-to-any-file: - - 'TSRM/*.h' - - 'Zend/*.h' + - 'TSRM/TSRM.h' + - 'TSRM/tsrm_win32.h' - 'Zend/Optimizer/zend_call_graph.h' - 'Zend/Optimizer/zend_cfg.h' - 'Zend/Optimizer/zend_dfg.h' @@ -404,6 +404,101 @@ - 'Zend/Optimizer/zend_optimizer.h' - 'Zend/Optimizer/zend_ssa.h' - 'Zend/Optimizer/zend_worklist.h' + - 'Zend/zend.h' + - 'Zend/zend_API.h' + - 'Zend/zend_alloc.h' + - 'Zend/zend_alloc_sizes.h' + - 'Zend/zend_arena.h' + - 'Zend/zend_ast.h' + - 'Zend/zend_atomic.h' + - 'Zend/zend_attributes.h' + - 'Zend/zend_attributes_arginfo.h' + - 'Zend/zend_bitset.h' + - 'Zend/zend_build.h' + - 'Zend/zend_builtin_functions.h' + - 'Zend/zend_builtin_functions_arginfo.h' + - 'Zend/zend_call_stack.h' + - 'Zend/zend_closures.h' + - 'Zend/zend_closures_arginfo.h' + - 'Zend/zend_compile.h' + - 'Zend/zend_config.w32.h' + - 'Zend/zend_constants.h' + - 'Zend/zend_constants_arginfo.h' + - 'Zend/zend_cpuinfo.h' + - 'Zend/zend_dtrace.h' + - 'Zend/zend_enum.h' + - 'Zend/zend_enum_arginfo.h' + - 'Zend/zend_errors.h' + - 'Zend/zend_exceptions.h' + - 'Zend/zend_exceptions_arginfo.h' + - 'Zend/zend_execute.h' + - 'Zend/zend_extensions.h' + - 'Zend/zend_fibers.h' + - 'Zend/zend_fibers_arginfo.h' + - 'Zend/zend_float.h' + - 'Zend/zend_frameless_function.h' + - 'Zend/zend_gc.h' + - 'Zend/zend_gdb.h' + - 'Zend/zend_generators.h' + - 'Zend/zend_generators_arginfo.h' + - 'Zend/zend_globals.h' + - 'Zend/zend_globals_macros.h' + - 'Zend/zend_hash.h' + - 'Zend/zend_highlight.h' + - 'Zend/zend_hrtime.h' + - 'Zend/zend_inheritance.h' + - 'Zend/zend_ini.h' + - 'Zend/zend_ini_scanner.h' + - 'Zend/zend_interfaces.h' + - 'Zend/zend_interfaces_arginfo.h' + - 'Zend/zend_iterators.h' + - 'Zend/zend_language_scanner.h' + - 'Zend/zend_lazy_objects.h' + - 'Zend/zend_list.h' + - 'Zend/zend_llist.h' + - 'Zend/zend_long.h' + - 'Zend/zend_map_ptr.h' + - 'Zend/zend_max_execution_timer.h' + - 'Zend/zend_mmap.h' + - 'Zend/zend_modules.h' + - 'Zend/zend_multibyte.h' + - 'Zend/zend_multiply.h' + - 'Zend/zend_object_handlers.h' + - 'Zend/zend_objects.h' + - 'Zend/zend_objects_API.h' + - 'Zend/zend_observer.h' + - 'Zend/zend_operators.h' + - 'Zend/zend_portability.h' + - 'Zend/zend_property_hooks.h' + - 'Zend/zend_ptr_stack.h' + - 'Zend/zend_range_check.h' + - 'Zend/zend_signal.h' + - 'Zend/zend_smart_str.h' + - 'Zend/zend_smart_str_public.h' + - 'Zend/zend_smart_string.h' + - 'Zend/zend_smart_string_public.h' + - 'Zend/zend_sort.h' + - 'Zend/zend_stack.h' + - 'Zend/zend_stream.h' + - 'Zend/zend_string.h' + - 'Zend/zend_strtod.h' + - 'Zend/zend_strtod_int.h' + - 'Zend/zend_system_id.h' + - 'Zend/zend_type_info.h' + - 'Zend/zend_types.h' + - 'Zend/zend_variables.h' + - 'Zend/zend_verify_type_inference.h' + - 'Zend/zend_virtual_cwd.h' + - 'Zend/zend_vm.h' + - 'Zend/zend_vm_def.h' + - 'Zend/zend_vm_execute.h' + - 'Zend/zend_vm_handlers.h' + - 'Zend/zend_vm_opcodes.h' + - 'Zend/zend_vm_trace_handlers.h' + - 'Zend/zend_vm_trace_lines.h' + - 'Zend/zend_vm_trace_map.h' + - 'Zend/zend_weakrefs.h' + - 'Zend/zend_weakrefs_arginfo.h' - 'ext/curl/php_curl.h' - 'ext/date/lib/timelib.h' - 'ext/date/lib/timelib_config.h' @@ -413,7 +508,21 @@ - 'ext/dom/xml_common.h' - 'ext/dom/xpath_callbacks.h' - 'ext/filter/php_filter.h' - - 'ext/gd/libgd/*.h' + - 'ext/gd/libgd/bmp.h' + - 'ext/gd/libgd/gd.h' + - 'ext/gd/libgd/gd_errors.h' + - 'ext/gd/libgd/gd_intern.h' + - 'ext/gd/libgd/gd_io.h' + - 'ext/gd/libgd/gd_tga.h' + - 'ext/gd/libgd/gdcache.h' + - 'ext/gd/libgd/gdfontg.h' + - 'ext/gd/libgd/gdfontl.h' + - 'ext/gd/libgd/gdfontmb.h' + - 'ext/gd/libgd/gdfonts.h' + - 'ext/gd/libgd/gdfontt.h' + - 'ext/gd/libgd/gdhelpers.h' + - 'ext/gd/libgd/jisx0208.h' + - 'ext/gd/libgd/wbmp.h' - 'ext/gd/php_gd.h' - 'ext/gmp/php_gmp_int.h' - 'ext/hash/php_hash.h' @@ -457,8 +566,40 @@ - 'ext/mbstring/php_onig_compat.h' - 'ext/mysqli/mysqli_mysqlnd.h' - 'ext/mysqli/php_mysqli_structs.h' - - 'ext/mysqlnd/*.h' - - 'ext/pcre/pcre2lib/*.h' + - 'ext/mysqlnd/config-win.h' + - 'ext/mysqlnd/mysql_float_to_double.h' + - 'ext/mysqlnd/mysqlnd.h' + - 'ext/mysqlnd/mysqlnd_alloc.h' + - 'ext/mysqlnd/mysqlnd_auth.h' + - 'ext/mysqlnd/mysqlnd_block_alloc.h' + - 'ext/mysqlnd/mysqlnd_charset.h' + - 'ext/mysqlnd/mysqlnd_commands.h' + - 'ext/mysqlnd/mysqlnd_connection.h' + - 'ext/mysqlnd/mysqlnd_debug.h' + - 'ext/mysqlnd/mysqlnd_enum_n_def.h' + - 'ext/mysqlnd/mysqlnd_ext_plugin.h' + - 'ext/mysqlnd/mysqlnd_libmysql_compat.h' + - 'ext/mysqlnd/mysqlnd_plugin.h' + - 'ext/mysqlnd/mysqlnd_portability.h' + - 'ext/mysqlnd/mysqlnd_priv.h' + - 'ext/mysqlnd/mysqlnd_protocol_frame_codec.h' + - 'ext/mysqlnd/mysqlnd_ps.h' + - 'ext/mysqlnd/mysqlnd_read_buffer.h' + - 'ext/mysqlnd/mysqlnd_result.h' + - 'ext/mysqlnd/mysqlnd_result_meta.h' + - 'ext/mysqlnd/mysqlnd_reverse_api.h' + - 'ext/mysqlnd/mysqlnd_statistics.h' + - 'ext/mysqlnd/mysqlnd_structs.h' + - 'ext/mysqlnd/mysqlnd_vio.h' + - 'ext/mysqlnd/mysqlnd_wireprotocol.h' + - 'ext/mysqlnd/php_mysqlnd.h' + - 'ext/pcre/pcre2lib/config.h' + - 'ext/pcre/pcre2lib/pcre2.h' + - 'ext/pcre/pcre2lib/pcre2_internal.h' + - 'ext/pcre/pcre2lib/pcre2_intmodedep.h' + - 'ext/pcre/pcre2lib/pcre2_jit_neon_inc.h' + - 'ext/pcre/pcre2lib/pcre2_jit_simd_inc.h' + - 'ext/pcre/pcre2lib/pcre2_ucp.h' - 'ext/pcre/php_pcre.h' - 'ext/pdo/pdo_sql_parser.h' - 'ext/pdo/php_pdo.h' @@ -487,11 +628,127 @@ - 'ext/spl/spl_heap.h' - 'ext/spl/spl_iterators.h' - 'ext/spl/spl_observer.h' - - 'ext/standard/*.h' + - 'ext/standard/base64.h' + - 'ext/standard/basic_functions.h' + - 'ext/standard/basic_functions_arginfo.h' + - 'ext/standard/crc32.h' + - 'ext/standard/crc32_x86.h' + - 'ext/standard/credits.h' + - 'ext/standard/credits_ext.h' + - 'ext/standard/credits_sapi.h' + - 'ext/standard/crypt_blowfish.h' + - 'ext/standard/crypt_freesec.h' + - 'ext/standard/css.h' + - 'ext/standard/datetime.h' + - 'ext/standard/dir_arginfo.h' + - 'ext/standard/dl.h' + - 'ext/standard/dl_arginfo.h' + - 'ext/standard/exec.h' + - 'ext/standard/file.h' + - 'ext/standard/file_arginfo.h' + - 'ext/standard/flock_compat.h' + - 'ext/standard/fsock.h' + - 'ext/standard/head.h' + - 'ext/standard/html.h' + - 'ext/standard/html_tables.h' + - 'ext/standard/info.h' + - 'ext/standard/md5.h' + - 'ext/standard/pack.h' + - 'ext/standard/pageinfo.h' + - 'ext/standard/password_arginfo.h' + - 'ext/standard/php_array.h' + - 'ext/standard/php_assert.h' + - 'ext/standard/php_browscap.h' + - 'ext/standard/php_crypt.h' + - 'ext/standard/php_crypt_r.h' + - 'ext/standard/php_dir.h' + - 'ext/standard/php_dir_int.h' + - 'ext/standard/php_dns.h' + - 'ext/standard/php_ext_syslog.h' + - 'ext/standard/php_filestat.h' + - 'ext/standard/php_fopen_wrappers.h' + - 'ext/standard/php_http.h' + - 'ext/standard/php_image.h' + - 'ext/standard/php_incomplete_class.h' + - 'ext/standard/php_mail.h' + - 'ext/standard/php_math.h' + - 'ext/standard/php_math_round_mode.h' + - 'ext/standard/php_net.h' + - 'ext/standard/php_password.h' + - 'ext/standard/php_smart_string.h' + - 'ext/standard/php_smart_string_public.h' + - 'ext/standard/php_standard.h' + - 'ext/standard/php_string.h' + - 'ext/standard/php_uuencode.h' + - 'ext/standard/php_var.h' + - 'ext/standard/php_versioning.h' + - 'ext/standard/proc_open.h' + - 'ext/standard/quot_print.h' + - 'ext/standard/scanf.h' + - 'ext/standard/sha1.h' + - 'ext/standard/streamsfuncs.h' + - 'ext/standard/url.h' + - 'ext/standard/url_scanner_ex.h' + - 'ext/standard/user_filters_arginfo.h' + - 'ext/standard/winver.h' - 'ext/xml/expat_compat.h' - 'ext/xml/php_xml.h' - - 'main/*.h' - - 'main/streams/*.h' + - 'main/SAPI.h' + - 'main/fastcgi.h' + - 'main/fopen_wrappers.h' + - 'main/http_status_codes.h' + - 'main/main_arginfo.h' + - 'main/php.h' + - 'main/php_compat.h' + - 'main/php_content_types.h' + - 'main/php_getopt.h' + - 'main/php_globals.h' + - 'main/php_ini.h' + - 'main/php_ini_builder.h' + - 'main/php_main.h' + - 'main/php_memory_streams.h' + - 'main/php_network.h' + - 'main/php_odbc_utils.h' + - 'main/php_open_temporary_file.h' + - 'main/php_output.h' + - 'main/php_reentrancy.h' + - 'main/php_scandir.h' + - 'main/php_streams.h' + - 'main/php_syslog.h' + - 'main/php_ticks.h' + - 'main/php_variables.h' + - 'main/php_version.h' + - 'main/rfc1867.h' + - 'main/snprintf.h' + - 'main/spprintf.h' + - 'main/streams/php_stream_context.h' + - 'main/streams/php_stream_filter_api.h' + - 'main/streams/php_stream_glob_wrapper.h' + - 'main/streams/php_stream_mmap.h' + - 'main/streams/php_stream_plain_wrapper.h' + - 'main/streams/php_stream_transport.h' + - 'main/streams/php_stream_userspace.h' + - 'main/streams/php_streams_int.h' + - 'main/streams/userspace_arginfo.h' - 'sapi/cli/cli.h' - 'sapi/embed/php_embed.h' - - 'win32/*.h' + - 'win32/codepage.h' + - 'win32/console.h' + - 'win32/fnmatch.h' + - 'win32/getrusage.h' + - 'win32/glob.h' + - 'win32/ioutil.h' + - 'win32/ipc.h' + - 'win32/nice.h' + - 'win32/param.h' + - 'win32/php_registry.h' + - 'win32/php_win32_globals.h' + - 'win32/readdir.h' + - 'win32/select.h' + - 'win32/sendmail.h' + - 'win32/signal.h' + - 'win32/sockets.h' + - 'win32/syslog.h' + - 'win32/time.h' + - 'win32/unistd.h' + - 'win32/winutil.h' diff --git a/configure.ac b/configure.ac index 6b61df11ab422..166fafec6d6bc 100644 --- a/configure.ac +++ b/configure.ac @@ -1600,7 +1600,148 @@ PHP_SUBST([all_targets]) PHP_SUBST([install_targets]) PHP_SUBST([install_binary_targets]) -PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/]) +PHP_INSTALL_HEADERS([Zend/], m4_normalize([ + zend.h + zend_alloc.h + zend_alloc_sizes.h + zend_API.h + zend_arena.h + zend_ast.h + zend_atomic.h + zend_attributes.h + zend_attributes_arginfo.h + zend_bitset.h + zend_build.h + zend_builtin_functions.h + zend_builtin_functions_arginfo.h + zend_call_stack.h + zend_closures.h + zend_closures_arginfo.h + zend_compile.h + zend_config.w32.h + zend_constants.h + zend_constants_arginfo.h + zend_cpuinfo.h + zend_dtrace.h + zend_enum.h + zend_enum_arginfo.h + zend_errors.h + zend_exceptions.h + zend_exceptions_arginfo.h + zend_execute.h + zend_extensions.h + zend_fibers.h + zend_fibers_arginfo.h + zend_float.h + zend_frameless_function.h + zend_gc.h + zend_gdb.h + zend_generators.h + zend_generators_arginfo.h + zend_globals.h + zend_globals_macros.h + zend_hash.h + zend_highlight.h + zend_hrtime.h + zend_inheritance.h + zend_ini.h + zend_ini_scanner.h + zend_interfaces.h + zend_interfaces_arginfo.h + zend_iterators.h + zend_language_scanner.h + zend_lazy_objects.h + zend_list.h + zend_llist.h + zend_long.h + zend_map_ptr.h + zend_max_execution_timer.h + zend_mmap.h + zend_modules.h + zend_multibyte.h + zend_multiply.h + zend_objects.h + zend_objects_API.h + zend_object_handlers.h + zend_observer.h + zend_operators.h + zend_portability.h + zend_property_hooks.h + zend_ptr_stack.h + zend_range_check.h + zend_signal.h + zend_smart_str.h + zend_smart_string.h + zend_smart_string_public.h + zend_smart_str_public.h + zend_sort.h + zend_stack.h + zend_stream.h + zend_string.h + zend_strtod.h + zend_strtod_int.h + zend_system_id.h + zend_types.h + zend_type_info.h + zend_variables.h + zend_verify_type_inference.h + zend_virtual_cwd.h + zend_vm.h + zend_vm_def.h + zend_vm_execute.h + zend_vm_handlers.h + zend_vm_opcodes.h + zend_vm_trace_handlers.h + zend_vm_trace_lines.h + zend_vm_trace_map.h + zend_weakrefs.h + zend_weakrefs_arginfo.h +])) +PHP_INSTALL_HEADERS([TSRM/], m4_normalize([ + TSRM.h + tsrm_win32.h +])) +PHP_INSTALL_HEADERS([main/], m4_normalize([ + fastcgi.h + fopen_wrappers.h + http_status_codes.h + main_arginfo.h + php.h + php_compat.h + php_content_types.h + php_getopt.h + php_globals.h + php_ini.h + php_ini_builder.h + php_main.h + php_memory_streams.h + php_network.h + php_odbc_utils.h + php_open_temporary_file.h + php_output.h + php_reentrancy.h + php_scandir.h + php_streams.h + php_syslog.h + php_ticks.h + php_variables.h + php_version.h + rfc1867.h + SAPI.h + snprintf.h + spprintf.h +])) +PHP_INSTALL_HEADERS([main/streams/], m4_normalize([ + php_streams_int.h + php_stream_context.h + php_stream_filter_api.h + php_stream_glob_wrapper.h + php_stream_mmap.h + php_stream_plain_wrapper.h + php_stream_transport.h + php_stream_userspace.h + userspace_arginfo.h +])) PHP_INSTALL_HEADERS([Zend/Optimizer], m4_normalize([ zend_call_graph.h zend_cfg.h diff --git a/ext/gd/config.m4 b/ext/gd/config.m4 index 7da5b8cd1b2ec..395821ba1aca8 100644 --- a/ext/gd/config.m4 +++ b/ext/gd/config.m4 @@ -285,7 +285,24 @@ dnl Various checks for GD features [-Wno-strict-prototypes -I@ext_srcdir@/libgd]) PHP_ADD_BUILD_DIR([$ext_builddir/libgd]) - PHP_INSTALL_HEADERS([ext/gd], [php_gd.h libgd/]) + PHP_INSTALL_HEADERS([ext/gd], m4_normalize([php_gd.h])) + PHP_INSTALL_HEADERS([ext/gd/libgd/], m4_normalize([ + bmp.h + gd.h + gdcache.h + gdfontg.h + gdfontl.h + gdfontmb.h + gdfonts.h + gdfontt.h + gdhelpers.h + gd_errors.h + gd_intern.h + gd_io.h + gd_tga.h + jisx0208.h + wbmp.h + ])) dnl Sanity check. AC_CACHE_CHECK([whether build works], [php_cv_lib_gd_works], [ diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 939755bf539d1..aef38e6d9845c 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -76,7 +76,24 @@ if (PHP_GD != "no") { ADD_FLAG("LDFLAGS_GD", "/nodefaultlib:libcmt"); } - PHP_INSTALL_HEADERS("ext/gd", "php_gd.h libgd/"); + PHP_INSTALL_HEADERS("ext/gd", "php_gd.h"); + PHP_INSTALL_HEADERS("ext/gd/libgd", "\ + bmp.h\ + gd.h\ + gdcache.h\ + gdfontg.h\ + gdfontl.h\ + gdfontmb.h\ + gdfonts.h\ + gdfontt.h\ + gdhelpers.h\ + gd_errors.h\ + gd_intern.h\ + gd_io.h\ + gd_tga.h\ + jisx0208.h\ + wbmp.h\ + "); } else { WARNING("gd not enabled; libraries and headers not found"); } diff --git a/ext/mysqlnd/config.w32 b/ext/mysqlnd/config.w32 index 9fb58ed50ddf7..f39dfa0517cb1 100644 --- a/ext/mysqlnd/config.w32 +++ b/ext/mysqlnd/config.w32 @@ -41,6 +41,34 @@ if (PHP_MYSQLND != "no") { ADD_EXTENSION_DEP('mysqlnd', 'hash'); } } - PHP_INSTALL_HEADERS("", "ext/mysqlnd"); + PHP_INSTALL_HEADERS("ext/mysqlnd", "\ + config-win.h\ + mysqlnd.h\ + mysqlnd_alloc.h\ + mysqlnd_auth.h\ + mysqlnd_block_alloc.h\ + mysqlnd_charset.h\ + mysqlnd_commands.h\ + mysqlnd_connection.h\ + mysqlnd_debug.h\ + mysqlnd_enum_n_def.h\ + mysqlnd_ext_plugin.h\ + mysqlnd_libmysql_compat.h\ + mysqlnd_plugin.h\ + mysqlnd_portability.h\ + mysqlnd_priv.h\ + mysqlnd_protocol_frame_codec.h\ + mysqlnd_ps.h\ + mysqlnd_read_buffer.h\ + mysqlnd_result.h\ + mysqlnd_result_meta.h\ + mysqlnd_reverse_api.h\ + mysqlnd_statistics.h\ + mysqlnd_structs.h\ + mysqlnd_vio.h\ + mysqlnd_wireprotocol.h\ + mysql_float_to_double.h\ + php_mysqlnd.h\ + "); } } diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 1b1d576d440c8..5cbf6c466bc77 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -70,6 +70,34 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then PHP_ADD_EXTENSION_DEP(mysqlnd, hash) ])]) - PHP_INSTALL_HEADERS([ext/mysqlnd/]) + PHP_INSTALL_HEADERS([ext/mysqlnd/], m4_normalize([ + config-win.h + mysqlnd.h + mysqlnd_alloc.h + mysqlnd_auth.h + mysqlnd_block_alloc.h + mysqlnd_charset.h + mysqlnd_commands.h + mysqlnd_connection.h + mysqlnd_debug.h + mysqlnd_enum_n_def.h + mysqlnd_ext_plugin.h + mysqlnd_libmysql_compat.h + mysqlnd_plugin.h + mysqlnd_portability.h + mysqlnd_priv.h + mysqlnd_protocol_frame_codec.h + mysqlnd_ps.h + mysqlnd_read_buffer.h + mysqlnd_result.h + mysqlnd_result_meta.h + mysqlnd_reverse_api.h + mysqlnd_statistics.h + mysqlnd_structs.h + mysqlnd_vio.h + mysqlnd_wireprotocol.h + mysql_float_to_double.h + php_mysqlnd.h + ])) PHP_SUBST([MYSQLND_SHARED_LIBADD]) fi diff --git a/ext/pcre/config.w32 b/ext/pcre/config.w32 index 7c09456b89616..63b12b7153707 100644 --- a/ext/pcre/config.w32 +++ b/ext/pcre/config.w32 @@ -9,7 +9,16 @@ AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Define to 1 if PHP uses the bundled PCRE libr AC_DEFINE('PCRE2_CODE_UNIT_WIDTH', 8, 'Number of bits in non-UTF mode for PCRE library.'); AC_DEFINE("PCRE2_STATIC", 1, "Define to 1 if PCRE library is built statically."); PHP_PCRE="yes"; -PHP_INSTALL_HEADERS("ext/pcre", "php_pcre.h pcre2lib/"); +PHP_INSTALL_HEADERS("ext/pcre", "php_pcre.h"); +PHP_INSTALL_HEADERS("ext/pcre/pcre2lib", "\ + config.h\ + pcre2.h\ + pcre2_internal.h\ + pcre2_intmodedep.h\ + pcre2_jit_neon_inc.h\ + pcre2_jit_simd_inc.h\ + pcre2_ucp.h\ +"); ADD_FLAG("CFLAGS_PCRE", " /D HAVE_CONFIG_H /D HAVE_MEMMOVE"); ARG_WITH("pcre-jit", "Enable PCRE JIT support", "yes"); diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 7c2a8460cc5d1..9c778a48039d9 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -130,5 +130,14 @@ else [no],, [$PHP_PCRE_CFLAGS]) PHP_ADD_BUILD_DIR([$ext_builddir/pcre2lib]) - PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcre2lib/]) + PHP_INSTALL_HEADERS([ext/pcre], m4_normalize([php_pcre.h])) + PHP_INSTALL_HEADERS([ext/pcre/pcre2lib], m4_normalize([ + config.h + pcre2.h + pcre2_internal.h + pcre2_intmodedep.h + pcre2_jit_neon_inc.h + pcre2_jit_simd_inc.h + pcre2_ucp.h + ])) fi diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index ef6b3c5a01018..55b36862f02ff 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -458,4 +458,68 @@ PHP_NEW_EXTENSION([standard], m4_normalize([ PHP_ADD_BUILD_DIR([$ext_builddir/libavifinfo]) PHP_ADD_MAKEFILE_FRAGMENT -PHP_INSTALL_HEADERS([ext/standard/]) +PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ + base64.h + basic_functions.h + basic_functions_arginfo.h + crc32.h + crc32_x86.h + credits.h + credits_ext.h + credits_sapi.h + crypt_blowfish.h + crypt_freesec.h + css.h + datetime.h + dir_arginfo.h + dl.h + dl_arginfo.h + exec.h + file.h + file_arginfo.h + flock_compat.h + fsock.h + head.h + html.h + html_tables.h + info.h + md5.h + pack.h + pageinfo.h + password_arginfo.h + php_array.h + php_assert.h + php_browscap.h + php_crypt.h + php_crypt_r.h + php_dir.h + php_dir_int.h + php_dns.h + php_ext_syslog.h + php_filestat.h + php_fopen_wrappers.h + php_http.h + php_image.h + php_incomplete_class.h + php_mail.h + php_math.h + php_math_round_mode.h + php_net.h + php_password.h + php_smart_string.h + php_smart_string_public.h + php_standard.h + php_string.h + php_uuencode.h + php_var.h + php_versioning.h + proc_open.h + quot_print.h + scanf.h + sha1.h + streamsfuncs.h + url.h + url_scanner_ex.h + user_filters_arginfo.h + winver.h +])) diff --git a/ext/standard/config.w32 b/ext/standard/config.w32 index c7c14b8705ca2..1478c2a1762bd 100644 --- a/ext/standard/config.w32 +++ b/ext/standard/config.w32 @@ -40,4 +40,68 @@ EXTENSION("standard", "array.c base64.c basic_functions.c browscap.c \ ADD_SOURCES("ext/standard/libavifinfo", "avifinfo.c", "standard"); PHP_STANDARD = "yes"; ADD_MAKEFILE_FRAGMENT(); -PHP_INSTALL_HEADERS("", "ext/standard"); +PHP_INSTALL_HEADERS("ext/standard", "\ + base64.h\ + basic_functions.h\ + basic_functions_arginfo.h\ + crc32.h\ + crc32_x86.h\ + credits.h\ + credits_ext.h\ + credits_sapi.h\ + crypt_blowfish.h\ + crypt_freesec.h\ + css.h\ + datetime.h\ + dir_arginfo.h\ + dl.h\ + dl_arginfo.h\ + exec.h\ + file.h\ + file_arginfo.h\ + flock_compat.h\ + fsock.h\ + head.h\ + html.h\ + html_tables.h\ + info.h\ + md5.h\ + pack.h\ + pageinfo.h\ + password_arginfo.h\ + php_array.h\ + php_assert.h\ + php_browscap.h\ + php_crypt.h\ + php_crypt_r.h\ + php_dir.h\ + php_dir_int.h\ + php_dns.h\ + php_ext_syslog.h\ + php_filestat.h\ + php_fopen_wrappers.h\ + php_http.h\ + php_image.h\ + php_incomplete_class.h\ + php_mail.h\ + php_math.h\ + php_math_round_mode.h\ + php_net.h\ + php_password.h\ + php_smart_string.h\ + php_smart_string_public.h\ + php_standard.h\ + php_string.h\ + php_uuencode.h\ + php_var.h\ + php_versioning.h\ + proc_open.h\ + quot_print.h\ + scanf.h\ + sha1.h\ + streamsfuncs.h\ + url.h\ + url_scanner_ex.h\ + user_filters_arginfo.h\ + winver.h\ +"); diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 043f18b275b9d..138369efb0101 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -315,7 +315,170 @@ if (VS_TOOLSET && VCVERS >= 1914) { ADD_FLAG("CFLAGS_BD_WIN32", "/d2FuncCache1"); } -PHP_INSTALL_HEADERS("", "Zend/ TSRM/ main/ main/streams/ win32/"); +PHP_INSTALL_HEADERS("Zend/", "\ + zend.h\ + zend_alloc.h\ + zend_alloc_sizes.h\ + zend_API.h\ + zend_arena.h\ + zend_ast.h\ + zend_atomic.h\ + zend_attributes.h\ + zend_attributes_arginfo.h\ + zend_bitset.h\ + zend_build.h\ + zend_builtin_functions.h\ + zend_builtin_functions_arginfo.h\ + zend_call_stack.h\ + zend_closures.h\ + zend_closures_arginfo.h\ + zend_compile.h\ + zend_config.w32.h\ + zend_constants.h\ + zend_constants_arginfo.h\ + zend_cpuinfo.h\ + zend_dtrace.h\ + zend_enum.h\ + zend_enum_arginfo.h\ + zend_errors.h\ + zend_exceptions.h\ + zend_exceptions_arginfo.h\ + zend_execute.h\ + zend_extensions.h\ + zend_fibers.h\ + zend_fibers_arginfo.h\ + zend_float.h\ + zend_frameless_function.h\ + zend_gc.h\ + zend_gdb.h\ + zend_generators.h\ + zend_generators_arginfo.h\ + zend_globals.h\ + zend_globals_macros.h\ + zend_hash.h\ + zend_highlight.h\ + zend_hrtime.h\ + zend_inheritance.h\ + zend_ini.h\ + zend_ini_scanner.h\ + zend_interfaces.h\ + zend_interfaces_arginfo.h\ + zend_iterators.h\ + zend_language_scanner.h\ + zend_lazy_objects.h\ + zend_list.h\ + zend_llist.h\ + zend_long.h\ + zend_map_ptr.h\ + zend_max_execution_timer.h\ + zend_mmap.h\ + zend_modules.h\ + zend_multibyte.h\ + zend_multiply.h\ + zend_objects.h\ + zend_objects_API.h\ + zend_object_handlers.h\ + zend_observer.h\ + zend_operators.h\ + zend_portability.h\ + zend_property_hooks.h\ + zend_ptr_stack.h\ + zend_range_check.h\ + zend_signal.h\ + zend_smart_str.h\ + zend_smart_string.h\ + zend_smart_string_public.h\ + zend_smart_str_public.h\ + zend_sort.h\ + zend_stack.h\ + zend_stream.h\ + zend_string.h\ + zend_strtod.h\ + zend_strtod_int.h\ + zend_system_id.h\ + zend_types.h\ + zend_type_info.h\ + zend_variables.h\ + zend_verify_type_inference.h\ + zend_virtual_cwd.h\ + zend_vm.h\ + zend_vm_def.h\ + zend_vm_execute.h\ + zend_vm_handlers.h\ + zend_vm_opcodes.h\ + zend_vm_trace_handlers.h\ + zend_vm_trace_lines.h\ + zend_vm_trace_map.h\ + zend_weakrefs.h\ + zend_weakrefs_arginfo.h\ +"); +PHP_INSTALL_HEADERS("TSRM/", "\ + TSRM.h\ + tsrm_win32.h\ +"); +PHP_INSTALL_HEADERS("main/", "\ + fastcgi.h\ + fopen_wrappers.h\ + http_status_codes.h\ + main_arginfo.h\ + php.h\ + php_compat.h\ + php_content_types.h\ + php_getopt.h\ + php_globals.h\ + php_ini.h\ + php_ini_builder.h\ + php_main.h\ + php_memory_streams.h\ + php_network.h\ + php_odbc_utils.h\ + php_open_temporary_file.h\ + php_output.h\ + php_reentrancy.h\ + php_scandir.h\ + php_streams.h\ + php_syslog.h\ + php_ticks.h\ + php_variables.h\ + php_version.h\ + rfc1867.h\ + SAPI.h\ + snprintf.h\ + spprintf.h\ +"); +PHP_INSTALL_HEADERS("main/streams/", "\ + php_streams_int.h\ + php_stream_context.h\ + php_stream_filter_api.h\ + php_stream_glob_wrapper.h\ + php_stream_mmap.h\ + php_stream_plain_wrapper.h\ + php_stream_transport.h\ + php_stream_userspace.h\ + userspace_arginfo.h\ +"); +PHP_INSTALL_HEADERS("win32/", "\ + codepage.h\ + console.h\ + fnmatch.h\ + getrusage.h\ + glob.h\ + ioutil.h\ + ipc.h\ + nice.h\ + param.h\ + php_registry.h\ + php_win32_globals.h\ + readdir.h\ + select.h\ + sendmail.h\ + signal.h\ + sockets.h\ + syslog.h\ + time.h\ + unistd.h\ + winutil.h\ +"); PHP_INSTALL_HEADERS("Zend/Optimizer", "zend_call_graph.h zend_cfg.h zend_dfg.h zend_dump.h zend_func_info.h zend_inference.h zend_optimizer.h zend_ssa.h zend_worklist.h"); STDOUT.WriteBlankLines(1); From 6d0047c2f7e895c150803ce6c5aae04beef42348 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 12:10:43 +0200 Subject: [PATCH 2/7] Don't install arginfo.h files These have never been supposed to be installed, but have been due to the glob style publishing. The are pretty much useless for the public, and won't even prevent multiple inclusion. As such, removing them is not supposed to have any BC break in practice. --- .github/labeler.yml | 18 ------------------ configure.ac | 12 ------------ ext/standard/config.m4 | 6 ------ ext/standard/config.w32 | 6 ------ win32/build/config.w32 | 12 ------------ 5 files changed, 54 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index b476e801982e5..f4eaa66edd546 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -412,35 +412,27 @@ - 'Zend/zend_ast.h' - 'Zend/zend_atomic.h' - 'Zend/zend_attributes.h' - - 'Zend/zend_attributes_arginfo.h' - 'Zend/zend_bitset.h' - 'Zend/zend_build.h' - 'Zend/zend_builtin_functions.h' - - 'Zend/zend_builtin_functions_arginfo.h' - 'Zend/zend_call_stack.h' - 'Zend/zend_closures.h' - - 'Zend/zend_closures_arginfo.h' - 'Zend/zend_compile.h' - 'Zend/zend_config.w32.h' - 'Zend/zend_constants.h' - - 'Zend/zend_constants_arginfo.h' - 'Zend/zend_cpuinfo.h' - 'Zend/zend_dtrace.h' - 'Zend/zend_enum.h' - - 'Zend/zend_enum_arginfo.h' - 'Zend/zend_errors.h' - 'Zend/zend_exceptions.h' - - 'Zend/zend_exceptions_arginfo.h' - 'Zend/zend_execute.h' - 'Zend/zend_extensions.h' - 'Zend/zend_fibers.h' - - 'Zend/zend_fibers_arginfo.h' - 'Zend/zend_float.h' - 'Zend/zend_frameless_function.h' - 'Zend/zend_gc.h' - 'Zend/zend_gdb.h' - 'Zend/zend_generators.h' - - 'Zend/zend_generators_arginfo.h' - 'Zend/zend_globals.h' - 'Zend/zend_globals_macros.h' - 'Zend/zend_hash.h' @@ -450,7 +442,6 @@ - 'Zend/zend_ini.h' - 'Zend/zend_ini_scanner.h' - 'Zend/zend_interfaces.h' - - 'Zend/zend_interfaces_arginfo.h' - 'Zend/zend_iterators.h' - 'Zend/zend_language_scanner.h' - 'Zend/zend_lazy_objects.h' @@ -498,7 +489,6 @@ - 'Zend/zend_vm_trace_lines.h' - 'Zend/zend_vm_trace_map.h' - 'Zend/zend_weakrefs.h' - - 'Zend/zend_weakrefs_arginfo.h' - 'ext/curl/php_curl.h' - 'ext/date/lib/timelib.h' - 'ext/date/lib/timelib_config.h' @@ -630,7 +620,6 @@ - 'ext/spl/spl_observer.h' - 'ext/standard/base64.h' - 'ext/standard/basic_functions.h' - - 'ext/standard/basic_functions_arginfo.h' - 'ext/standard/crc32.h' - 'ext/standard/crc32_x86.h' - 'ext/standard/credits.h' @@ -640,12 +629,9 @@ - 'ext/standard/crypt_freesec.h' - 'ext/standard/css.h' - 'ext/standard/datetime.h' - - 'ext/standard/dir_arginfo.h' - 'ext/standard/dl.h' - - 'ext/standard/dl_arginfo.h' - 'ext/standard/exec.h' - 'ext/standard/file.h' - - 'ext/standard/file_arginfo.h' - 'ext/standard/flock_compat.h' - 'ext/standard/fsock.h' - 'ext/standard/head.h' @@ -655,7 +641,6 @@ - 'ext/standard/md5.h' - 'ext/standard/pack.h' - 'ext/standard/pageinfo.h' - - 'ext/standard/password_arginfo.h' - 'ext/standard/php_array.h' - 'ext/standard/php_assert.h' - 'ext/standard/php_browscap.h' @@ -689,7 +674,6 @@ - 'ext/standard/streamsfuncs.h' - 'ext/standard/url.h' - 'ext/standard/url_scanner_ex.h' - - 'ext/standard/user_filters_arginfo.h' - 'ext/standard/winver.h' - 'ext/xml/expat_compat.h' - 'ext/xml/php_xml.h' @@ -697,7 +681,6 @@ - 'main/fastcgi.h' - 'main/fopen_wrappers.h' - 'main/http_status_codes.h' - - 'main/main_arginfo.h' - 'main/php.h' - 'main/php_compat.h' - 'main/php_content_types.h' @@ -729,7 +712,6 @@ - 'main/streams/php_stream_transport.h' - 'main/streams/php_stream_userspace.h' - 'main/streams/php_streams_int.h' - - 'main/streams/userspace_arginfo.h' - 'sapi/cli/cli.h' - 'sapi/embed/php_embed.h' - 'win32/codepage.h' diff --git a/configure.ac b/configure.ac index 166fafec6d6bc..502a2106d28c0 100644 --- a/configure.ac +++ b/configure.ac @@ -1609,35 +1609,27 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ zend_ast.h zend_atomic.h zend_attributes.h - zend_attributes_arginfo.h zend_bitset.h zend_build.h zend_builtin_functions.h - zend_builtin_functions_arginfo.h zend_call_stack.h zend_closures.h - zend_closures_arginfo.h zend_compile.h zend_config.w32.h zend_constants.h - zend_constants_arginfo.h zend_cpuinfo.h zend_dtrace.h zend_enum.h - zend_enum_arginfo.h zend_errors.h zend_exceptions.h - zend_exceptions_arginfo.h zend_execute.h zend_extensions.h zend_fibers.h - zend_fibers_arginfo.h zend_float.h zend_frameless_function.h zend_gc.h zend_gdb.h zend_generators.h - zend_generators_arginfo.h zend_globals.h zend_globals_macros.h zend_hash.h @@ -1647,7 +1639,6 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ zend_ini.h zend_ini_scanner.h zend_interfaces.h - zend_interfaces_arginfo.h zend_iterators.h zend_language_scanner.h zend_lazy_objects.h @@ -1695,7 +1686,6 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ zend_vm_trace_lines.h zend_vm_trace_map.h zend_weakrefs.h - zend_weakrefs_arginfo.h ])) PHP_INSTALL_HEADERS([TSRM/], m4_normalize([ TSRM.h @@ -1705,7 +1695,6 @@ PHP_INSTALL_HEADERS([main/], m4_normalize([ fastcgi.h fopen_wrappers.h http_status_codes.h - main_arginfo.h php.h php_compat.h php_content_types.h @@ -1740,7 +1729,6 @@ PHP_INSTALL_HEADERS([main/streams/], m4_normalize([ php_stream_plain_wrapper.h php_stream_transport.h php_stream_userspace.h - userspace_arginfo.h ])) PHP_INSTALL_HEADERS([Zend/Optimizer], m4_normalize([ zend_call_graph.h diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 55b36862f02ff..cfc4ce3fcc0c1 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -461,7 +461,6 @@ PHP_ADD_MAKEFILE_FRAGMENT PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ base64.h basic_functions.h - basic_functions_arginfo.h crc32.h crc32_x86.h credits.h @@ -471,12 +470,9 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ crypt_freesec.h css.h datetime.h - dir_arginfo.h dl.h - dl_arginfo.h exec.h file.h - file_arginfo.h flock_compat.h fsock.h head.h @@ -486,7 +482,6 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ md5.h pack.h pageinfo.h - password_arginfo.h php_array.h php_assert.h php_browscap.h @@ -520,6 +515,5 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ streamsfuncs.h url.h url_scanner_ex.h - user_filters_arginfo.h winver.h ])) diff --git a/ext/standard/config.w32 b/ext/standard/config.w32 index 1478c2a1762bd..6cda65e654654 100644 --- a/ext/standard/config.w32 +++ b/ext/standard/config.w32 @@ -43,7 +43,6 @@ ADD_MAKEFILE_FRAGMENT(); PHP_INSTALL_HEADERS("ext/standard", "\ base64.h\ basic_functions.h\ - basic_functions_arginfo.h\ crc32.h\ crc32_x86.h\ credits.h\ @@ -53,12 +52,9 @@ PHP_INSTALL_HEADERS("ext/standard", "\ crypt_freesec.h\ css.h\ datetime.h\ - dir_arginfo.h\ dl.h\ - dl_arginfo.h\ exec.h\ file.h\ - file_arginfo.h\ flock_compat.h\ fsock.h\ head.h\ @@ -68,7 +64,6 @@ PHP_INSTALL_HEADERS("ext/standard", "\ md5.h\ pack.h\ pageinfo.h\ - password_arginfo.h\ php_array.h\ php_assert.h\ php_browscap.h\ @@ -102,6 +97,5 @@ PHP_INSTALL_HEADERS("ext/standard", "\ streamsfuncs.h\ url.h\ url_scanner_ex.h\ - user_filters_arginfo.h\ winver.h\ "); diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 138369efb0101..cbffdda7b3b44 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -324,35 +324,27 @@ PHP_INSTALL_HEADERS("Zend/", "\ zend_ast.h\ zend_atomic.h\ zend_attributes.h\ - zend_attributes_arginfo.h\ zend_bitset.h\ zend_build.h\ zend_builtin_functions.h\ - zend_builtin_functions_arginfo.h\ zend_call_stack.h\ zend_closures.h\ - zend_closures_arginfo.h\ zend_compile.h\ zend_config.w32.h\ zend_constants.h\ - zend_constants_arginfo.h\ zend_cpuinfo.h\ zend_dtrace.h\ zend_enum.h\ - zend_enum_arginfo.h\ zend_errors.h\ zend_exceptions.h\ - zend_exceptions_arginfo.h\ zend_execute.h\ zend_extensions.h\ zend_fibers.h\ - zend_fibers_arginfo.h\ zend_float.h\ zend_frameless_function.h\ zend_gc.h\ zend_gdb.h\ zend_generators.h\ - zend_generators_arginfo.h\ zend_globals.h\ zend_globals_macros.h\ zend_hash.h\ @@ -362,7 +354,6 @@ PHP_INSTALL_HEADERS("Zend/", "\ zend_ini.h\ zend_ini_scanner.h\ zend_interfaces.h\ - zend_interfaces_arginfo.h\ zend_iterators.h\ zend_language_scanner.h\ zend_lazy_objects.h\ @@ -410,7 +401,6 @@ PHP_INSTALL_HEADERS("Zend/", "\ zend_vm_trace_lines.h\ zend_vm_trace_map.h\ zend_weakrefs.h\ - zend_weakrefs_arginfo.h\ "); PHP_INSTALL_HEADERS("TSRM/", "\ TSRM.h\ @@ -420,7 +410,6 @@ PHP_INSTALL_HEADERS("main/", "\ fastcgi.h\ fopen_wrappers.h\ http_status_codes.h\ - main_arginfo.h\ php.h\ php_compat.h\ php_content_types.h\ @@ -455,7 +444,6 @@ PHP_INSTALL_HEADERS("main/streams/", "\ php_stream_plain_wrapper.h\ php_stream_transport.h\ php_stream_userspace.h\ - userspace_arginfo.h\ "); PHP_INSTALL_HEADERS("win32/", "\ codepage.h\ From dfacc1e1ad915da0c41e0ccf68a84b93ae40f560 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 12:15:41 +0200 Subject: [PATCH 3/7] Don't install Windows specific headers on non Windows systems This is just useless. --- configure.ac | 1 - ext/mysqlnd/config9.m4 | 1 - ext/standard/config.m4 | 1 - 3 files changed, 3 deletions(-) diff --git a/configure.ac b/configure.ac index 502a2106d28c0..4119cbad3ff7b 100644 --- a/configure.ac +++ b/configure.ac @@ -1689,7 +1689,6 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ ])) PHP_INSTALL_HEADERS([TSRM/], m4_normalize([ TSRM.h - tsrm_win32.h ])) PHP_INSTALL_HEADERS([main/], m4_normalize([ fastcgi.h diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 5cbf6c466bc77..57a68b1d50b24 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -71,7 +71,6 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then ])]) PHP_INSTALL_HEADERS([ext/mysqlnd/], m4_normalize([ - config-win.h mysqlnd.h mysqlnd_alloc.h mysqlnd_auth.h diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index cfc4ce3fcc0c1..838ce2ac6ef1b 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -515,5 +515,4 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ streamsfuncs.h url.h url_scanner_ex.h - winver.h ])) From 3da50e77a01a2035f4d5f1df2873b15b155a7f04 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 12:22:07 +0200 Subject: [PATCH 4/7] Don't install internal headers Obviously, internal header files are not supposed to be published. We already had identified these as internal earlier[1]. --- .github/labeler.yml | 3 --- Zend/zend_strtod_int.h | 2 +- configure.ac | 2 -- ext/standard/config.m4 | 1 - ext/standard/config.w32 | 1 - ext/standard/php_dir_int.h | 2 +- main/streams/php_streams_int.h | 2 +- win32/build/config.w32 | 2 -- 8 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index f4eaa66edd546..ac981ef56f111 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -473,7 +473,6 @@ - 'Zend/zend_stream.h' - 'Zend/zend_string.h' - 'Zend/zend_strtod.h' - - 'Zend/zend_strtod_int.h' - 'Zend/zend_system_id.h' - 'Zend/zend_type_info.h' - 'Zend/zend_types.h' @@ -647,7 +646,6 @@ - 'ext/standard/php_crypt.h' - 'ext/standard/php_crypt_r.h' - 'ext/standard/php_dir.h' - - 'ext/standard/php_dir_int.h' - 'ext/standard/php_dns.h' - 'ext/standard/php_ext_syslog.h' - 'ext/standard/php_filestat.h' @@ -711,7 +709,6 @@ - 'main/streams/php_stream_plain_wrapper.h' - 'main/streams/php_stream_transport.h' - 'main/streams/php_stream_userspace.h' - - 'main/streams/php_streams_int.h' - 'sapi/cli/cli.h' - 'sapi/embed/php_embed.h' - 'win32/codepage.h' diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h index 06a02618e9e6a..6ff942a6bf98c 100644 --- a/Zend/zend_strtod_int.h +++ b/Zend/zend_strtod_int.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* internal header; not supposed to be installed; FIXME but unfortunately is */ +/* internal header; not supposed to be installed */ #ifndef ZEND_STRTOD_INT_H #define ZEND_STRTOD_INT_H diff --git a/configure.ac b/configure.ac index 4119cbad3ff7b..2d64602cc6380 100644 --- a/configure.ac +++ b/configure.ac @@ -1670,7 +1670,6 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ zend_stream.h zend_string.h zend_strtod.h - zend_strtod_int.h zend_system_id.h zend_types.h zend_type_info.h @@ -1720,7 +1719,6 @@ PHP_INSTALL_HEADERS([main/], m4_normalize([ spprintf.h ])) PHP_INSTALL_HEADERS([main/streams/], m4_normalize([ - php_streams_int.h php_stream_context.h php_stream_filter_api.h php_stream_glob_wrapper.h diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 838ce2ac6ef1b..543d8738fc5bd 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -488,7 +488,6 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ php_crypt.h php_crypt_r.h php_dir.h - php_dir_int.h php_dns.h php_ext_syslog.h php_filestat.h diff --git a/ext/standard/config.w32 b/ext/standard/config.w32 index 6cda65e654654..09785810ac074 100644 --- a/ext/standard/config.w32 +++ b/ext/standard/config.w32 @@ -70,7 +70,6 @@ PHP_INSTALL_HEADERS("ext/standard", "\ php_crypt.h\ php_crypt_r.h\ php_dir.h\ - php_dir_int.h\ php_dns.h\ php_ext_syslog.h\ php_filestat.h\ diff --git a/ext/standard/php_dir_int.h b/ext/standard/php_dir_int.h index f9d63e78661a1..c17b8d7dadbed 100644 --- a/ext/standard/php_dir_int.h +++ b/ext/standard/php_dir_int.h @@ -12,7 +12,7 @@ +----------------------------------------------------------------------+ */ -/* internal header; not supposed to be installed; FIXME but unfortunately is */ +/* internal header; not supposed to be installed */ #ifndef PHP_DIR_INT_H #define PHP_DIR_INT_H diff --git a/main/streams/php_streams_int.h b/main/streams/php_streams_int.h index 7580088fba316..f2a29c728b259 100644 --- a/main/streams/php_streams_int.h +++ b/main/streams/php_streams_int.h @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* internal header; not supposed to be installed; FIXME but unfortunately is */ +/* internal header; not supposed to be installed */ #if ZEND_DEBUG diff --git a/win32/build/config.w32 b/win32/build/config.w32 index cbffdda7b3b44..0e8f743ef087c 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -385,7 +385,6 @@ PHP_INSTALL_HEADERS("Zend/", "\ zend_stream.h\ zend_string.h\ zend_strtod.h\ - zend_strtod_int.h\ zend_system_id.h\ zend_types.h\ zend_type_info.h\ @@ -436,7 +435,6 @@ PHP_INSTALL_HEADERS("main/", "\ spprintf.h\ "); PHP_INSTALL_HEADERS("main/streams/", "\ - php_streams_int.h\ php_stream_context.h\ php_stream_filter_api.h\ php_stream_glob_wrapper.h\ From a818d00be138c11239eaaffac798217e64551365 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 14:54:53 +0200 Subject: [PATCH 5/7] Update configure.ac Co-authored-by: Peter Kokot --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2d64602cc6380..258b13a7cf305 100644 --- a/configure.ac +++ b/configure.ac @@ -1615,7 +1615,7 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ zend_call_stack.h zend_closures.h zend_compile.h - zend_config.w32.h + zend_config.h zend_constants.h zend_cpuinfo.h zend_dtrace.h From a04adef254cfac953215bd1b65e57b0d2c2cd6bb Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 14:55:06 +0200 Subject: [PATCH 6/7] Update configure.ac Co-authored-by: Peter Kokot --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 258b13a7cf305..8918c3be45f58 100644 --- a/configure.ac +++ b/configure.ac @@ -1695,6 +1695,7 @@ PHP_INSTALL_HEADERS([main/], m4_normalize([ http_status_codes.h php.h php_compat.h + php_config.h php_content_types.h php_getopt.h php_globals.h From df588595cccd291b9e3fa7a4e598a2f2659f014b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 26 Sep 2024 16:18:50 +0200 Subject: [PATCH 7/7] Revert "Don't install Windows specific headers on non Windows systems" This reverts commit dfacc1e1ad915da0c41e0ccf68a84b93ae40f560. These headers might be useful for cross-compilation. --- configure.ac | 1 + ext/mysqlnd/config9.m4 | 1 + ext/standard/config.m4 | 1 + 3 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 8918c3be45f58..1a08e37ed0d62 100644 --- a/configure.ac +++ b/configure.ac @@ -1688,6 +1688,7 @@ PHP_INSTALL_HEADERS([Zend/], m4_normalize([ ])) PHP_INSTALL_HEADERS([TSRM/], m4_normalize([ TSRM.h + tsrm_win32.h ])) PHP_INSTALL_HEADERS([main/], m4_normalize([ fastcgi.h diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 57a68b1d50b24..5cbf6c466bc77 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -71,6 +71,7 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then ])]) PHP_INSTALL_HEADERS([ext/mysqlnd/], m4_normalize([ + config-win.h mysqlnd.h mysqlnd_alloc.h mysqlnd_auth.h diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 543d8738fc5bd..bdc8af7a23851 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -514,4 +514,5 @@ PHP_INSTALL_HEADERS([ext/standard/], m4_normalize([ streamsfuncs.h url.h url_scanner_ex.h + winver.h ]))