ID: 17440 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Operating System: Linux 2.4 PHP Version: 4.2.1 New Comment:
The build seems to go fine (with a warning about "passing arg 4 of `php_iconv_string' from incompatible pointer type", but there are warnings like that ALL over the PHP code when compiling on non-32-bit arches, that's nothing new) with the following simple patch applied. I'm not the world's greatest C programmer by any stretch, so someone may want to double check that this one-line fix isn't doing something incredibly stupid: ------- Begin Patch ---------- --- php4-4.2.1.orig/ext/iconv/iconv.c Thu Mar 21 13:25:25 2002 +++ php4-4.2.1/ext/iconv/iconv.c Sun May 26 14:18:46 2002 @@ -87,7 +87,7 @@ ZEND_GET_MODULE(iconv) #endif -static int php_iconv_string(const char * in_str, unsigned int in_len, char ** out_str, unsigned int * out_len, const char * in_encoding, const char * out_encoding, int *err TSRMLS_DC); +static int php_iconv_string(const char * in_str, size_t in_len, char ** out_str, size_t * out_len, const char * in_encoding, const char * out_encoding, int *err TSRMLS_DC); /* {{{ PHP_INI */ ---------- End Patch ---------- ... Adam Previous Comments: ------------------------------------------------------------------------ [2002-05-26 14:30:34] [EMAIL PROTECTED] The complete build logs for 4.2.1 can be seen here (scroll to the bottom to get at recent versions): http://buildd.debian.org/build.php?&pkg=php4 Click through on 4.2.1 s390, alpha, or ia64. You'll notice the build failures on the first attempt. This is due to an assumption that "unsigned int" == size_t, which isn't true on all architectures, only some. ... Adam ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17440&edit=1