Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23028 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83536 invoked by uid 1010); 29 Apr 2006 11:36:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 83521 invoked from network); 29 Apr 2006 11:36:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2006 11:36:03 -0000 X-PHP-List-Original-Sender: nlopess@php.net X-Host-Fingerprint: 212.55.154.21 relay1.ptmail.sapo.pt Linux 2.4/2.6 Received: from ([212.55.154.21:41908] helo=sapo.pt) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3A/0C-18514-2AF43544 for ; Sat, 29 Apr 2006 07:36:02 -0400 Received: (qmail 18279 invoked by uid 0); 29 Apr 2006 11:35:57 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.207) by relay1 with SMTP; 29 Apr 2006 11:35:57 -0000 Received: (qmail 31703 invoked from network); 29 Apr 2006 11:35:57 -0000 X-AntiVirus: PTMail-AV 0.3.88 X-Virus-Status: Clean (0.01088 seconds) Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[81.193.142.167]) (envelope-sender ) by mta12 (qmail-ldap-1.03) with SMTP for ; 29 Apr 2006 11:35:57 -0000 Message-ID: <008e01c66b81$14383920$0100a8c0@pc07653> To: "Hannes Magnusson" , "Frank M. Kromann" Cc: References: <11462511057600000@9866357972520000.9866341568840000> <7f3ed2c30604290417m1526d6e0k9268d355ac5ba472@mail.gmail.com> Date: Sat, 29 Apr 2006 12:35:55 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_008B_01C66B89.75BC63D0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Subject: Re: [PHP-DEV] ZSTR and NULL problems again From: nlopess@php.net ("Nuno Lopes") ------=_NextPart_000_008B_01C66B89.75BC63D0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit Here is a diff to fix a couple of missing ZSTR macros. ----- Original Message ----- From: "Hannes Magnusson" To: "Frank M. Kromann" Cc: "Sara Golemon" ; "Wez Furlong" ; "Andrei Zmievski" ; Sent: Saturday, April 29, 2006 12:17 PM Subject: Re: [PHP-DEV] ZSTR and NULL problems again Hi Frank > I have now removed the ZSTR() macros from the stream macros. > > Andrei will you please test that it compiles now? > http://bugs.php.net/bug.php?id=37241 ------=_NextPart_000_008B_01C66B89.75BC63D0 Content-Type: text/plain; format=flowed; name="diff.txt"; reply-type=response Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="diff.txt" Index: ext/pdo/pdo_dbh.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/pdo/pdo_dbh.c,v=0A= retrieving revision 1.127=0A= diff -u -r1.127 pdo_dbh.c=0A= --- ext/pdo/pdo_dbh.c 23 Mar 2006 19:03:30 -0000 1.127=0A= +++ ext/pdo/pdo_dbh.c 29 Apr 2006 11:34:01 -0000=0A= @@ -189,7 +189,7 @@=0A= =0A= stream =3D php_stream_open_wrapper(uri, "rb", REPORT_ERRORS, NULL);=0A= if (stream) {=0A= - dsn =3D php_stream_get_line(stream, buf, buflen, NULL);=0A= + dsn =3D php_stream_get_line(stream, ZSTR(buf), buflen, NULL);=0A= php_stream_close(stream);=0A= }=0A= return dsn;=0A= Index: ext/standard/exec.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/exec.c,v=0A= retrieving revision 1.118=0A= diff -u -r1.118 exec.c=0A= --- ext/standard/exec.c 8 Mar 2006 00:43:28 -0000 1.118=0A= +++ ext/standard/exec.c 29 Apr 2006 11:34:03 -0000=0A= @@ -92,7 +92,7 @@=0A= if (type !=3D 3) {=0A= b =3D buf;=0A= =0A= - while (php_stream_get_line(stream, b, EXEC_INPUT_BUF, &bufl)) {=0A= + while (php_stream_get_line(stream, ZSTR(b), EXEC_INPUT_BUF, &bufl)) {=0A= /* no new line found, let's read some more */=0A= if (b[bufl - 1] !=3D '\n' && !php_stream_eof(stream)) {=0A= if (buflen < (bufl + (b - buf) + EXEC_INPUT_BUF)) {=0A= Index: ext/standard/ftp_fopen_wrapper.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/standard/ftp_fopen_wrapper.c,v=0A= retrieving revision 1.90=0A= diff -u -r1.90 ftp_fopen_wrapper.c=0A= --- ext/standard/ftp_fopen_wrapper.c 20 Mar 2006 14:10:23 -0000 1.90=0A= +++ ext/standard/ftp_fopen_wrapper.c 29 Apr 2006 11:34:03 -0000=0A= @@ -71,7 +71,7 @@=0A= =0A= static inline int get_ftp_result(php_stream *stream, char *buffer, = size_t buffer_size TSRMLS_DC)=0A= {=0A= - while (php_stream_gets(stream, buffer, buffer_size-1) &&=0A= + while (php_stream_gets(stream, ZSTR(buffer), buffer_size-1) &&=0A= !(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&=0A= isdigit((int) buffer[2]) && buffer[3] =3D=3D ' '));=0A= return strtol(buffer, NULL, 10);=0A= @@ -595,7 +595,7 @@=0A= return 0;=0A= }=0A= =0A= - if (!php_stream_get_line(innerstream, ent->d_name, = sizeof(ent->d_name), &tmp_len)) {=0A= + if (!php_stream_get_line(innerstream, ZSTR(ent->d_name), = sizeof(ent->d_name), &tmp_len)) {=0A= return 0;=0A= }=0A= =0A= Index: ext/zlib/zlib.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/ext/zlib/zlib.c,v=0A= retrieving revision 1.192=0A= diff -u -r1.192 zlib.c=0A= --- ext/zlib/zlib.c 8 Mar 2006 14:41:45 -0000 1.192=0A= +++ ext/zlib/zlib.c 29 Apr 2006 11:34:04 -0000=0A= @@ -305,7 +305,7 @@=0A= /* Now loop through the file and do the magic quotes thing if needed */=0A= memset(buf,0,sizeof(buf));=0A= =0A= - while (php_stream_gets(stream, buf, sizeof(buf) - 1) !=3D NULL) {=0A= + while (php_stream_gets(stream, ZSTR(buf), sizeof(buf) - 1) !=3D NULL) {=0A= add_index_string(return_value, i++, buf, 1);=0A= }=0A= php_stream_close(stream);=0A= Index: sapi/cli/php_cli.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /repository/php-src/sapi/cli/php_cli.c,v=0A= retrieving revision 1.151=0A= diff -u -r1.151 php_cli.c=0A= --- sapi/cli/php_cli.c 22 Apr 2006 10:39:31 -0000 1.151=0A= +++ sapi/cli/php_cli.c 29 Apr 2006 11:34:04 -0000=0A= @@ -1146,7 +1146,7 @@=0A= Z_LVAL_P(argi) =3D index;=0A= INIT_PZVAL(argi);=0A= zend_hash_update(&EG(symbol_table), "argi", sizeof("argi"), &argi, = sizeof(zval *), NULL);=0A= - while (exit_status =3D=3D SUCCESS && = (input=3Dphp_stream_gets(s_in_process, NULL, 0)) !=3D NULL) {=0A= + while (exit_status =3D=3D SUCCESS && = (input=3Dphp_stream_gets(s_in_process, NULL_ZSTR, 0)) !=3D NULL) {=0A= len =3D strlen(input);=0A= while (len-- && (input[len]=3D=3D'\n' || input[len]=3D=3D'\r')) {=0A= input[len] =3D '\0';=0A= ------=_NextPart_000_008B_01C66B89.75BC63D0--