Skip to content

Commit cbbb47a

Browse files
committed
Sync headers installation
This syncs the installed sapi and extension headers on *nix and Windows systems by installing only what is intended outside of php-src. - ext/iconv (without iconv_arginfo.h) - ext/gd: (without gd_arginfo.h and gd_compat.h) - ext/mysqli (mysqli_mysqlnd.h was missing on Windows) - ext/phar (php_phar.h was missing on Windows) - ext/sodium (php_libsodium.h was missing on *nix) - ext/xml (without xml_arginfo.h) - sapi/cli (cli.h was missing on Windows)
1 parent 765382e commit cbbb47a

File tree

28 files changed

+31
-33
lines changed

28 files changed

+31
-33
lines changed

ext/date/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ tl_config.WriteLine("#define timelib_strndup estrndup");
1919
tl_config.WriteLine("#define timelib_free efree");
2020
tl_config.Close();
2121

22-
PHP_INSTALL_HEADERS("ext/date/", "php_date.h lib/timelib.h lib/timelib_config.h");
22+
PHP_INSTALL_HEADERS("ext/date", "php_date.h lib/timelib.h lib/timelib_config.h");
2323
AC_DEFINE('HAVE_TIMELIB_CONFIG_H', 1, 'Have timelib_config.h')

ext/dom/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if test "$PHP_DOM" != "no"; then
4949
PHP_ADD_BUILD_DIR($ext_builddir/$LEXBOR_DIR/ns)
5050
PHP_ADD_BUILD_DIR($ext_builddir/$LEXBOR_DIR/tag)
5151
PHP_SUBST(DOM_SHARED_LIBADD)
52-
PHP_INSTALL_HEADERS([ext/dom/xml_common.h ext/dom/xpath_callbacks.h])
52+
PHP_INSTALL_HEADERS([ext/dom], [xml_common.h xpath_callbacks.h])
5353
PHP_ADD_EXTENSION_DEP(dom, libxml)
5454
])
5555
fi

ext/filter/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ if test "$PHP_FILTER" != "no"; then
88
PHP_NEW_EXTENSION(filter, filter.c sanitizing_filters.c logical_filters.c callback_filter.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
99
PHP_SUBST(FILTER_SHARED_LIBADD)
1010

11-
PHP_INSTALL_HEADERS([ext/filter/php_filter.h])
11+
PHP_INSTALL_HEADERS([ext/filter], [php_filter.h])
1212
PHP_ADD_EXTENSION_DEP(filter, pcre)
1313
fi

ext/gd/config.m4

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ dnl Various checks for GD features
235235
PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,, \\$(GD_CFLAGS))
236236
PHP_ADD_BUILD_DIR($ext_builddir/libgd)
237237
GD_CFLAGS="-Wno-strict-prototypes -I$ext_srcdir/libgd $GD_CFLAGS"
238-
GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
238+
PHP_INSTALL_HEADERS([ext/gd], [php_gd.h libgd/])
239239

240240
PHP_TEST_BUILD(foobar, [], [
241241
AC_MSG_ERROR([GD build test failed. Please check the config.log for details.])
@@ -250,13 +250,12 @@ dnl Various checks for GD features
250250
PHP_GD_CHECK_VERSION
251251

252252
PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared)
253-
GD_HEADER_DIRS="ext/gd/"
253+
PHP_INSTALL_HEADERS([ext/gd], [php_gd.h])
254254
PHP_CHECK_LIBRARY(gd, gdImageCreate, [], [
255255
AC_MSG_ERROR([GD build test failed. Please check the config.log for details.])
256256
], [ $GD_SHARED_LIBADD ])
257257
fi
258258

259-
PHP_INSTALL_HEADERS([$GD_HEADER_DIRS])
260259
PHP_SUBST(GD_CFLAGS)
261260
PHP_SUBST(GDLIB_CFLAGS)
262261
PHP_SUBST(GDLIB_LIBS)

ext/gd/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ if (PHP_GD != "no") {
7575
ADD_FLAG("LDFLAGS_GD", "/nodefaultlib:libcmt");
7676
}
7777

78-
PHP_INSTALL_HEADERS("", "ext/gd ext/gd/libgd" );
78+
PHP_INSTALL_HEADERS("ext/gd", "php_gd.h libgd/");
7979
} else {
8080
WARNING("gd not enabled; libraries and headers not found");
8181
}

ext/gmp/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if test "$PHP_GMP" != "no"; then
2727
PHP_ADD_INCLUDE($PHP_GMP/include)
2828
fi
2929

30-
PHP_INSTALL_HEADERS([ext/gmp/php_gmp_int.h])
30+
PHP_INSTALL_HEADERS([ext/gmp], [php_gmp_int.h])
3131

3232
PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
3333
PHP_SUBST(GMP_SHARED_LIBADD)

ext/hash/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (!CHECK_HEADER_ADD_INCLUDE('xxhash.h', 'CFLAGS_HASH', hash_xxhash_dir)) {
4040
ERROR('Unable to locate xxhash headers');
4141
}
4242

43-
PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
43+
PHP_INSTALL_HEADERS('ext/hash', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
4444
'php_hash_ripemd.h php_hash_haval.h php_hash_tiger.h ' +
4545
'php_hash_gost.h php_hash_snefru.h php_hash_whirlpool.h ' +
4646
'php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ' +

ext/iconv/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main(void) {
149149

150150
PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
151151
PHP_SUBST(ICONV_SHARED_LIBADD)
152-
PHP_INSTALL_HEADERS([ext/iconv/])
152+
PHP_INSTALL_HEADERS([ext/iconv], [php_iconv.h])
153153
else
154154
AC_MSG_ERROR(Please reinstall the iconv library.)
155155
fi

ext/iconv/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (PHP_ICONV != "no") {
1717
if (!PHP_ICONV_SHARED) {
1818
ADD_DEF_FILE("ext\\iconv\\php_iconv.def");
1919
}
20-
PHP_INSTALL_HEADERS("", "ext/iconv");
20+
PHP_INSTALL_HEADERS("ext/iconv", "php_iconv.h");
2121
} else {
2222
WARNING("iconv support can't be enabled, libraries or headers are missing")
2323
PHP_ICONV = "no";

ext/json/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ ADD_SOURCES(configure_module_dirname, "json_encoder.c json_parser.tab.c json_sca
66

77
ADD_MAKEFILE_FRAGMENT();
88

9-
PHP_INSTALL_HEADERS("ext/json/", "php_json.h php_json_parser.h php_json_scanner.h");
9+
PHP_INSTALL_HEADERS("ext/json", "php_json.h php_json_parser.h php_json_scanner.h");

0 commit comments

Comments
 (0)