Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38320 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 675 invoked from network); 17 Jun 2008 11:21:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2008 11:21:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=soho@msoho.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=soho@msoho.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain msoho.com from 72.14.252.156 cause and error) X-PHP-List-Original-Sender: soho@msoho.com X-Host-Fingerprint: 72.14.252.156 po-out-1718.google.com Received: from [72.14.252.156] ([72.14.252.156:53511] helo=po-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/D6-61252-14E97584 for ; Tue, 17 Jun 2008 07:21:39 -0400 Received: by po-out-1718.google.com with SMTP id c31so10429746poi.3 for ; Tue, 17 Jun 2008 04:21:35 -0700 (PDT) Received: by 10.110.63.6 with SMTP id l6mr5317300tia.4.1213701694320; Tue, 17 Jun 2008 04:21:34 -0700 (PDT) Received: from 0XFF ( [61.129.60.82]) by mx.google.com with ESMTPS id w5sm10297336tib.9.2008.06.17.04.21.29 (version=SSLv3 cipher=RC4-MD5); Tue, 17 Jun 2008 04:21:32 -0700 (PDT) Reply-To: To: Date: Tue, 17 Jun 2008 19:21:22 +0800 Message-ID: <001d01c8d06c$492a3f50$db7ebdf0$@org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001E_01C8D0AF.574D7F50" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcjQbEWk8S6kqbeUTQW7/RGhU1FJvw== Content-Language: en-us Sender: MSOHOM Subject: [PATCH] ext/phar/util.c From: mail@xuefeng.org ("xuefeng") ------=_NextPart_000_001E_01C8D0AF.574D7F50 Content-Type: multipart/alternative; boundary="----=_NextPart_001_001F_01C8D0AF.574EDEE0" ------=_NextPart_001_001F_01C8D0AF.574EDEE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit d:\devel\php\php5\ext\phar\util.c(1832) : error C2036: 'void *' : unknown size d:\devel\php\php5\ext\phar\util.c(1864) : error C2036: 'void *' : unknown size NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' : return code '0x2' Stop. Index: ext/phar/util.c =================================================================== RCS file: /repository/php-src/ext/phar/util.c,v retrieving revision 1.55.2.10 diff -u -r1.55.2.10 util.c --- ext/phar/util.c 15 Jun 2008 22:51:46 -0000 1.55.2.10 +++ ext/phar/util.c 17 Jun 2008 11:12:50 -0000 @@ -1827,12 +1827,12 @@ */ static int phar_add_empty(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */ { - void *dummy = (void *) 1; + char *dummy = (char *) 1; if (SUCCESS == zend_hash_find(ht, arKey, nKeyLength, (void **)&dummy)) { dummy++; } - return zend_hash_update(ht, arKey, nKeyLength, &dummy, sizeof(void *), NULL); + return zend_hash_update(ht, arKey, nKeyLength, (void*)&dummy, sizeof(void *), NULL); } /* }}} */ @@ -1856,7 +1856,7 @@ /* we use filename_len - 1 to avoid adding a virtual dir for empty directory entries */ for (; s - filename < filename_len - 1; s++) { if (*s == '/') { - void *dummy; + char *dummy; if (FAILURE == zend_hash_find(&phar->virtual_dirs, filename, s - filename, (void **)&dummy)) { continue; } @@ -1864,7 +1864,7 @@ if (!--dummy) { zend_hash_del(&phar->virtual_dirs, filename, s - filename); } else { - zend_hash_update(&phar->virtual_dirs, filename, s - filename, &dummy, sizeof(void *), NULL); + zend_hash_update(&phar->virtual_dirs, filename, s - filename, (void*)&dummy, sizeof(void *), NULL); } } } ===================== Done. ------=_NextPart_001_001F_01C8D0AF.574EDEE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable


d:\devel\php\php5\ext\phar\util.c(1832) : error C2036: 'void *' : = unknown size

d:\devel\php\php5\ext\phar\util.c(1864) : error = C2036: 'void *' : unknown size

NMAKE : fatal error U1077: '"C:\Program = Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' : return code = '0x2'

Stop.

 

 

Index: ext/phar/util.c

=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

RCS file: = /repository/php-src/ext/phar/util.c,v

retrieving revision 1.55.2.10

diff -u -r1.55.2.10 util.c

--- = ext/phar/util.c         &nbs= p;  15 Jun 2008 22:51:46 = -0000           = 1.55.2.10

+++ = ext/phar/util.c         17 Jun 2008 11:12:50 -0000

@@ -1827,12 +1827,12 @@

  */

 static int phar_add_empty(HashTable *ht, char = *arKey, uint nKeyLength)  /* {{{ */

 {

-         =      void *dummy =3D (void *) 1;

+         =     char *dummy =3D (char *) 1;

         &= nbsp;      if (SUCCESS =3D=3D zend_hash_find(ht, arKey, nKeyLength, (void = **)&dummy)) {

         &= nbsp;           &n= bsp;          = dummy++;

         &= nbsp;      }

 

-         =      return zend_hash_update(ht, arKey, nKeyLength, &dummy, sizeof(void *), = NULL);

+         =     return zend_hash_update(ht, arKey, nKeyLength, (void*)&dummy, sizeof(void = *), NULL);

 }

 /* }}} */

 

@@ -1856,7 +1856,7 @@

         &= nbsp;      /* we use filename_len - 1 to avoid adding a virtual dir for empty = directory entries */

         &= nbsp;      for (; s - filename < filename_len - 1; s++) {

         &= nbsp;           &n= bsp;          if (*s =3D=3D '/') {

-         =             &= nbsp;           &n= bsp;            = void *dummy;

+         =             &= nbsp;           &n= bsp;           char *dummy;

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;  if (FAILURE =3D=3D zend_hash_find(&phar->virtual_dirs, filename, s - = filename, (void **)&dummy)) {

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;      continue;

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;  }

@@ -1864,7 +1864,7 @@

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;  if (!--dummy) {

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;      = zend_hash_del(&phar->virtual_dirs, filename, s - filename);

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;  } else {

-         =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;    zend_hash_update(&phar->virtual_dirs, filename, s - filename, &dummy, sizeof(void *), = NULL);

+         =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;   zend_hash_update(&phar->virtual_dirs, filename, s - filename, (void*)&dummy, sizeof(void *), = NULL);

         &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;  }

         &= nbsp;           &n= bsp;          = }

         &= nbsp;      }

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D

Done.

 

 

 



__________ Information from ESET NOD32 Antivirus, version of = virus signature database 3193 (20080617) __________

The message = was checked by ESET NOD32 Antivirus.

http://www.eset.com
------=_NextPart_001_001F_01C8D0AF.574EDEE0-- ------=_NextPart_000_001E_01C8D0AF.574D7F50 Content-Type: text/plain; name="util.c.patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="util.c.patch.txt" Index: ext/phar/util.c =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 RCS file: /repository/php-src/ext/phar/util.c,v retrieving revision 1.55.2.10 diff -u -r1.55.2.10 util.c --- ext/phar/util.c 15 Jun 2008 22:51:46 -0000 1.55.2.10 +++ ext/phar/util.c 17 Jun 2008 11:12:50 -0000 @@ -1827,12 +1827,12 @@ */ static int phar_add_empty(HashTable *ht, char *arKey, uint nKeyLength) = /* {{{ */ { - void *dummy =3D (void *) 1; + char *dummy =3D (char *) 1; if (SUCCESS =3D=3D zend_hash_find(ht, arKey, nKeyLength, (void = **)&dummy)) { dummy++; } =20 - return zend_hash_update(ht, arKey, nKeyLength, &dummy, sizeof(void *), = NULL); + return zend_hash_update(ht, arKey, nKeyLength, (void*)&dummy, = sizeof(void *), NULL); } /* }}} */ =20 @@ -1856,7 +1856,7 @@ /* we use filename_len - 1 to avoid adding a virtual dir for empty = directory entries */ for (; s - filename < filename_len - 1; s++) { if (*s =3D=3D '/') { - void *dummy; + char *dummy; if (FAILURE =3D=3D zend_hash_find(&phar->virtual_dirs, filename, s - = filename, (void **)&dummy)) { continue; } @@ -1864,7 +1864,7 @@ if (!--dummy) { zend_hash_del(&phar->virtual_dirs, filename, s - filename); } else { - zend_hash_update(&phar->virtual_dirs, filename, s - filename, = &dummy, sizeof(void *), NULL); + zend_hash_update(&phar->virtual_dirs, filename, s - filename, = (void*)&dummy, sizeof(void *), NULL); } } } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Done. ------=_NextPart_000_001E_01C8D0AF.574D7F50--