Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>_djstat_flags</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_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
stat: or 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 *Note
     _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 *Note
_djstat_fail_bits:: might not be set, because some computations which
report failures are only done when they are required.


See Also: stat fstat

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson