Date: Mon, 31 Oct 94 17:21:25 -0500 From: dj AT stealth DOT ctron DOT com (DJ Delorie) To: eliz AT is DOT elta DOT co DOT il Cc: turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp, djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: stat()/fstat() for DJGPP, v.02 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