]> granicus.if.org Git - php/commitdiff
Remove PHP_ICONV_H_PATH
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 7 Aug 2020 14:11:27 +0000 (16:11 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 7 Aug 2020 15:03:41 +0000 (17:03 +0200)
Directly include <iconv.h> instead, now that the giconv.h
distinction no longer exists.

ext/iconv/config.m4
ext/iconv/iconv.c

index 0588f1ba310cbc70a382d563f27caef44fa0edd7..b9f0754b5ac8027e97a1cced9b07c2fe6c370ad8 100644 (file)
@@ -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/libc-version.h>]], [[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 <iconv.h>
 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 <iconv.h>
 #include <errno.h>
 
 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 <iconv.h>
 #include <stdlib.h>
 
 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 <iconv.h>
 #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])
     ])
index 2fbf285f1852b5739181ad9da2f9a42480b7b906..92adc97b123b4a0b367d5f565be838d42368a26b 100644 (file)
 
 #ifdef HAVE_ICONV
 
-#ifdef PHP_ICONV_H_PATH
-#include PHP_ICONV_H_PATH
-#else
 #include <iconv.h>
-#endif
 
 #ifdef HAVE_GLIBC_ICONV
 #include <gnu/libc-version.h>