Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29778 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80640 invoked by uid 1010); 25 May 2007 22:14:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 80625 invoked from network); 25 May 2007 22:14:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2007 22:14:52 -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:46694] helo=mail.lerdorf.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/61-03210-BDF57564 for ; Fri, 25 May 2007 18:14:52 -0400 Received: from trainburn-lm.corp.yahoo.com (trainburn-lm.corp.yahoo.com [207.126.233.11]) (authenticated bits=0) by mail.lerdorf.com (8.14.1/8.14.1/Debian-4) with ESMTP id l4PMEmmM015280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 25 May 2007 15:14:48 -0700 Message-ID: <46575FD9.8080405@lerdorf.com> Date: Fri, 25 May 2007 15:14:49 -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> In-Reply-To: <46575C57.6010909@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: >> quite expensive. And SAPI isn't only for web server interaction. SAPI >> is a general-purpose abstraction API that sits between PHP and anything >> PHP talks to. CGI, CLI, and even embedded PHP are all SAPI-driven. >> There is no way to use PHP without at least a stub SAPI layer. > > There is, however, a way to use Zend Engine/TSRM. With this change, Zend > Engine/TSRM could no longer be used without PHP. And all this for some > time() patch... > >> That could be done, yes. I'm just not sure it is worth the complexity. > > I, for one, don't really understand what all this filesystem stuff does > in TSRM anyway. It's not like it has anything to do with thread safety. > Maybe it should just be moved to PHP and Zend Engine should talk to it > via handlers? > >> TSRM is obviously a PHP-specific thing and it is already somewhat >> SAPI-dependant even without this. The THREAD_T and MUTEX_T definitions >> change based on the chosen SAPI. It doesn't explicitly include SAPI.h > > No, it's not SAPI-dependent. It's environment-dependent, which is > entirely different thing. It can be configured, built and used without PHP. 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; that makes it environment-dependent instead of explicitly-dependent, and also way harder to debug. Environmental side-effects like that are nasty. -Rasmus