das 6f407f2920 scandir(3) previously used st_size to obtain an initial estimate
of the array length needed to store all the directory entries.
Although BSD has historically guaranteed that st_size is the size
of the directory file, POSIX does not, and more to the point, some
recent filesystems such as ZFS use st_size to mean something else.

The fix is to not stat the directory at all, set the initial
array size to 32 entries, and realloc it in powers of 2 if that
proves insufficient.

PR:	113668
2008-03-16 19:08:53 +00:00
..
2005-01-20 09:17:07 +00:00
2007-04-03 18:35:20 +00:00
2005-01-20 09:17:07 +00:00
2005-02-06 03:23:31 +00:00
2004-07-02 23:52:20 +00:00
2005-11-23 15:41:36 +00:00
2007-02-11 18:14:49 +00:00
2007-04-05 21:17:52 +00:00
2005-02-06 03:23:31 +00:00
2005-01-20 09:17:07 +00:00
2005-01-20 09:17:07 +00:00
2004-07-02 16:45:56 +00:00
2004-07-02 16:45:56 +00:00
2008-03-13 10:26:17 +00:00
2008-03-13 10:25:30 +00:00
2007-01-20 08:24:02 +00:00
2005-02-13 23:45:54 +00:00
2007-10-16 11:29:13 +00:00
2004-07-03 22:30:10 +00:00
2007-10-30 15:26:20 +00:00
2006-04-18 21:37:24 +00:00
2004-06-30 13:55:08 +00:00