Query about <dirent.h>
henry at utzoo.uucp
henry at utzoo.uucp
Tue Nov 28 15:33:50 AEST 1989
From: henry at utzoo.uucp
>From: Andy Tanenbaum <uunet!cs.vu.nl!ast>
>I don't follow. What is it that that the standards don't promise. Surely
>a programmer may declare a struct dirent...
That is exactly what is not promised: that you can declare a `struct
dirent' (as opposed to a `struct dirent *') that is of any use to you.
The only use for `struct dirent' defined in 1003.1 is that readdir()
returns a pointer to one, and that the thing that pointer points to has
a member `d_name' that you can examine. There is no promise that the
type `struct dirent' is good for anything else whatsoever.
Henry Spencer at U of Toronto Zoology
uunet!attcan!utzoo!henry henry at zoo.toronto.edu
Volume-Number: Volume 17, Number 73
More information about the Comp.std.unix
mailing list