#17440 [Opn->Csd]: iconv fails to build on non-32-bit architectures
| From: | kalowsky@php.net | Date: | Sat, 10 Aug 2002 14:09:28 +0000 |
| Subject: | #17440 [Opn->Csd]: iconv fails to build on non-32-bit architectures | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16439@lists.php.net to get a copy of this message | ||
ID: 17440
Updated by: kalowsky@php.net
Reported By: adconrad@0c3.net
-Status: Open
+Status: Closed
Bug Type: Compile Failure
Operating System: Linux 2.4
PHP Version: 4.2.1
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-05-26 16:25:50] adconrad@0c3.net
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
------------------------------------------------------------------------
[2002-05-26 14:30:34] adconrad@0c3.net
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