Re: cvs: php4 / acinclude.m4
| From: | Sascha Schumann | Date: | Mon, 11 Sep 2000 16:10:28 +0000 |
| Subject: | Re: cvs: php4 / acinclude.m4 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32932@lists.php.net to get a copy of this message | ||
On Mon, 11 Sep 2000, Stanislav Malyshev wrote:
> SS>> main() {
> SS>> DIR *dir;
> SS>> - struct dirent entry, *pentry;
> SS>> + char entry[sizeof(struct dirent)+257];
> SS>> + struct dirent *pentry = (struct dirent *) &entry;
> SS>>
> SS>> dir = opendir("/");
> SS>> if (!dir)
>
> Actually, I wanted to do something different - make configure to check for
> that NULL case and drop the HAVE_POSIX flag if NULL case doesn't work. I'm
> attaching the patch that does it - please check it. The only problem is
> that #undef HAVE_POSIX_READDIR_R doesn't really work - configure turns it
> back to #define. Maybe I have to undefine it in configure itself?
That was the method I had in mind when discussing this in pm. I
started to dislike it, because it has only one advantage: You
don't need to initialize the third argument to readdir_r(). The
currently checked in method is quick and portable. Enough reasons
for me to prefer it.
- Sascha