Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29792 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65091 invoked by uid 1010); 26 May 2007 03:10:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 65075 invoked from network); 26 May 2007 03:10:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2007 03:10:49 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 204.11.219.139 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 204.11.219.139 mail.lerdorf.com Received: from [204.11.219.139] ([204.11.219.139:40986] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 73/10-64278-835A7564 for ; Fri, 25 May 2007 23:10:49 -0400 Received: from trainburn-lm-corp-yahoo-com.local (c-24-6-22-164.hsd1.ca.comcast.net [24.6.22.164]) (authenticated bits=0) by mail.lerdorf.com (8.14.1/8.14.1/Debian-4) with ESMTP id l4Q3AjCX019508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 20:10:45 -0700 Message-ID: <4657A533.7030309@lerdorf.com> Date: Fri, 25 May 2007 20:10:43 -0700 User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Stanislav Malyshev CC: Uwe Schindler , "'PHP Internals'" References: <4657170E.8060701@zend.com> <46571CCC.4030801@zend.com> <46573710.6070800@lerdorf.com> <46573903.2060204@zend.com> <000001c79f12$9b6650b0$0201a8c0@VEGA> <465756D4.1080604@lerdorf.com> <46575C57.6010909@zend.com> <46575FD9.8080405@lerdorf.com> <46578754.30408@zend.com> In-Reply-To: <46578754.30408@zend.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.90.2/3302/Fri May 25 12:37:03 2007 on colo.lerdorf.com X-Virus-Status: Clean Subject: Re: [PHP-DEV] TSRM changes broke windows compile From: rasmus@lerdorf.com (Rasmus Lerdorf) Stanislav Malyshev wrote: >> Well, by that logic you would be fine with: >> >> #define TIME_CALL sapi_get_request_time(TSRMLS_C) >> >> and in tsrm_virtual_cwd.c >> >> #ifndef TIME_CALL >> define TIME_CALL time(0) >> #endif >> ... >> t = CWDG(realpath_cache_ttl)?TIME_CALL:0; > > Theoretically yes, that could work, but: > >> >> that makes it environment-dependent instead of explicitly-dependent, and >> also way harder to debug. >> >> Environmental side-effects like that are nasty. > > Exactly. So I'd propose to think how to do it right - not excluding > taking the whole cache & system-dependant filesystem things out of TSRM. > They do not really related to the rest of TSRM and could be abstracted > same way as open/output/error functions are abstracted. But that doesn't fix the broken side-effects we already have in the locking code depending on defines in the individuals SAPIs which Uwe showed isn't working either. And if we exclude locking from TSRM as well, what is left? We either need to tie TSRM to SAPI or we need to add the ability for the SAPIs to register their various semantics with TSRM. The filesystem code is in TSRM because of the virtual working directory stuff. That is thread-related in that each thread needs it own working directory. -Rasmus