From 687e73c7af702d31fa1f151c3872e620b415d606 Mon Sep 17 00:00:00 2001 From: foobar Date: Wed, 30 Jul 2003 14:09:52 +0000 Subject: [PATCH] MFH --- ext/iconv/config.m4 | 13 +++++-------- ext/iconv/iconv.c | 9 ++++----- ext/iconv/php_iconv.h | 1 - 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 5700cc91ad..a136cc9c6c 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -27,10 +27,10 @@ if test "$PHP_ICONV" != "no"; then LDFLAGS="-L$PHP_ICONV_PREFIX/lib $LDFLAGS" if test -r $PHP_ICONV_PREFIX/include/giconv.h; then - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" + PHP_ICONV_H="giconv.h" else - PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" - fi + PHP_ICONV_H="iconv.h" + fi if test -z "$iconv_lib_name"; then AC_MSG_CHECKING([if iconv is glibc's]) @@ -88,7 +88,7 @@ if test "$PHP_ICONV" != "no"; then AC_MSG_CHECKING([if iconv supports errno]) AC_TRY_RUN([ -#include <$PHP_ICONV_H_PATH> +#include <$PHP_ICONV_H> #include int main() { @@ -97,7 +97,7 @@ int main() { if (cd == (iconv_t)(-1)) { if (errno == EINVAL) { return 0; - } else { + } else { return 1; } } @@ -117,9 +117,6 @@ int main() { CFLAGS="$iconv_cflags_save" LDFLAGS="$iconv_ldflags_save" - PHP_DEFINE([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>]) - AC_DEFINE_UNQUOTED([PHP_ICONV_H_PATH], [<$PHP_ICONV_H_PATH>], [Path to iconv.h]) - PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD) else diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 282ef41d3d..42e1ab7066 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -31,17 +31,16 @@ #include "php_ini.h" #include - #include "php_iconv.h" #ifdef HAVE_ICONV -#ifndef PHP_ICONV_H_PATH -#define PHP_ICONV_H_PATH +#ifdef HAVE_GICONV_H +#include +#else +#include #endif -#include PHP_ICONV_H_PATH - #ifdef HAVE_GLIBC_ICONV #include #endif diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index cd6fe83a25..db8c9d65bd 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -35,7 +35,6 @@ #include "php_have_bsd_iconv.h" #include "php_iconv_supports_errno.h" #include "php_php_iconv_impl.h" -#include "php_php_iconv_h_path.h" #endif -- 2.40.0