Re: [PHP4BETA] cvs: /php4 fopen-wrappers.c
| From: | Andi Gutmans | Date: | Thu, 30 Mar 2000 23:42:40 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4 fopen-wrappers.c | ||
| References: | 1 2 3 4 5 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12924@lists.php.net to get a copy of this message | ||
I think it is a trade-off either way.
We can always change it as after my change a simple search&replace is very easy .
I want to first get it working this way and I want to be able to use getcwd() in a non-broken way such as #undef PHP_GETCWD in SAPI.c and possible other places such as the sapi modules if needed.
The CODING_STANDARDS needs to be updated as it is outdated not only for this change but probably some other ones too.
Let's just try and get the VIRTUAL_DIR stuff to work in the near future and once it does, we can always decide later to replace the macros.
Right now the foundation php_virtual_cwd.c still needs work in order to hook it into PHP 4. This should be our main concern right now. The cwd_state should be saved in SG() (SAPI Globals).
Andi
At 01:16 AM 3/31/00 +0200, Sascha Schumann wrote:
On Fri, Mar 31, 2000 at 01:19:05AM +0200, Andi Gutmans wrote: I thought we agreed on Shane's approach. I think it is better because there will be a tiny amount of places where we will really call the real functions such as getcwd() (in SAPI.c) so it's probably best not to confuse them and have unexpected behavior. I was for redefining them in the beginning but then I agreed with Shane on his approach. From your Email I understood you were also in favor of this approach but I must have misread it. Anyway, I do think this is the best way of doing it now. If you look at our CODING_STANDARDS, you will notice that they are completely outdated. What I fear is that new extension authors will join the PHP community without having any decent documentation. How shall they know that they must use PHP_CHDIR and friends in their code? In the future, there will be separate extensions distributed from various places which are not under our control. I think redefining chdir etc. to their virtual counterparts would proactively prevent broken code, and thus leveraging code quality. - Sascha--- Andi Gutmans <andi@zend.com> http://www.zend.com/