Re: cvs: php4 /main php_ini.c
| From: | Andi Gutmans | Date: | Sat, 20 Apr 2002 19:53:57 +0000 |
| Subject: | Re: cvs: php4 /main php_ini.c | ||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-11279@lists.php.net to get a copy of this message | ||
At 19:56 20/04/2002 +0200, Marcus Börger wrote:
At 02:41 20.04.2002, Yasuo Ohgaki wrote:Hey, The VCWD_ stuff is meant for things which contain path names. I don't really mind having these macros in the header files but I'm not sure I'd call them VCWD_IS*. By the way why won't the following work: #Ifndef S_ISDIR #define S_ISDIR(m) ((m.st_mode & S_IFMT) == S_IFDIR) #endif It would save yet another macro name. AndiMarcus Börger wrote:I had a look and found that VCWD_* are defined in tsrm_virtual_cwd.h. So perhaps we should name the macros VCWD_IS* instead of S_IS* or STAT_IS* and place them in the same directory (Andi/Sascha)?Now that i see what you meant and what you did i have an objection! The macro S_ISDIR is normally defined to enable changes in the structure and therefor make type detection independent of the actual struct layout. If you consider the different occurances for the structure and the many filesystems that exist and the many platforms and ... i think it would be better to keep it or to add a define our own: #ifdef S_ISDIR #define STAT_ISDIR(m) S_ISDIR(m) #else #define STAT_ISDIR(m) ((m.st_mode & S_IFMT) == S_IFDIR) #endifSounds good to me. We probably better to define macro in php.h or like. Do you have any idea where it should be?