tony2001 Wed Jan 17 20:32:53 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/iconv iconv.c
/php-src NEWS
Log:
MFH: fix #40129 (iconv extension doesn't compile with CodeWarrior on Netware)
patch by gk at gknw dot de
http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.11&r2=1.124.2.8.2.12&diff_format=u
Index: php-src/ext/iconv/iconv.c
diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.11
php-src/ext/iconv/iconv.c:1.124.2.8.2.12
--- php-src/ext/iconv/iconv.c:1.124.2.8.2.11 Mon Jan 1 09:36:01 2007
+++ php-src/ext/iconv/iconv.c Wed Jan 17 20:32:53 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: iconv.c,v 1.124.2.8.2.11 2007/01/01 09:36:01 sebastian Exp $ */
+/* $Id: iconv.c,v 1.124.2.8.2.12 2007/01/17 20:32:53 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -258,12 +258,16 @@
}
#elif HAVE_GLIBC_ICONV
version = (char *)gnu_get_libc_version();
+#elif defined(NETWARE)
+ version = "OS built-in";
#endif
#ifdef PHP_ICONV_IMPL
REGISTER_STRING_CONSTANT("ICONV_IMPL", PHP_ICONV_IMPL, CONST_CS |
CONST_PERSISTENT);
#elif HAVE_LIBICONV
REGISTER_STRING_CONSTANT("ICONV_IMPL", "libiconv", CONST_CS |
CONST_PERSISTENT);
+#elif defined(NETWARE)
+ REGISTER_STRING_CONSTANT("ICONV_IMPL", "Novell", CONST_CS |
CONST_PERSISTENT);
#else
REGISTER_STRING_CONSTANT("ICONV_IMPL", "unknown", CONST_CS |
CONST_PERSISTENT);
#endif
@@ -434,7 +438,11 @@
out_buffer = (char *) emalloc(out_size + 1);
out_p = out_buffer;
+#ifdef NETWARE
+ result = iconv(cd, (char **) &in_p, &in_size, (char **)
+#else
result = iconv(cd, (const char **) &in_p, &in_size, (char **)
+#endif
&out_p, &out_left);
if (result == (size_t)(-1)) {
@@ -710,7 +718,7 @@
#endif
}
- cd2 = NULL;
+ cd2 = (iconv_t)NULL;
for (in_p = str, in_left = nbytes, cnt = 0; in_left > 0 && len > 0;
++cnt) {
size_t prev_in_left;
@@ -726,11 +734,11 @@
}
if (cnt >= (unsigned int)offset) {
- if (cd2 == NULL) {
+ if (cd2 == (iconv_t)NULL) {
cd2 = iconv_open(enc, GENERIC_SUPERSET_NAME);
if (cd2 == (iconv_t)(-1)) {
- cd2 = NULL;
+ cd2 = (iconv_t)NULL;
#if ICONV_SUPPORTS_ERRNO
if (errno == EINVAL) {
err =
PHP_ICONV_ERR_WRONG_CHARSET;
@@ -767,17 +775,17 @@
}
#endif
if (err == PHP_ICONV_ERR_SUCCESS) {
- if (cd2 != NULL) {
+ if (cd2 != (iconv_t)NULL) {
_php_iconv_appendl(pretval, NULL, 0, cd2);
}
smart_str_0(pretval);
}
- if (cd1 != NULL) {
+ if (cd1 != (iconv_t)NULL) {
iconv_close(cd1);
}
- if (cd2 != NULL) {
+ if (cd2 != (iconv_t)NULL) {
iconv_close(cd2);
}
return err;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.496&r2=1.2027.2.547.2.497&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.496 php-src/NEWS:1.2027.2.547.2.497
--- php-src/NEWS:1.2027.2.547.2.496 Sun Jan 14 16:59:04 2007
+++ php-src/NEWS Wed Jan 17 20:32:53 2007
@@ -4,6 +4,8 @@
- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
- Improved proc_open(). Now on Windows it can run external commands not through
CMD.EXE. (Dmitry)
+- Fixed bug #40129 (iconv extension doesn't compile with CodeWarrior on
+ Netware). (gk at gknw dot de, Tony)
- Fixed bug #40127 (apache2handler doesnt compile on Netware). (gk at gknw
dot de)
- Fixed bug #40121 (PDO_DBLIB driver wont free statements). (Ilia)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php