Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69406 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20530 invoked from network); 28 Sep 2013 10:57:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Sep 2013 10:57:24 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:33873] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/F3-27958-116B6425 for ; Sat, 28 Sep 2013 06:57:23 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 6318CE202D; Sat, 28 Sep 2013 11:57:19 +0100 (BST) Date: Sat, 28 Sep 2013 11:57:19 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Lior Kaplan cc: PHP internals list In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-172597835-1380365839=:5916" Subject: Re: [PHP-DEV] Gnu/Hurd support From: derick@php.net (Derick Rethans) --8323329-172597835-1380365839=:5916 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 28 Sep 2013, Lior Kaplan wrote: > On Fri, Sep 27, 2013 at 3:02 PM, Derick Rethans wrote: >=20 > > On Thu, 26 Sep 2013, Lior Kaplan wrote: > > > > > Hi, > > > > > > In Debian we build PHP for GNU/Hurd system, which need some minor fix= es > > > available here: > > > > > > > > http://anonscm.debian.org/gitweb/?p=3Dpkg-php/php.git;a=3Dblob;f=3Ddebi= an/patches/116-posixness_fix.patch > > > > 46 --- php5.orig/main/php.h > > 47 +++ php5/main/php.h > > 48 @@ -244,6 +244,10 @@ END_EXTERN_C() > > 49 /* macros */ > > 50 #define STR_PRINT(str) ((str)?(str):"") > > 51 > > 52 +#ifndef PATH_MAX > > 53 +#define PATH_MAX 4096 > > 54 +#endif > > 55 + > > 56 #ifndef MAXPATHLEN > > 57 # ifdef PATH_MAX > > 58 # define MAXPATHLEN PATH_MAX > > > > That looks wrong. You're unconditionally defining PATH_MAX, but there i= s > > logic in line 57 that deals with this too... >=20 > That whole section is about defining MAXPATHLEN, not PATH_MAX. Sure it is, but currently that code reads: #ifndef MAXPATHLEN # ifdef PATH_MAX # define MAXPATHLEN PATH_MAX # elif defined(MAX_PATH) # define MAXPATHLEN MAX_PATH # else # define MAXPATHLEN 256 /* Should be safe for any weird systems that do= not =E2=80=A6 # endif #endif With your change, PATH_MAX is *always* defined, so the fallback to=20 defined(MAX_PATH) - which is probably valid on some other platform - is=20 no longer used. These lines were added by Ilia: cd82349b (Ilia Alshanetsky 2005-12-20 14:24:24 +0000 250) # elif define= d(MAX_PATH) cd82349b (Ilia Alshanetsky 2005-12-20 14:24:24 +0000 251) # define MAX= PATHLEN MAX_PATH With as comment: commit cd82349b9e51c6986ede11f482f727e12717a6f5 Author: Ilia Alshanetsky Date: Tue Dec 20 14:24:24 2005 +0000 Fixed bug #31347 (is_dir and is_file (incorrectly) return true for any string greater then 255 characters). And bug 31347 is that was a fix for a specific issue on Windows: https://bugs.php.net/bug.php?id=3D31347 cheers, Derick --=20 http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine --8323329-172597835-1380365839=:5916--