Re: readdir() failures on libc5

From: Date: Thu, 07 Sep 2000 19:27:06 +0000
Subject: Re: readdir() failures on libc5
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-32610@lists.php.net to get a copy of this message
On Thu, 7 Sep 2000, Stanislav Malyshev wrote: > With help of Johan Ekenberg, I've found the source for readdir failures - > readdir_r in libc5 fails when third argument points to value that equals > 0. Don't ask me why. This code (slightly modified aclocal's > one) reproduces it: > > main() { > DIR *dir; > struct dirent entry, *pentry=NULL; > > dir = opendir("/"); > if (!dir) > exit(1); > if (readdir_r(dir, &entry, &pentry) == 0) > exit(0); > exit(1); > } > > It will return "1" on libc5. > > Now, the question is - what to do? Insert a hack in dir.c or modify > configure so that it will detect this situation? Also, if the latter - how > to do it right, can aclocal checks be modified? You need the output from config.guess. Then you can add these host-specific lines in configure.in around line 97: *host_alias*) ac_cv_func_readdir_r=no;; - Sascha

« previous php.dev (#32610) next »