delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/09/10/07:10:41

Date: Tue, 10 Sep 1996 14:06:32 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: DJ Delorie <dj AT delorie DOT com>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: V2 alpha 980908 -- library docs
In-Reply-To: <199609090348.XAA28882@delorie.com>
Message-Id: <Pine.SUN.3.91.960910140311.10696I-100000@is>
Mime-Version: 1.0

Most of the problems below were born because of my errors in the diffs I 
submitted earlier.  Sorry about that.

*** src/libc/posix/sys/stat/djbits.txh	Mon Jul 10 05:40:54 1995
--- /bin/gcc/src/libc/posix/sys/stat/djbits.txh	Sat Apr 27 11:28:46 1996
***************
*** 10,16 ****
  This variable contains bits for some fields of struct stat which are
  expensive to compute under DOS.  Any such computation is only done by
  @ref{stat} or @ref{fstat} if the corresponding bit in
! @code{_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 @code{f?stat()} for your application, clear only the bits
--- 10,16 ----
  This variable contains bits for some fields of struct stat which are
  expensive to compute under DOS.  Any such computation is only done by
  @ref{stat} or @ref{fstat} if the corresponding bit in
! @code{_djstat_flags} is @emph{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 @code{f?stat()} for your application, clear only the bits
***************
*** 43,49 ****
  
  Causes @code{stat} to compute directory size by counting the number of its
  entries (unless some friendly network redirector brought a true directory
! size with it).
  
  @item _STAT_ROOT_TIME
  
--- 43,50 ----
  
  Causes @code{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 @code{st_nlink} field.
  
  @item _STAT_ROOT_TIME
  
***************
*** 144,150 ****
  printed messages, which will further clarify the meaning of the above bits
  and their descriptions printed by @ref{_djstat_describe_lossage}.
  
!   SDA (Swappable DOS Area) -- this is an internal DOS structure.
  @code{stat()} uses it to get the full directory entry (including the
  starting cluster number) of a file.  The pointer to SDA found by
  @code{stat()} is trusted only if we find the pathname of our file at a
--- 145,151 ----
  printed messages, which will further clarify the meaning of the above bits
  and their descriptions printed by @ref{_djstat_describe_lossage}.
  
!   SDA (Swappable Data Area) -- this is an internal DOS structure.
  @code{stat()} uses it to get the full directory entry (including the
  starting cluster number) of a file.  The pointer to SDA found by
  @code{stat()} is trusted only if we find the pathname of our file at a
***************
*** 160,163 ****
  
    Hashing -- the fall-back method of returning a unique inode number for
  each file.  It is used whenever the starting cluster of a file couldn't be
! reliably determined.
--- 161,168 ----
  
    Hashing -- the fall-back method of returning a unique inode number for
  each file.  It is used whenever the starting cluster of a file couldn't be
! reliably determined.  The full pathname of the file is looked up in a
! table of files seen earlier (hashing is used to speed the lookup
! process).  If found, the inode from the table is returned; this ensures
! that a given file will get the same inode number.  Otherwise a new inode
! number is invented, recorded in the table and returned to caller.
*** src/libc/go32/dpmiexcp.t~0	Sat Apr 27 05:04:00 1996
--- src/libc/go32/dpmiexcp.txh	Mon Sep  9 22:54:24 1996
***************
*** 11,17 ****
  @subheading Description
  
  This function raises the given signal @var{sig}.
! @xref{signal}.
  
  @subheading Return Value
  
--- 11,17 ----
  @subheading Description
  
  This function raises the given signal @var{sig}.
! @xref{signal, the list of possible signals}.
  
  @subheading Return Value
  
***************
*** 63,70 ****
  of type @code{volatile sig_atomic_t} (defined as @code{int} on
  @code{<signal.h>}) and return.  Handlers for hardware interrupts need
  also be locked in memory (so that the operation of virtual memory
! mechanism won't swap them out), locking memory regions,
! @xref{__dpmi_lock_linear_region}.  Handlers for software interrupts can also
  terminate by calling @code{abort}, @code{exit} or @code{longjmp}.
  
  The following signals are defined on @code{<signal.h>}:
--- 63,70 ----
  of type @code{volatile sig_atomic_t} (defined as @code{int} on
  @code{<signal.h>}) and return.  Handlers for hardware interrupts need
  also be locked in memory (so that the operation of virtual memory
! mechanism won't swap them out), @xref{__dpmi_lock_linear_region, 
! locking memory regions}.  Handlers for software interrupts can also
  terminate by calling @code{abort}, @code{exit} or @code{longjmp}.
  
  The following signals are defined on @code{<signal.h>}:
***************
*** 219,225 ****
  @subheading Description
  
  This function sets and resets the bit which controls whether
! @code{SIGINT} (SIGINT, @pxref{signal}) will be raised when you press
  @kbd{Ctrl-C}.  By default @kbd{Ctrl-C} generates an interrupt signal
  which, if uncaught by a signal handler, will abort your program.
  However, when you call the @code{setmode} library function to switch the
--- 219,225 ----
  @subheading Description
  
  This function sets and resets the bit which controls whether
! @code{SIGINT} (@pxref{signal, SIGINT}) will be raised when you press
  @kbd{Ctrl-C}.  By default @kbd{Ctrl-C} generates an interrupt signal
  which, if uncaught by a signal handler, will abort your program.
  However, when you call the @code{setmode} library function to switch the
***************
*** 238,245 ****
  control it.
  
  Also note that in DJGPP, the effect of the interrupt signal will only be
! seen when the program is in protected mode (Signal Mechanism,
! @xref{signal}, for more details).  Thus, if you press @kbd{Ctrl-C} while your
  program calls DOS (e.g., when reading from the console), the
  @code{SIGINT} signal handler will only be called after that call
  returns.
--- 238,245 ----
  control it.
  
  Also note that in DJGPP, the effect of the interrupt signal will only be
! seen when the program is in protected mode (@xref{signal, Signal Mechanism},
! for more details).  Thus, if you press @kbd{Ctrl-C} while your
  program calls DOS (e.g., when reading from the console), the
  @code{SIGINT} signal handler will only be called after that call
  returns.
*** src/libc/posix/sys/stat/stat.txh	Sun Sep  1 01:09:32 1996
--- /bin/gcc/src/libc/posix/sys/stat/stat.txh	Sat Aug 17 13:21:08 1996
***************
*** 21,27 ****
          ino_t    st_ino;       /* starting cluster or a unique identifier */
          mode_t   st_mode;      /* file mode - S_IF* and S_IRUSR/S_IWUSR */
          time_t   st_mtime;     /*            ''             */
!         nlink_t  st_nlink;     /* 1 */
          off_t    st_size;      /* size of file in bytes */
          off_t    st_blksize;   /* the size of transfer buffer */
          uid_t    st_uid;       /* getuid() */
--- 21,27 ----
          ino_t    st_ino;       /* starting cluster or a unique identifier */
          mode_t   st_mode;      /* file mode - S_IF* and S_IRUSR/S_IWUSR */
          time_t   st_mtime;     /*            ''             */
!         nlink_t  st_nlink;     /* 2 + number of subdirs, or 1 for files */
          off_t    st_size;      /* size of file in bytes */
          off_t    st_blksize;   /* the size of transfer buffer */
          uid_t    st_uid;       /* getuid() */
***************
*** 81,83 ****
--- 81,88 ----
  which is open and has been written to, because @code{stat()} will only
  return correct data after the file is closed.  Use @ref{fstat} while the
  file is open.
+ 
+ 8. The number of links @code{st_nlink} is always 1 for files other than
+ directories.  For directories, it is the number of subdirectories plus
+ 2.  This is so that programs written for Unix that depend on this to
+ optimize recursive traversal of the directory tree, will still work.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019