]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Wed, 30 Jul 2003 14:09:52 +0000 (14:09 +0000)
committerfoobar <sniper@php.net>
Wed, 30 Jul 2003 14:09:52 +0000 (14:09 +0000)
ext/iconv/config.m4
ext/iconv/iconv.c
ext/iconv/php_iconv.h

index 5700cc91adc2d5396e94957acef6782263b1f206..a136cc9c6cf9e767e1322f9ddcefbce7fccb178c 100644 (file)
@@ -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
index 282ef41d3d1acea634aacbdf8d4610bee815f6aa..42e1ab7066c8920efb9b3092317402497053e546 100644 (file)
 #include "php_ini.h"
 
 #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
index cd6fe83a2577bc482015e54d93dbf53a03e3528c..db8c9d65bd8d473123cd983192bd5203f790ee9b 100644 (file)
@@ -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