]> granicus.if.org Git - php/commitdiff
Fix build on certain platforms which do not accept #include FOOBAR
authorfoobar <sniper@php.net>
Wed, 30 Jul 2003 14:09:42 +0000 (14:09 +0000)
committerfoobar <sniper@php.net>
Wed, 30 Jul 2003 14:09:42 +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 fd78adae4e8541da36124af28092b4145e8fdd14..7d3e09c4bed6df803f3686ab13e5726d5af489c0 100644 (file)
 #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
index f899bbc0515330e1217b4ccb721ebf4ced2e9e09..292a62ff01ea8933ad1e21e788a02f92ec079b85 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