Go to the first, previous, next, last section, table of contents.


_djstat_flags

Syntax

#include <sys/stat.h>

extern unsigned short   _djstat_flags;

This variable contains bits for some fields of struct stat which are expensive to compute under DOS. Any such computation is only done by section stat or section fstat if the corresponding bit in _djstat_flags is cleared. By default, all the bits are cleared, so applications which don't care, automagically get a full version, possibly at a price of performance. To get the fastest possible f?stat() for your application, clear only the bits which you need and set all the others.

The following bits are currently defined:

_STAT_INODE
Causes f?stat() to compute the st_ino (inode number) field.
_STAT_EXEC_EXT
Tells f?stat() to compute the execute access bit from extension.
_STAT_EXEC_MAGIC
Tells f?stat() to compute the execute access bit from magic signature (the first two bytes of the file, see section _is_executable. Note that if _STAT_EXEC_MAGIC is set, but _STAT_EXEC_EXT is not, some files which shouldn't be flagged as executables (e.g., COFF *.o object files) will have their execute bit set, because they have the magic number signature at their beginning. Therefore, only use the above combination if you want to debug the list of extensions provided in is_exec.c file.
_STAT_DIRSIZE
Causes stat to compute directory size by counting the number of its entries (unless some friendly network redirector brought a true directory size with it). Also computes the number of subdirectories and sets the number of links st_nlink field.
_STAT_ROOT_TIME
Causes stat() to try to get time stamp of root directory from its volume label entry, if there is one.
_STAT_WRITEBIT
Tells fstat() that file's write access bit is required (this could be a problem only under some versions of Novell Netware).

Note that if you set a bit, some failure bits in section _djstat_fail_bits might not be set, because some computations which report failures are only done when they are required.

Portability

not ANSI, not POSIX


Go to the first, previous, next, last section, table of contents.