Mail Archives: djgpp/1994/10/31/21:11:52
I think it would be a good idea to have a global variable, say
__djgpp_stat_flags, that determines what stat() does. If zero (i.e.
the program didn't set it at all), then you get the "default" behavior
(most compatible with unix is my vote). Each set bit indicates some
deviation from the "default", for examples:
don't check file contents for exec priviledge
don't worry about the exec bit at all
try real hard to find the timestamp of /
don't worry about simulating inode numbers
don't worry about fstat()'s hard parts
The applications can set these bits with a simple declaration
somewhere, which would then globally determine the behavior of stat()
without needing to add complex code inside the application itself or
recompiling stat or providing other functions to do different things.
The appliction simply specifies how compatible it needs stat() to be
and stops worrying about it.
DJ
- Raw text -