Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3720 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73049 invoked from network); 4 Aug 2003 18:41:10 -0000 Received: from unknown (HELO prp0.prp.physik.tu-darmstadt.de) (130.83.243.130) by pb1.pair.com with SMTP; 4 Aug 2003 18:41:10 -0000 Received: from prp0.prp.physik.tu-darmstadt.de (localhost [127.0.0.1]) by prp0.prp.physik.tu-darmstadt.de (8.12.3/8.12.3/SuSE Linux 0.6) with ESMTP id h74If9E7027057 for ; Mon, 4 Aug 2003 20:41:09 +0200 Received: (from swalk@localhost) by prp0.prp.physik.tu-darmstadt.de (8.12.3/8.12.3/Submit) id h74If925027056 for internals@lists.php.net; Mon, 4 Aug 2003 20:41:09 +0200 Date: Mon, 4 Aug 2003 20:41:09 +0200 To: internals@lists.php.net Message-ID: <20030804184109.GA26797@prp0.prp.physik.tu-darmstadt.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline User-Agent: Mutt/1.3.27i Subject: Patch for version_compare() to fix bug #21611 From: et@php.net (Stefan Walk) --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, Attached is a patch that makes version_compare() treat versions such as 4.0.1p1 like 4.0.1pl1. I know this version suffix isn't used by PHP, but there were some problems because PEAR packages used it, and i don't see any problem with version_compare() handling non-php versions as well. (Afaik, the "alpha" and "beta" suffixes are also not used, but they are in version_compare). -- Regards, Stefan Walk --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="versioning_patch.txt" Index: versioning.c =================================================================== RCS file: /repository/php-src/ext/standard/versioning.c,v retrieving revision 1.15 diff -u -r1.15 versioning.c --- versioning.c 10 Jun 2003 20:03:39 -0000 1.15 +++ versioning.c 4 Aug 2003 13:46:41 -0000 @@ -90,7 +90,7 @@ compare_special_version_forms(char *form1, char *form2) { int found1 = -1, found2 = -1; - special_forms_t special_forms[9] = { + special_forms_t special_forms[10] = { {"dev", 0}, {"alpha", 1}, {"a", 1}, @@ -99,6 +99,7 @@ {"RC", 3}, {"#", 4}, {"pl", 5}, + {"p", 5}, {NULL, 0}, }; special_forms_t *pp; --tKW2IUtsqtDRztdT--