summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2003-07-30 14:09:42 +0000
committerfoobar <sniper@php.net>2003-07-30 14:09:42 +0000
commit81c5e49a68ab6d320be7f40edcd8baf46a78e185 (patch)
tree4d02ee8b640884ac7efb5815989b02966633b4e7
parent72aa064016df89bd4b82e2f6d33ddae8df7b139f (diff)
downloadphp-git-81c5e49a68ab6d320be7f40edcd8baf46a78e185.tar.gz
Fix build on certain platforms which do not accept #include FOOBAR
-rw-r--r--ext/iconv/config.m413
-rw-r--r--ext/iconv/iconv.c9
-rw-r--r--ext/iconv/php_iconv.h1
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 <errno.h>
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 fd78adae4e..7d3e09c4be 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -36,17 +36,16 @@
#endif
#include <errno.h>
-
#include "php_iconv.h"
#ifdef HAVE_ICONV
-#ifndef PHP_ICONV_H_PATH
-#define PHP_ICONV_H_PATH <iconv.h>
+#ifdef HAVE_GICONV_H
+#include <giconv.h>
+#else
+#include <iconv.h>
#endif
-#include PHP_ICONV_H_PATH
-
#ifdef HAVE_GLIBC_ICONV
#include <gnu/libc-version.h>
#endif
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index f899bbc051..292a62ff01 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