[PHP-DEV] Re: [PHP-CVS] cvs: php4 / acinclude.m4 From: Sascha Schumann (sascha <email protected>)
Date: 09/11/00

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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>