[PHP-CVS-DAILY] cvs: php4 / ChangeLog
changelog Fri Jan 17 20:33:24 2003 EDT Modified files: /php4 ChangeLog Log: ChangeLog update Index: php4/ChangeLog diff -u php4/ChangeLog:1.1238 php4/ChangeLog:1.1239 --- php4/ChangeLog:1.1238 Thu Jan 16 20:35:23 2003 +++ php4/ChangeLog Fri Jan 17 20:33:24 2003 @@ -1,3 +1,90 @@ +2003-01-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/standard/tests/image/getimagesize.phpt: + Added missing test result. + +2003-01-17 Moriyoshi Koizumi [EMAIL PROTECTED] + +* header: + Bump year. + +* win32/md5crypt.c: + WS fix + +2003-01-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/gd/gd.c: + Removed pointless checks of array_init() return value. + +2003-01-17 Moriyoshi Koizumi [EMAIL PROTECTED] + +* ext/standard/filters.c: + Fixed a quoted printable decoder so that it would conform to RFC2045. + +2003-01-17 Sascha Schumann [EMAIL PROTECTED] + +* sapi/thttpd/thttpd.c + sapi/thttpd/thttpd_patch: + Fix POST handling once and for all. The daemon now never blocks and + handles + uploads of up to 2GB on 32 bit platforms. + + Uploads 16KB are put into a file-backed mmap area. + + SG(request_info).content_type got corrupted somewhere. As a workaround, + we provide SAPI with a duplicate of the original string. + +2003-01-17 Marcus Boerger [EMAIL PROTECTED] + +* ext/standard/image.c + ext/standard/tests/image/image_type_to_mime_type.phpt + ext/standard/tests/image/test1pix.jp2: + fix jp2 detection and add testfile + +2003-01-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/gd/gd.c + ext/gd/libgd/gd.c + ext/gd/libgd/gd.h + ext/gd/libgd/gd_gd2.c + ext/gd/libgd/gd_jpeg.c: + Syncronize bundled GD library with latest GD (2.0.11). + +2003-01-17 Derick Rethans [EMAIL PROTECTED] + +* (PHP_4_3) + ext/standard/info.c: + - MFH: Fixed a bug that made that no newline was displayed when there was + no +value for a row. + +* ext/standard/info.c: + - Fixed a bug that made that no newline was displayed when there was no + value +for a row. + +2003-01-17 Andrey Hristov [EMAIL PROTECTED] + +* ext/swf/swf.c: + Removed pointless checks around array_init(). + +2003-01-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/imap/php_imap.c: + Fixed memory leaks in imap_get_quota imap_get_quotaroot. + Removed pointless checks around array_init(). + +2003-01-17 Moriyoshi Koizumi [EMAIL PROTECTED] + +* ext/standard/filters.c: + Significant speed enhancements. I was underestimating the power of recent + CPUs :) + +2003-01-17 Sebastian Bergmann [EMAIL PROTECTED] + +* main/internal_functions_win32.c: + Move ZEND_ENGINE_2 check to where it is defined. + 2003-01-16 Harald Radi [EMAIL PROTECTED] * main/config.w32.h
[PHP-CVS] cvs: php4 /ext/standard filters.c
moriyoshi Fri Jan 17 04:04:03 2003 EDT Modified files: /php4/ext/standard filters.c Log: Significant speed enhancements. I was underestimating the power of recent CPUs :) Index: php4/ext/standard/filters.c diff -u php4/ext/standard/filters.c:1.20 php4/ext/standard/filters.c:1.21 --- php4/ext/standard/filters.c:1.20Thu Jan 16 15:59:07 2003 +++ php4/ext/standard/filters.c Fri Jan 17 04:04:02 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: filters.c,v 1.20 2003/01/16 20:59:07 moriyoshi Exp $ */ +/* $Id: filters.c,v 1.21 2003/01/17 09:04:02 moriyoshi Exp $ */ #include php.h #include php_globals.h @@ -533,6 +533,7 @@ /* do nothing */ } +#define bmask(a) (0x (16 - a)) static php_conv_err_t php_conv_base64_decode_convert(php_conv_base64_decode *inst, const char **in_pp, size_t *in_left_p, char **out_pp, size_t *out_left_p) { php_conv_err_t err; @@ -545,12 +546,6 @@ const static unsigned int nbitsof_pack = 8; - static unsigned int bmask[17] = { - 0x, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, - 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, - 0x - }; - if (in_pp == NULL || in_left_p == NULL) { if (inst-eos || inst-urem_nbits == 0) { return SUCCESS; @@ -580,7 +575,7 @@ } else { urem_nbits -= pack_bcnt; pack |= (urem urem_nbits); - urem = bmask[urem_nbits]; + urem = bmask(urem_nbits); pack_bcnt = 0; } if (pack_bcnt 0) { @@ -606,7 +601,7 @@ } else { urem_nbits = 6 - pack_bcnt; pack |= (i urem_nbits); - urem = i bmask[urem_nbits]; + urem = i bmask(urem_nbits); pack_bcnt = 0; } } else if (ustat) { @@ -648,6 +643,7 @@ return err; } +#undef bmask /* }}} */ /* {{{ php_conv_qprint_encode */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/imap php_imap.c
iliaa Fri Jan 17 11:07:39 2003 EDT Modified files: /php4/ext/imap php_imap.c Log: Fixed memory leaks in imap_get_quota imap_get_quotaroot. Removed pointless checks around array_init(). Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.150 php4/ext/imap/php_imap.c:1.151 --- php4/ext/imap/php_imap.c:1.150 Sat Jan 4 15:06:32 2003 +++ php4/ext/imap/php_imap.cFri Jan 17 11:07:39 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.150 2003/01/04 20:06:32 helly Exp $ */ +/* $Id: php_imap.c,v 1.151 2003/01/17 16:07:39 iliaa Exp $ */ #define IMAP41 @@ -343,12 +343,7 @@ /* put parsing code here */ for(; qlist; qlist = qlist-next) { MAKE_STD_ZVAL(t_map); - if (array_init(t_map) == FAILURE) { - php_error(E_WARNING, Unable to allocate t_map memory); - FREE_ZVAL(t_map); - FREE_ZVAL(IMAPG(quota_return)); - return; - } + array_init(t_map); if (strncmp(qlist-name, STORAGE, 7) == 0) { /* this is to add backwards compatibility */ @@ -859,16 +854,13 @@ convert_to_string_ex(qroot); MAKE_STD_ZVAL(IMAPG(quota_return)); - if (array_init(IMAPG(quota_return)) == FAILURE) { - php_error(E_WARNING, %s(): Unable to allocate array memory, get_active_function_name(TSRMLS_C)); - FREE_ZVAL(IMAPG(quota_return)); - RETURN_FALSE; - } + array_init(IMAPG(quota_return)); /* set the callback for the GET_QUOTA function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if(!imap_getquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot))) { php_error(E_WARNING, %s(): c-client imap_getquota failed, get_active_function_name(TSRMLS_C)); + FREE_ZVAL(IMAPG(quota_return)); RETURN_FALSE; } @@ -893,16 +885,13 @@ convert_to_string_ex(mbox); MAKE_STD_ZVAL(IMAPG(quota_return)); - if (array_init(IMAPG(quota_return)) == FAILURE) { - php_error(E_WARNING, %s(): Unable to allocate array memory, get_active_function_name(TSRMLS_C)); - FREE_ZVAL(IMAPG(quota_return)); - RETURN_FALSE; - } + array_init(IMAPG(quota_return)); /* set the callback for the GET_QUOTAROOT function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if(!imap_getquotaroot(imap_le_struct-imap_stream, Z_STRVAL_PP(mbox))) { php_error(E_WARNING, %s(): c-client imap_getquotaroot failed, get_active_function_name(TSRMLS_C)); + FREE_ZVAL(IMAPG(quota_return)); RETURN_FALSE; } @@ -1028,9 +1017,7 @@ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, imap, le_imap); /* Initialize return array */ - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); for (msgno = 1; msgno = imap_le_struct-imap_stream-nmsgs; msgno++) { MESSAGECACHE * cache = mail_elt (imap_le_struct-imap_stream, msgno); @@ -1971,9 +1958,7 @@ rfc822_parse_adrlist(env-to, Z_STRVAL_PP(str), Z_STRVAL_PP(defaulthost)); - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); addresstmp = env-to; @@ -3493,9 +3478,7 @@ convert_to_string_ex(str); - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); string = Z_STRVAL_PP(str); end = Z_STRLEN_PP(str); @@ -3901,7 +3884,7 @@ long numNodes = 0; char buf[25]; - if(array_init(*tree) != SUCCESS) return FAILURE; + array_init(*tree); build_thread_tree_helper(top, *tree, numNodes, buf); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard info.c
derick Fri Jan 17 13:07:10 2003 EDT Modified files: /php4/ext/standard info.c Log: - Fixed a bug that made that no newline was displayed when there was no value for a row. Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.222 php4/ext/standard/info.c:1.223 --- php4/ext/standard/info.c:1.222 Sun Jan 12 09:47:18 2003 +++ php4/ext/standard/info.cFri Jan 17 13:07:10 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: info.c,v 1.222 2003/01/12 14:47:18 sebastian Exp $ */ +/* $Id: info.c,v 1.223 2003/01/17 18:07:10 derick Exp $ */ #include php.h #include php_ini.h @@ -768,14 +768,14 @@ PUTS(row_element); if (i num_cols-1) { PUTS( = ); - } else { - PUTS(\n); } } } if (PG(html_errors)) { php_printf( /td); - } + } else if (i == (num_cols - 1)) { + PUTS(\n); + } } if (PG(html_errors)) { php_printf(/tr\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/standard info.c
derick Fri Jan 17 13:12:39 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/standard info.c Log: - MFH: Fixed a bug that made that no newline was displayed when there was no value for a row. Index: php4/ext/standard/info.c diff -u php4/ext/standard/info.c:1.218.2.2 php4/ext/standard/info.c:1.218.2.3 --- php4/ext/standard/info.c:1.218.2.2 Tue Dec 31 11:35:29 2002 +++ php4/ext/standard/info.cFri Jan 17 13:12:38 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: info.c,v 1.218.2.2 2002/12/31 16:35:29 sebastian Exp $ */ +/* $Id: info.c,v 1.218.2.3 2003/01/17 18:12:38 derick Exp $ */ #include php.h #include php_ini.h @@ -768,14 +768,14 @@ PUTS(row_element); if (i num_cols-1) { PUTS( = ); - } else { - PUTS(\n); } } } if (PG(html_errors)) { php_printf( /td); - } + } else if (i == (num_cols - 1)) { + PUTS(\n); + } } if (PG(html_errors)) { php_printf(/tr\n); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/gd gd.c /ext/gd/libgd gd.c gd.h gd_gd2.c gd_jpeg.c
iliaa Fri Jan 17 13:34:07 2003 EDT Modified files: /php4/ext/gdgd.c /php4/ext/gd/libgd gd.c gd.h gd_gd2.c gd_jpeg.c Log: Syncronize bundled GD library with latest GD (2.0.11). Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.243 php4/ext/gd/gd.c:1.244 --- php4/ext/gd/gd.c:1.243 Wed Jan 8 13:11:40 2003 +++ php4/ext/gd/gd.cFri Jan 17 13:34:07 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.243 2003/01/08 18:11:40 iliaa Exp $ */ +/* $Id: gd.c,v 1.244 2003/01/17 18:34:07 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1562,17 +1562,18 @@ */ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)()) { - zval **imgind, **file, **quality; + zval **imgind, **file, **quality, **type; gdImagePtr im; char *fn = NULL; FILE *fp; int argc = ZEND_NUM_ARGS(); - int q = -1, i; + int q = -1, i, t = 1; /* The quality parameter for Wbmp stands for the threshold when called from image2wbmp() */ /* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */ + /* The quality parameter for gd2 stands for chunk size */ - if (argc 1 || argc 3 || zend_get_parameters_ex(argc, imgind, file, quality) == FAILURE) { + if (argc 1 || argc 4 || zend_get_parameters_ex(argc, imgind, file, +quality, type) == FAILURE) { ZEND_WRONG_PARAM_COUNT(); } @@ -1585,6 +1586,10 @@ convert_to_long_ex(quality); q = Z_LVAL_PP(quality); } + if (argc == 4) { + convert_to_long_ex(type); + t = Z_LVAL_PP(type); + } } if ((argc == 2) || (argc == 3 Z_STRLEN_PP(file))) { @@ -1622,7 +1627,10 @@ break; #endif default: - (*func_p)(im, fp); + if (q == -1) { + q = 128; + } + (*func_p)(im, fp, q, t); break; } fflush(fp); @@ -1749,7 +1757,7 @@ /* }}} */ #ifdef HAVE_GD_GD2 -/* {{{ proto int imagegd2(int im [, string filename]) +/* {{{ proto int imagegd2(int im [, string filename, [, int chunk_size, [, int +type]]]) Output GD2 image to browser or file */ PHP_FUNCTION(imagegd2) { Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.40 php4/ext/gd/libgd/gd.c:1.41 --- php4/ext/gd/libgd/gd.c:1.40 Thu Jan 9 21:00:39 2003 +++ php4/ext/gd/libgd/gd.c Fri Jan 17 13:34:07 2003 @@ -81,6 +81,9 @@ }; #endif /*CHARSET_EBCDIC */ +/* 2.0.10: cast instead of floor() yields 35% performance improvement. Thanks to John +Buckman. */ +#define floor_cast(exp) ((long) exp) + extern int gdCosT[]; extern int gdSinT[]; @@ -661,6 +664,76 @@ } +/* 2.0.10: before the drawing routines, some code to clip points that are + * outside the drawing window. Nick Atty ([EMAIL PROTECTED]) + * + * This is the Sutherland Hodgman Algorithm, as implemented by + * Duvanenko, Robbins and Gyurcsik - SH(DRG) for short. See Dr Dobb's + * Journal, January 1996, pp107-110 and 116-117 + * + * Given the end points of a line, and a bounding rectangle (which we + * know to be from (0,0) to (SX,SY)), adjust the endpoints to be on + * the edges of the rectangle if the line should be drawn at all, + * otherwise return a failure code + */ + +/* this does one-dimensional clipping: note that the second time it + * is called, all the x parameters refer to height and the y to width + * - the comments ignore this (if you can understand it when it's + * looking at the X parameters, it should become clear what happens on + * the second call!) The code is simplified from that in the article, + * as we know that gd images always start at (0,0) + */ + +static int clip_1d(int *x0, int *y0, int *x1, int *y1, int maxdim) { + double m; /* gradient of line */ + + if (*x0 0) { /* start of line is left of window */ + if(*x1 0) { /* as is the end, so the line never cuts the window */ + return 0; + } + m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the +line */ + /* adjust x0 to be on the left boundary (ie to be zero), and y0 to +match */ + *y0 -= m * *x0; + *x0 = 0; + /* now, perhaps, adjust the far end of the line as well */ + if (*x1 maxdim) { + *y1 += m * (maxdim - *x1); + *x1 = maxdim; +
[PHP-CVS] cvs: php4 /ext/standard image.c /ext/standard/tests/image image_type_to_mime_type.phpt test1pix.jp2
helly Fri Jan 17 13:51:31 2003 EDT Added files: /php4/ext/standard/tests/image test1pix.jp2 Modified files: /php4/ext/standard image.c /php4/ext/standard/tests/image image_type_to_mime_type.phpt Log: fix jp2 detection and add testfile Index: php4/ext/standard/image.c diff -u php4/ext/standard/image.c:1.83 php4/ext/standard/image.c:1.84 --- php4/ext/standard/image.c:1.83 Thu Jan 16 14:45:26 2003 +++ php4/ext/standard/image.c Fri Jan 17 13:51:30 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: image.c,v 1.83 2003/01/16 19:45:26 helly Exp $ */ +/* $Id: image.c,v 1.84 2003/01/17 18:51:30 helly Exp $ */ #include php.h #include stdio.h @@ -623,7 +623,7 @@ result-channels = php_read2(stream TSRMLS_CC); /* Csiz */ - /* Collect and average bit depth info */ + /* Collect bit depth info */ highest_bit_depth = bit_depth = 0; for (i = 0; i result-channels; i++) { bit_depth = php_stream_getc(stream); /* Ssiz[i] */ @@ -665,11 +665,7 @@ box_length = php_read4(stream TSRMLS_CC); /* LBox */ /* TBox */ if (php_stream_read(stream, (void *)box_type, sizeof(box_type)) != sizeof(box_type)) { - break; - } - - /* Safe to use the 0 return for EOF as neither of these can be 0 */ - if (box_length == 0 || box_type == 0) { + /* Use this as a general out of stream error */ break; } @@ -1073,9 +1069,6 @@ if (!memcmp(filetype, php_sig_iff, 4)) { return IMAGE_FILETYPE_IFF; } - if (php_get_wbmp(stream, NULL, 1 TSRMLS_CC)) { - return IMAGE_FILETYPE_WBMP; - } if (php_stream_read(stream, filetype+4, 8) != 8) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Read error!); @@ -1086,6 +1079,10 @@ return IMAGE_FILETYPE_JP2; } +/* AFTER ALL ABOVE FAILED */ + if (php_get_wbmp(stream, NULL, 1 TSRMLS_CC)) { + return IMAGE_FILETYPE_WBMP; + } return IMAGE_FILETYPE_UNKNOWN; } /* }}} */ Index: php4/ext/standard/tests/image/image_type_to_mime_type.phpt diff -u php4/ext/standard/tests/image/image_type_to_mime_type.phpt:1.4 php4/ext/standard/tests/image/image_type_to_mime_type.phpt:1.5 --- php4/ext/standard/tests/image/image_type_to_mime_type.phpt:1.4 Thu Jan 16 14:46:12 2003 +++ php4/ext/standard/tests/image/image_type_to_mime_type.phpt Fri Jan 17 13:51:30 +2003 @@ -25,9 +25,11 @@ var_dump($result); ? --EXPECT-- -array(10) { +array(11) { [test1pix.bmp]= string(9) image/bmp + [test1pix.jp2]= + string(9) image/jp2 [test1pix.jpc]= string(24) application/octet-stream [test1pix.jpg]= Index: php4/ext/standard/tests/image/test1pix.jp2 +++ php4/ext/standard/tests/image/test1pix.jp2 jP ftypjp2 jp2 -jp2h ihdr colr jp2cÿOÿQ / ÿR ÿ\ #ww w vâo o nâgLgLgdPPPEWÒWÒWaÿd Kakadu-3.0.7ÿ $ ÿßðÿÙ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /sapi/thttpd thttpd.c thttpd_patch
sas Fri Jan 17 13:53:23 2003 EDT Modified files: /php4/sapi/thttpd thttpd.c thttpd_patch Log: Fix POST handling once and for all. The daemon now never blocks and handles uploads of up to 2GB on 32 bit platforms. Uploads 16KB are put into a file-backed mmap area. SG(request_info).content_type got corrupted somewhere. As a workaround, we provide SAPI with a duplicate of the original string. Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.80 php4/sapi/thttpd/thttpd.c:1.81 --- php4/sapi/thttpd/thttpd.c:1.80 Tue Dec 31 10:59:13 2002 +++ php4/sapi/thttpd/thttpd.c Fri Jan 17 13:53:22 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.80 2002/12/31 15:59:13 sebastian Exp $ */ +/* $Id: thttpd.c,v 1.81 2003/01/17 18:53:22 sas Exp $ */ #include php.h #include SAPI.h @@ -42,7 +42,6 @@ typedef struct { httpd_conn *hc; - int read_post_data; void (*on_close)(int); smart_str sbuf; @@ -231,41 +230,6 @@ count_bytes -= read_bytes; } - count_bytes = MIN(count_bytes, - SG(request_info).content_length - SG(read_post_bytes)); - - while (read_bytes count_bytes) { - tmp = recv(TG(hc)-conn_fd, buffer + read_bytes, - count_bytes - read_bytes, 0); - if (tmp == 0 || (tmp == -1 errno != EAGAIN)) - break; - /* A simple tmp 0 produced broken code on Solaris/GCC */ - if (tmp != 0 tmp != -1) - read_bytes += tmp; - - if (tmp == -1 errno == EAGAIN) { - fd_set fdr; - - FD_ZERO(fdr); - FD_SET(TG(hc)-conn_fd, fdr); - n = select(TG(hc)-conn_fd + 1, fdr, NULL, NULL, NULL); - if (n = 0) - php_handle_aborted_connection(); - - continue; - } - } - - TG(read_post_data) += read_bytes; - - /* Hack for user-agents which send a LR or CRLF after POST data */ - if (TG(read_post_data) = TG(hc)-contentlength) { - char tmpbuf[2]; - - /* we are in non-blocking mode */ - recv(TG(hc)-conn_fd, tmpbuf, 2, 0); - } - return read_bytes; } @@ -471,7 +435,8 @@ SG(request_info).request_uri = s.c; SG(request_info).request_method = httpd_method_str(TG(hc)-method); SG(sapi_headers).http_response_code = 200; - SG(request_info).content_type = TG(hc)-contenttype; + if (TG(hc)-contenttype) + SG(request_info).content_type = strdup(TG(hc)-contenttype); SG(request_info).content_length = TG(hc)-contentlength == -1 ? 0 : TG(hc)-contentlength; @@ -485,6 +450,8 @@ free(SG(request_info).query_string); free(SG(request_info).request_uri); free(SG(request_info).path_translated); + if (SG(request_info).content_type) + free(SG(request_info).content_type); } #ifdef ZTS @@ -664,14 +631,11 @@ #endif -#define CT_LEN_MAX_RAM 8192 - static off_t thttpd_real_php_request(httpd_conn *hc, int show_source TSRMLS_DC) { TG(hc) = hc; hc-bytes_sent = 0; - TG(read_post_data) = 0; if (hc-method == METHOD_POST) hc-should_linger = 1; @@ -679,12 +643,8 @@ SIZEOF_UNCONSUMED_BYTES() hc-contentlength) { int missing = hc-contentlength - SIZEOF_UNCONSUMED_BYTES(); - if (hc-contentlength CT_LEN_MAX_RAM) { - hc-read_body_into_mem = 1; - return 0; - } else { - return -1; - } + hc-read_body_into_mem = 1; + return 0; } thttpd_request_ctor(TSRMLS_C); Index: php4/sapi/thttpd/thttpd_patch diff -u php4/sapi/thttpd/thttpd_patch:1.31 php4/sapi/thttpd/thttpd_patch:1.32 --- php4/sapi/thttpd/thttpd_patch:1.31 Sun Nov 10 10:21:13 2002 +++ php4/sapi/thttpd/thttpd_patch Fri Jan 17 13:53:22 2003 @@ -1,6 +1,6 @@ diff -ur thttpd-2.21b/Makefile.in thttpd-2.21b-cool/Makefile.in --- thttpd-2.21b/Makefile.in Thu Mar 29 20:36:21 2001 -+++ thttpd-2.21b-cool/Makefile.in Fri Nov 8 14:27:14 2002 thttpd-2.21b-cool/Makefile.in Fri Jan 17 18:15:15 2003 @@ -46,13 +46,15 @@ # You shouldn't need to edit anything below here. @@ -49,7 +49,7 @@ @name=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' version.h` ; \ diff -ur thttpd-2.21b/config.h thttpd-2.21b-cool/config.h --- thttpd-2.21b/config.h Mon Apr 9 23:57:36 2001 -+++ thttpd-2.21b-cool/config.h Fri Nov 8 14:27:14 2002
[PHP-CVS] cvs: php4(PHP_4) /sapi/thttpd thttpd.c thttpd_patch
sas Fri Jan 17 14:10:39 2003 EDT Modified files: (Branch: PHP_4) /php4/sapi/thttpd thttpd.c thttpd_patch Log: MFH POST fixes Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.77.2.2 php4/sapi/thttpd/thttpd.c:1.77.2.2.2.1 --- php4/sapi/thttpd/thttpd.c:1.77.2.2 Wed Jan 15 06:32:31 2003 +++ php4/sapi/thttpd/thttpd.c Fri Jan 17 14:10:38 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.77.2.2 2003/01/15 11:32:31 sas Exp $ */ +/* $Id: thttpd.c,v 1.77.2.2.2.1 2003/01/17 19:10:38 sas Exp $ */ #include php.h #include SAPI.h @@ -42,7 +42,6 @@ typedef struct { httpd_conn *hc; - int read_post_data; void (*on_close)(int); smart_str sbuf; @@ -231,41 +230,6 @@ count_bytes -= read_bytes; } - count_bytes = MIN(count_bytes, - SG(request_info).content_length - SG(read_post_bytes)); - - while (read_bytes count_bytes) { - tmp = recv(TG(hc)-conn_fd, buffer + read_bytes, - count_bytes - read_bytes, 0); - if (tmp == 0 || (tmp == -1 errno != EAGAIN)) - break; - /* A simple tmp 0 produced broken code on Solaris/GCC */ - if (tmp != 0 tmp != -1) - read_bytes += tmp; - - if (tmp == -1 errno == EAGAIN) { - fd_set fdr; - - FD_ZERO(fdr); - FD_SET(TG(hc)-conn_fd, fdr); - n = select(TG(hc)-conn_fd + 1, fdr, NULL, NULL, NULL); - if (n = 0) - php_handle_aborted_connection(); - - continue; - } - } - - TG(read_post_data) += read_bytes; - - /* Hack for user-agents which send a LR or CRLF after POST data */ - if (TG(read_post_data) = TG(hc)-contentlength) { - char tmpbuf[2]; - - /* we are in non-blocking mode */ - recv(TG(hc)-conn_fd, tmpbuf, 2, 0); - } - return read_bytes; } @@ -471,7 +435,8 @@ SG(request_info).request_uri = s.c; SG(request_info).request_method = httpd_method_str(TG(hc)-method); SG(sapi_headers).http_response_code = 200; - SG(request_info).content_type = TG(hc)-contenttype; + if (TG(hc)-contenttype) + SG(request_info).content_type = strdup(TG(hc)-contenttype); SG(request_info).content_length = TG(hc)-contentlength == -1 ? 0 : TG(hc)-contentlength; @@ -485,6 +450,8 @@ free(SG(request_info).query_string); free(SG(request_info).request_uri); free(SG(request_info).path_translated); + if (SG(request_info).content_type) + free(SG(request_info).content_type); } #ifdef ZTS @@ -664,14 +631,11 @@ #endif -#define CT_LEN_MAX_RAM 8192 - static off_t thttpd_real_php_request(httpd_conn *hc, int show_source TSRMLS_DC) { TG(hc) = hc; hc-bytes_sent = 0; - TG(read_post_data) = 0; if (hc-method == METHOD_POST) hc-should_linger = 1; @@ -679,12 +643,8 @@ SIZEOF_UNCONSUMED_BYTES() hc-contentlength) { int missing = hc-contentlength - SIZEOF_UNCONSUMED_BYTES(); - if (hc-contentlength CT_LEN_MAX_RAM) { - hc-read_body_into_mem = 1; - return 0; - } else { - return -1; - } + hc-read_body_into_mem = 1; + return 0; } thttpd_request_ctor(TSRMLS_C); Index: php4/sapi/thttpd/thttpd_patch diff -u php4/sapi/thttpd/thttpd_patch:1.31 php4/sapi/thttpd/thttpd_patch:1.31.4.1 --- php4/sapi/thttpd/thttpd_patch:1.31 Sun Nov 10 10:21:13 2002 +++ php4/sapi/thttpd/thttpd_patch Fri Jan 17 14:10:38 2003 @@ -1,6 +1,6 @@ diff -ur thttpd-2.21b/Makefile.in thttpd-2.21b-cool/Makefile.in --- thttpd-2.21b/Makefile.in Thu Mar 29 20:36:21 2001 -+++ thttpd-2.21b-cool/Makefile.in Fri Nov 8 14:27:14 2002 thttpd-2.21b-cool/Makefile.in Fri Jan 17 18:15:15 2003 @@ -46,13 +46,15 @@ # You shouldn't need to edit anything below here. @@ -49,7 +49,7 @@ @name=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' version.h` ; \ diff -ur thttpd-2.21b/config.h thttpd-2.21b-cool/config.h --- thttpd-2.21b/config.h Mon Apr 9 23:57:36 2001 -+++ thttpd-2.21b-cool/config.h Fri Nov 8 14:27:14 2002 thttpd-2.21b-cool/config.h Fri Jan 17 18:15:15 2003 @@ -82,6 +82,11 @@ */ #define IDLE_READ_TIMELIMIT 60 @@ -73,7 +73,7 @@ ** index pages for directories that don't have an explicit index file. diff -ur thttpd-2.21b/configure
[PHP-CVS] cvs: php4(PHP_4_3) /sapi/thttpd thttpd.c thttpd_patch
sas Fri Jan 17 14:11:38 2003 EDT Modified files: (Branch: PHP_4_3) /php4/sapi/thttpd thttpd.c thttpd_patch Log: MFH POST fixes Index: php4/sapi/thttpd/thttpd.c diff -u php4/sapi/thttpd/thttpd.c:1.77.2.2 php4/sapi/thttpd/thttpd.c:1.77.2.3 --- php4/sapi/thttpd/thttpd.c:1.77.2.2 Wed Jan 15 06:32:31 2003 +++ php4/sapi/thttpd/thttpd.c Fri Jan 17 14:11:38 2003 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: thttpd.c,v 1.77.2.2 2003/01/15 11:32:31 sas Exp $ */ +/* $Id: thttpd.c,v 1.77.2.3 2003/01/17 19:11:38 sas Exp $ */ #include php.h #include SAPI.h @@ -42,7 +42,6 @@ typedef struct { httpd_conn *hc; - int read_post_data; void (*on_close)(int); smart_str sbuf; @@ -231,41 +230,6 @@ count_bytes -= read_bytes; } - count_bytes = MIN(count_bytes, - SG(request_info).content_length - SG(read_post_bytes)); - - while (read_bytes count_bytes) { - tmp = recv(TG(hc)-conn_fd, buffer + read_bytes, - count_bytes - read_bytes, 0); - if (tmp == 0 || (tmp == -1 errno != EAGAIN)) - break; - /* A simple tmp 0 produced broken code on Solaris/GCC */ - if (tmp != 0 tmp != -1) - read_bytes += tmp; - - if (tmp == -1 errno == EAGAIN) { - fd_set fdr; - - FD_ZERO(fdr); - FD_SET(TG(hc)-conn_fd, fdr); - n = select(TG(hc)-conn_fd + 1, fdr, NULL, NULL, NULL); - if (n = 0) - php_handle_aborted_connection(); - - continue; - } - } - - TG(read_post_data) += read_bytes; - - /* Hack for user-agents which send a LR or CRLF after POST data */ - if (TG(read_post_data) = TG(hc)-contentlength) { - char tmpbuf[2]; - - /* we are in non-blocking mode */ - recv(TG(hc)-conn_fd, tmpbuf, 2, 0); - } - return read_bytes; } @@ -471,7 +435,8 @@ SG(request_info).request_uri = s.c; SG(request_info).request_method = httpd_method_str(TG(hc)-method); SG(sapi_headers).http_response_code = 200; - SG(request_info).content_type = TG(hc)-contenttype; + if (TG(hc)-contenttype) + SG(request_info).content_type = strdup(TG(hc)-contenttype); SG(request_info).content_length = TG(hc)-contentlength == -1 ? 0 : TG(hc)-contentlength; @@ -485,6 +450,8 @@ free(SG(request_info).query_string); free(SG(request_info).request_uri); free(SG(request_info).path_translated); + if (SG(request_info).content_type) + free(SG(request_info).content_type); } #ifdef ZTS @@ -664,14 +631,11 @@ #endif -#define CT_LEN_MAX_RAM 8192 - static off_t thttpd_real_php_request(httpd_conn *hc, int show_source TSRMLS_DC) { TG(hc) = hc; hc-bytes_sent = 0; - TG(read_post_data) = 0; if (hc-method == METHOD_POST) hc-should_linger = 1; @@ -679,12 +643,8 @@ SIZEOF_UNCONSUMED_BYTES() hc-contentlength) { int missing = hc-contentlength - SIZEOF_UNCONSUMED_BYTES(); - if (hc-contentlength CT_LEN_MAX_RAM) { - hc-read_body_into_mem = 1; - return 0; - } else { - return -1; - } + hc-read_body_into_mem = 1; + return 0; } thttpd_request_ctor(TSRMLS_C); Index: php4/sapi/thttpd/thttpd_patch diff -u php4/sapi/thttpd/thttpd_patch:1.31 php4/sapi/thttpd/thttpd_patch:1.31.2.1 --- php4/sapi/thttpd/thttpd_patch:1.31 Sun Nov 10 10:21:13 2002 +++ php4/sapi/thttpd/thttpd_patch Fri Jan 17 14:11:38 2003 @@ -1,6 +1,6 @@ diff -ur thttpd-2.21b/Makefile.in thttpd-2.21b-cool/Makefile.in --- thttpd-2.21b/Makefile.in Thu Mar 29 20:36:21 2001 -+++ thttpd-2.21b-cool/Makefile.in Fri Nov 8 14:27:14 2002 thttpd-2.21b-cool/Makefile.in Fri Jan 17 18:15:15 2003 @@ -46,13 +46,15 @@ # You shouldn't need to edit anything below here. @@ -49,7 +49,7 @@ @name=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' version.h` ; \ diff -ur thttpd-2.21b/config.h thttpd-2.21b-cool/config.h --- thttpd-2.21b/config.h Mon Apr 9 23:57:36 2001 -+++ thttpd-2.21b-cool/config.h Fri Nov 8 14:27:14 2002 thttpd-2.21b-cool/config.h Fri Jan 17 18:15:15 2003 @@ -82,6 +82,11 @@ */ #define IDLE_READ_TIMELIMIT 60 @@ -73,7 +73,7 @@ ** index pages for directories that don't have an explicit index file. diff -ur thttpd-2.21b/configure thttpd-2.21b-cool/configure
[PHP-CVS] cvs: php4 /ext/standard filters.c
moriyoshi Fri Jan 17 15:00:33 2003 EDT Modified files: /php4/ext/standard filters.c Log: Fixed a quoted printable decoder so that it would conform to RFC2045. Index: php4/ext/standard/filters.c diff -u php4/ext/standard/filters.c:1.21 php4/ext/standard/filters.c:1.22 --- php4/ext/standard/filters.c:1.21Fri Jan 17 04:04:02 2003 +++ php4/ext/standard/filters.c Fri Jan 17 15:00:31 2003 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: filters.c,v 1.21 2003/01/17 09:04:02 moriyoshi Exp $ */ +/* $Id: filters.c,v 1.22 2003/01/17 20:00:31 moriyoshi Exp $ */ #include php.h #include php_globals.h @@ -865,11 +865,20 @@ int scan_stat; unsigned int next_char; + const char *lbchars; + int lbchars_dup; + size_t lbchars_len; + int persistent; + unsigned int lb_ptr; + unsigned int lb_cnt; } php_conv_qprint_decode; static void php_conv_qprint_decode_dtor(php_conv_qprint_decode *inst) { - /* do nothing */ + assert(inst != NULL); + if (inst-lbchars_dup inst-lbchars != NULL) { + pefree((void *)inst-lbchars, inst-persistent); + } } static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *inst, const char **in_pp, size_t *in_left_p, char **out_pp, size_t *out_left_p) @@ -878,9 +887,13 @@ size_t icnt, ocnt; unsigned char *ps, *pd; unsigned int scan_stat; - unsigned int v; + unsigned int next_char; + unsigned int lb_ptr, lb_cnt; - if (in_pp == NULL || in_left_p == NULL) { + lb_ptr = inst-lb_ptr; + lb_cnt = inst-lb_cnt; + + if ((in_pp == NULL || in_left_p == NULL) lb_cnt == lb_ptr) { if (inst-scan_stat != 0) { return PHP_CONV_ERR_UNEXPECTED_EOS; } @@ -892,12 +905,14 @@ pd = (unsigned char *)(*out_pp); ocnt = *out_left_p; scan_stat = inst-scan_stat; + next_char = inst-next_char; - v = 0; - - for (;icnt 0; icnt--) { + for (;;) { switch (scan_stat) { case 0: { + if (icnt = 0) { + goto out; + } if (*ps == '=') { scan_stat = 1; } else { @@ -908,41 +923,104 @@ *(pd++) = *ps; ocnt--; } + ps++, icnt--; } break; - case 1: case 2: { - unsigned int nbl = (*ps = 'A' ? *ps - 0x37 : *ps - 0x30); + case 1: { + if (icnt = 0) { + goto out; + } + if (*ps == ' ' || *ps == '\t') { + scan_stat = 4; + ps++, icnt--; + break; + } else if (lb_cnt inst-lbchars_len + *ps == (unsigned +char)inst-lbchars[lb_cnt]) { + lb_cnt++; + scan_stat = 5; + ps++, icnt--; + break; + } + } /* break is missing intentionally */ + + case 2: { + unsigned int nbl; + + if (icnt = 0) { + goto out; + } + nbl = (*ps = 'A' ? *ps - 0x37 : *ps - 0x30); if (nbl 15) { err = PHP_CONV_ERR_INVALID_SEQ; goto out; } - v = (v 4) | nbl; + next_char = (next_char 4) | nbl; scan_stat++; - if (scan_stat == 3) { - if (ocnt 1) { - inst-next_char = v; - err = PHP_CONV_ERR_TOO_BIG; - goto out; - } - *(pd++) = v; - ocnt--; - scan_stat = 0; + ps++, icnt--; + if
[PHP-CVS] cvs: php4 /ext/gd gd.c
iliaa Fri Jan 17 16:37:57 2003 EDT Modified files: /php4/ext/gdgd.c Log: Removed pointless checks of array_init() return value. Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.244 php4/ext/gd/gd.c:1.245 --- php4/ext/gd/gd.c:1.244 Fri Jan 17 13:34:07 2003 +++ php4/ext/gd/gd.cFri Jan 17 16:37:56 2003 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.244 2003/01/17 18:34:07 iliaa Exp $ */ +/* $Id: gd.c,v 1.245 2003/01/17 21:37:56 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -494,10 +494,8 @@ RETURN_FALSE; } - if (array_init(return_value) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Unable to initialize array); - RETURN_FALSE; - } + array_init(return_value); + #if HAVE_GD_BUNDLED add_assoc_string(return_value, GD Version, bundled (2.0 compatible), 1); #elif HAVE_LIBGD20 @@ -2038,9 +2036,8 @@ col = Z_LVAL_PP(index); #if HAVE_LIBGD20 if ((col = 0 gdImageTrueColor(im)) || (!gdImageTrueColor(im) col = 0 col gdImageColorsTotal(im))) { - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); + add_assoc_long(return_value,red, gdImageRed(im,col)); add_assoc_long(return_value,green, gdImageGreen(im,col)); add_assoc_long(return_value,blue, gdImageBlue(im,col)); @@ -2048,9 +2045,8 @@ } #else if (col = 0 col gdImageColorsTotal(im)) { - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); + add_assoc_long(return_value,red, im-red[col]); add_assoc_long(return_value,green, im-green[col]); add_assoc_long(return_value,blue, im-blue[col]); @@ -3060,9 +3056,7 @@ RETURN_FALSE; } - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); /* return array with the text's bounding box */ for (i = 0; i 8; i++) { @@ -3441,10 +3435,7 @@ } } - if (array_init(return_value) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Couldn't initialize array for returning bounding box); - RETURN_FALSE; - } + array_init(return_value); add_next_index_long(return_value, str_img-metrics.leftSideBearing); add_next_index_long(return_value, str_img-metrics.descent); @@ -3546,9 +3537,7 @@ } if (T1_errno) RETURN_FALSE; - if (array_init(return_value) == FAILURE) { - RETURN_FALSE; - } + array_init(return_value); /* printf(%d %d %d %d\n, str_bbox.llx, str_bbox.lly, str_bbox.urx, str_bbox.ury); */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /win32 md5crypt.c
moriyoshi Fri Jan 17 17:45:25 2003 EDT Modified files: /php4/win32 md5crypt.c Log: WS fix Index: php4/win32/md5crypt.c diff -u php4/win32/md5crypt.c:1.2 php4/win32/md5crypt.c:1.3 --- php4/win32/md5crypt.c:1.2 Tue Dec 31 10:59:14 2002 +++ php4/win32/md5crypt.c Fri Jan 17 17:45:23 2003 @@ -12,11 +12,11 @@ | obtain it through the world-wide-web, please send a note to | | [EMAIL PROTECTED] so we can mail you a copy immediately. | +--+ - | Author: Edin Kadribasic | + | Author: Edin Kadribasic | +--+ */ -/* $Id: md5crypt.c,v 1.2 2002/12/31 15:59:14 sebastian Exp $ */ +/* $Id: md5crypt.c,v 1.3 2003/01/17 22:45:23 moriyoshi Exp $ */ /* * -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 / header
moriyoshi Fri Jan 17 17:54:47 2003 EDT Modified files: /php4 header Log: Bump year. Index: php4/header diff -u php4/header:1.10 php4/header:1.11 --- php4/header:1.10Thu Feb 28 03:25:27 2002 +++ php4/header Fri Jan 17 17:54:47 2003 @@ -2,7 +2,7 @@ +--+ | PHP Version 4| +--+ - | Copyright (c) 1997-2002 The PHP Group| + | Copyright (c) 1997-2003 The PHP Group| +--+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is| @@ -15,5 +15,5 @@ | Author: | +--+ - $Id: header,v 1.10 2002/02/28 08:25:27 sebastian Exp $ + $Id: header,v 1.11 2003/01/17 22:54:47 moriyoshi Exp $ */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php4 /ext/gd gd.c /ext/gd/libgd gd.c gd.hgd_gd2.c gd_jpeg.c
On Fri, 17 Jan 2003 18:34:07 - Ilia Alshanetsky [EMAIL PROTECTED] wrote: iliaa Fri Jan 17 13:34:07 2003 EDT Modified files: /php4/ext/gd gd.c /php4/ext/gd/libgdgd.c gd.h gd_gd2.c gd_jpeg.c Log: Syncronize bundled GD library with latest GD (2.0.11). MFH'ing this commit should be a good thing. pierre -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/standard/tests/image getimagesize.phpt
iliaa Fri Jan 17 18:57:43 2003 EDT Modified files: /php4/ext/standard/tests/image getimagesize.phpt Log: Added missing test result. Index: php4/ext/standard/tests/image/getimagesize.phpt diff -u php4/ext/standard/tests/image/getimagesize.phpt:1.5 php4/ext/standard/tests/image/getimagesize.phpt:1.6 --- php4/ext/standard/tests/image/getimagesize.phpt:1.5 Thu Jan 16 14:46:11 2003 +++ php4/ext/standard/tests/image/getimagesize.phpt Fri Jan 17 18:57:43 2003 @@ -23,7 +23,7 @@ var_dump($result); ? --EXPECT-- -array(10) { +array(11) { [test1pix.bmp]= array(6) { [0]= @@ -38,6 +38,23 @@ int(24) [mime]= string(9) image/bmp + } + [test1pix.jp2]= + array(7) { +[0]= +int(1) +[1]= +int(1) +[2]= +int(10) +[3]= +string(20) width=1 height=1 +[bits]= +int(8) +[channels]= +int(3) +[mime]= +string(9) image/jp2 } [test1pix.jpc]= array(7) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4 /ext/imap config.m4 php_imap.c
sniper Sat Jan 18 02:00:49 2003 EDT Modified files: /php4/ext/imap config.m4 php_imap.c Log: Fix bug: #21687, imap extension does not include gss authentication mechanism Index: php4/ext/imap/config.m4 diff -u php4/ext/imap/config.m4:1.50 php4/ext/imap/config.m4:1.51 --- php4/ext/imap/config.m4:1.50Sat Dec 28 10:33:25 2002 +++ php4/ext/imap/config.m4 Sat Jan 18 02:00:47 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.50 2002/12/28 15:33:25 sas Exp $ +dnl $Id: config.m4,v 1.51 2003/01/18 07:00:47 sniper Exp $ dnl AC_DEFUN(IMAP_INC_CHK,[if test -r $i$1/c-client.h; then @@ -21,10 +21,10 @@ done ]) -dnl PHP_IMAP_TEST_BUILD(action-if-ok, action-if-not-ok [, extra-libs]) +dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs]) AC_DEFUN(PHP_IMAP_TEST_BUILD, [ old_LIBS=$LIBS - LIBS=$3 $LIBS + LIBS=$4 $LIBS AC_TRY_RUN([ void mm_log(void){} void mm_dlog(void){} @@ -41,17 +41,17 @@ void mm_exists(void){} void mm_searched(void){} void mm_expunged(void){} -char mail_open(); +char $1(); int main() { - mail_open(0,,0); + $1(); return 0; } ], [ LIBS=$old_LIBS -$1 +$2 ],[ LIBS=$old_LIBS -$2 +$3 ]) ]) @@ -127,7 +127,7 @@ TST_LIBS=$TST_LIBS -L$PHP_KERBEROS/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err fi -PHP_IMAP_TEST_BUILD([ +PHP_IMAP_TEST_BUILD(ssl_onceonlyinit, [ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(yes) @@ -204,8 +204,14 @@ dnl Test the build in the end TST_LIBS=$DLIBS $IMAP_SHARED_LIBADD + +dnl Check if auth_gss exists +PHP_IMAP_TEST_BUILD(auth_gssapi_valid, [ + AC_DEFINE(HAVE_IMAP_AUTH_GSS, 1, [ ]) +], [], $TST_LIBS) + AC_MSG_CHECKING(whether IMAP works) -PHP_IMAP_TEST_BUILD([ +PHP_IMAP_TEST_BUILD(mail_open, [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.151 php4/ext/imap/php_imap.c:1.152 --- php4/ext/imap/php_imap.c:1.151 Fri Jan 17 11:07:39 2003 +++ php4/ext/imap/php_imap.cSat Jan 18 02:00:47 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.151 2003/01/17 16:07:39 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.152 2003/01/18 07:00:47 sniper Exp $ */ #define IMAP41 @@ -415,7 +415,11 @@ #ifndef PHP_WIN32 auth_link(auth_log); /* link in the log authenticator */ auth_link(auth_md5); /* link in the cram-md5 authenticator */ -#ifdef HAVE_IMAP_SSL +#ifdef HAVE_IMAP_AUTH_GSS + auth_link(auth_gss); /* link in the gss authenticator */ +#endif + +#ifdef HAVE_IMAP_SSL ssl_onceonlyinit (); #endif #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php4(PHP_4_3) /ext/imap config.m4 php_imap.c
sniper Sat Jan 18 02:01:12 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/imap config.m4 php_imap.c Log: MFH: Fix bug: #21687, imap extension does not include gss authentication mechanism Index: php4/ext/imap/config.m4 diff -u php4/ext/imap/config.m4:1.49 php4/ext/imap/config.m4:1.49.2.1 --- php4/ext/imap/config.m4:1.49Fri Nov 1 11:45:59 2002 +++ php4/ext/imap/config.m4 Sat Jan 18 02:01:11 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.49 2002/11/01 16:45:59 sniper Exp $ +dnl $Id: config.m4,v 1.49.2.1 2003/01/18 07:01:11 sniper Exp $ dnl AC_DEFUN(IMAP_INC_CHK,[if test -r $i$1/c-client.h; then @@ -21,10 +21,10 @@ done ]) -dnl PHP_IMAP_TEST_BUILD(action-if-ok, action-if-not-ok [, extra-libs]) +dnl PHP_IMAP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs]) AC_DEFUN(PHP_IMAP_TEST_BUILD, [ old_LIBS=$LIBS - LIBS=$3 $LIBS + LIBS=$4 $LIBS AC_TRY_RUN([ void mm_log(void){} void mm_dlog(void){} @@ -41,17 +41,17 @@ void mm_exists(void){} void mm_searched(void){} void mm_expunged(void){} -char mail_open(); +char $1(); int main() { - mail_open(0,,0); + $1(); return 0; } ], [ LIBS=$old_LIBS -$1 +$2 ],[ LIBS=$old_LIBS -$2 +$3 ]) ]) @@ -127,7 +127,7 @@ TST_LIBS=$TST_LIBS -L$PHP_KERBEROS/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err fi -PHP_IMAP_TEST_BUILD([ +PHP_IMAP_TEST_BUILD(ssl_onceonlyinit, [ AC_MSG_RESULT(no) ], [ AC_MSG_RESULT(yes) @@ -204,8 +204,14 @@ dnl Test the build in the end TST_LIBS=$DLIBS $IMAP_SHARED_LIBADD + +dnl Check if auth_gss exists +PHP_IMAP_TEST_BUILD(auth_gssapi_valid, [ + AC_DEFINE(HAVE_IMAP_AUTH_GSS, 1, [ ]) +], [], $TST_LIBS) + AC_MSG_CHECKING(whether IMAP works) -PHP_IMAP_TEST_BUILD([ +PHP_IMAP_TEST_BUILD(mail_open, [ AC_MSG_RESULT(yes) ], [ AC_MSG_RESULT(no) Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.142.2.5 php4/ext/imap/php_imap.c:1.142.2.6 --- php4/ext/imap/php_imap.c:1.142.2.5 Tue Dec 31 11:34:43 2002 +++ php4/ext/imap/php_imap.cSat Jan 18 02:01:11 2003 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.5 2002/12/31 16:34:43 sebastian Exp $ */ +/* $Id: php_imap.c,v 1.142.2.6 2003/01/18 07:01:11 sniper Exp $ */ #define IMAP41 @@ -420,7 +420,11 @@ #ifndef PHP_WIN32 auth_link(auth_log); /* link in the log authenticator */ auth_link(auth_md5); /* link in the cram-md5 authenticator */ -#ifdef HAVE_IMAP_SSL +#ifdef HAVE_IMAP_AUTH_GSS + auth_link(auth_gss); /* link in the gss authenticator */ +#endif + +#ifdef HAVE_IMAP_SSL ssl_onceonlyinit (); #endif #endif -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php