patches (Re: [PHP-DEV] Re: Iconv)
| From: | Moriyoshi Koizumi | Date: | Thu, 08 Aug 2002 08:18:45 +0000 |
| Subject: | patches (Re: [PHP-DEV] Re: Iconv) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86628@lists.php.net to get a copy of this message | ||
Hello,
hope these patches help you.
Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Moriyoshi Koizumi wrote:
> > Hello,
> >
> > I noticed by the recent cvs changes that iconv.c and config.m4 are now
> > let to avoid PHP_ATOM approach, while php_iconv.h still adopts it.
>
> Oops.
>
> >
> > Is it really necessary? in acinclude.m4, PHP_SETUP_ICONV use PHP_DEFINE
> > macro to make either HAVE_ICONV or HAVE_LIBICONV available.
> >
> > IMHO if php_iconv_supports_errno.h doesn't appear as a result of configure,
> > there must be a build system problem, which has all but nothing to do with
> > ext/iconv/*.
>
> Thanks, now I see what it's doing.
> Anyway,
>
> Why PHP_SETUP_ICONV is defined in aclocal.m4?
>
> Except iconv, other modules are using only local config.m4.
> iconv's config.m4 is better to be rewritten just like
> other module's config.m4, isn't it?
>
> --
> Yasuo Ohgaki
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Index: php_iconv.h =================================================================== RCS file: /repository/php4/ext/iconv/php_iconv.h,v retrieving revision 1.11 diff -u -r1.11 php_iconv.h --- php_iconv.h 20 Mar 2002 13:24:59 -0000 1.11 +++ php_iconv.h 8 Aug 2002 08:01:23 -0000 @@ -28,6 +28,8 @@ #ifdef PHP_ATOM_INC #include "php_have_iconv.h" +#include "php_have_libiconv.h" +#include "php_iconv_supports_errno.h" #endif Index: config.m4 =================================================================== RCS file: /repository/php4/ext/iconv/config.m4,v retrieving revision 1.13 diff -u -r1.13 config.m4 --- config.m4 8 Aug 2002 01:46:07 -0000 1.13 +++ config.m4 8 Aug 2002 08:00:48 -0000 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.13 2002/08/08 01:46:07 yohgaki Exp $ +dnl $Id$ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -38,12 +38,13 @@ } ],[ AC_MSG_RESULT(yes) - AC_DEFINE(ICONV_SUPPORTS_ERRNO,1,[Whether iconv supports error no or not]) + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1) + AC_DEFINE(ICONV_SUPPORTS_ERRNO,1,[Whether iconv supports error no or not]) ],[ + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0) AC_MSG_RESULT(no) ]) - AC_DEFINE(HAVE_ICONV,1,[Whether to build ICONV support or not]) PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD) ], [ Index: translit.phpt =================================================================== RCS file: /repository/php4/ext/iconv/tests/translit.phpt,v retrieving revision 1.3 diff -u -r1.3 translit.phpt --- translit.phpt 14 Jul 2002 00:08:22 -0000 1.3 +++ translit.phpt 8 Aug 2002 08:12:05 -0000 @@ -1,7 +1,7 @@ --TEST-- ICONV: LIBICONV transliteration (bug #16069) --SKIPIF-- -<?php include('skipif.inc'); if( iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") == '' ) die("skip(no libiconv)\n"); ?> +<?php include( 'skipif.inc' ); if( iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") == '' ) die("skip\n"); ?> --POST-- --GET-- --FILE-- Index: iconv.dsp =================================================================== RCS file: /repository/php4/ext/iconv/iconv.dsp,v retrieving revision 1.3 diff -u -r1.3 iconv.dsp --- iconv.dsp 14 Nov 2001 17:56:26 -0000 1.3 +++ iconv.dsp 8 Aug 2002 08:13:27 -0000 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICONV_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /I "..\..\..\php_build\iconv\include" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_ICONV" /D "HAVE_ICONV" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /D "HAVE_LIBICONV" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /I "..\..\..\php_build\iconv\include" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_ICONV" /D "HAVE_ICONV" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /D "ICONV_SUPPORTS_ERRNO" /D "HAVE_LIBICONV" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG"
Index: php_iconv.h =================================================================== RCS file: /repository/php4/ext/iconv/php_iconv.h,v retrieving revision 1.11 diff -u -r1.11 php_iconv.h --- php_iconv.h 20 Mar 2002 13:24:59 -0000 1.11 +++ php_iconv.h 8 Aug 2002 08:01:23 -0000 @@ -28,6 +28,8 @@ #ifdef PHP_ATOM_INC #include "php_have_iconv.h" +#include "php_have_libiconv.h" +#include "php_iconv_supports_errno.h" #endif Index: config.m4 =================================================================== RCS file: /repository/php4/ext/iconv/config.m4,v retrieving revision 1.13 diff -u -r1.13 config.m4 --- config.m4 8 Aug 2002 01:46:07 -0000 1.13 +++ config.m4 8 Aug 2002 08:00:48 -0000 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.13 2002/08/08 01:46:07 yohgaki Exp $ +dnl $Id$ dnl PHP_ARG_WITH(iconv, for iconv support, @@ -38,12 +38,13 @@ } ],[ AC_MSG_RESULT(yes) - AC_DEFINE(ICONV_SUPPORTS_ERRNO,1,[Whether iconv supports error no or not]) + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],1) + AC_DEFINE(ICONV_SUPPORTS_ERRNO,1,[Whether iconv supports error no or not]) ],[ + PHP_DEFINE([ICONV_SUPPORTS_ERRNO],0) AC_MSG_RESULT(no) ]) - AC_DEFINE(HAVE_ICONV,1,[Whether to build ICONV support or not]) PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared) PHP_SUBST(ICONV_SHARED_LIBADD) ], [ Index: translit.phpt =================================================================== RCS file: /repository/php4/ext/iconv/tests/translit.phpt,v retrieving revision 1.3 diff -u -r1.3 translit.phpt --- translit.phpt 14 Jul 2002 00:08:22 -0000 1.3 +++ translit.phpt 8 Aug 2002 08:12:05 -0000 @@ -1,7 +1,7 @@ --TEST-- ICONV: LIBICONV transliteration (bug #16069) --SKIPIF-- -<?php include('skipif.inc'); if( iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") == '' ) die("skip(no libiconv)\n"); ?> +<?php include( 'skipif.inc' ); if( iconv('CP932', 'EUC-JP//TRANSLIT', "\x87\x6d") == '' ) die("skip\n"); ?> --POST-- --GET-- --FILE-- Index: iconv.dsp =================================================================== RCS file: /repository/php4/ext/iconv/iconv.dsp,v retrieving revision 1.3 diff -u -r1.3 iconv.dsp --- iconv.dsp 14 Nov 2001 17:56:26 -0000 1.3 +++ iconv.dsp 8 Aug 2002 08:13:27 -0000 @@ -43,7 +43,7 @@ # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ICONV_EXPORTS" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /I "..\..\..\php_build\iconv\include" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_ICONV" /D "HAVE_ICONV" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /D "HAVE_LIBICONV" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\Zend" /I "..\..\TSRM" /I "..\..\main" /I "..\..\win32" /I "..\..\..\php_build\iconv\include" /D "WIN32" /D "PHP_EXPORTS" /D "COMPILE_DL_ICONV" /D "HAVE_ICONV" /D ZEND_DEBUG=0 /D "NDEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "PHP_WIN32" /D ZTS=1 /D "ICONV_SUPPORTS_ERRNO" /D "HAVE_LIBICONV" /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x407 /d "NDEBUG"