On Wed, Jan 08, 2003 at 11:12:50AM +0100, Daniel Stenberg wrote: > On Wed, 8 Jan 2003, Alexey Dokuchaev wrote: > > > PS. I'm developing under FreeBSD, and my patch will not compile cleanly > > under Linux unless two small changes are made: change "dp->d_namlen" to > > "dp->d_reclen" on lines 158 and 159 of patch. I wonder why in hell Linux > > does things like that?? (With all due respect.) > > I'd guess that they do that because POSIX doesn't specify those things with > enough details, so I'm afraid both FreeBSD and Linux can claim POSIX > readdir() compliance anyway. > > The d_name[] field of the dirent struct is the only field you can rely on to > exist.
Well, I guess that we could use something like MAX_PATH_LEN instead... > > Your patch will thus unfortunately very likely break on other platforms as > well. Let's work it out, then! ;-) ./danfe
