From: Nikita Popov Date: Fri, 7 Aug 2020 14:11:27 +0000 (+0200) Subject: Remove PHP_ICONV_H_PATH X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7bd1d703411e1e4b1f663f0cb06af619eea04b42;p=php Remove PHP_ICONV_H_PATH Directly include instead, now that the giconv.h distinction no longer exists. --- diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 0588f1ba31..b9f0754b5a 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -29,7 +29,6 @@ if test "$PHP_ICONV" != "no"; then CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS" - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" AC_MSG_CHECKING([if iconv is glibc's]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[gnu_get_libc_version();]])],[ @@ -44,7 +43,7 @@ if test "$PHP_ICONV" != "no"; then php_iconv_old_ld="$LDFLAGS" LDFLAGS="-liconv $LDFLAGS" AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <$PHP_ICONV_H_PATH> +#include int main() { printf("%d", _libiconv_version); return 0; @@ -108,7 +107,7 @@ int main() { AC_MSG_CHECKING([if iconv supports errno]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <$PHP_ICONV_H_PATH> +#include #include int main() { @@ -135,7 +134,7 @@ int main() { AC_MSG_CHECKING([if iconv supports //IGNORE]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <$PHP_ICONV_H_PATH> +#include #include int main() { @@ -166,11 +165,10 @@ int main() { AC_MSG_CHECKING([if your cpp allows macro usage in include lines]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#define FOO <$PHP_ICONV_H_PATH> +#define FOO #include FOO ]], [])], [ AC_MSG_RESULT([yes]) - AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) ], [ AC_MSG_RESULT([no]) ]) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 2fbf285f18..92adc97b12 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -34,11 +34,7 @@ #ifdef HAVE_ICONV -#ifdef PHP_ICONV_H_PATH -#include PHP_ICONV_H_PATH -#else #include -#endif #ifdef HAVE_GLIBC_ICONV #include