/[tar]/tar/src/system.h
ViewVC logotype

Diff of /tar/src/system.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by gray, Wed Oct 8 11:18:01 2003 UTC revision 1.15 by eggert, Thu Nov 13 06:23:23 2003 UTC
# Line 339  extern int errno; Line 339  extern int errno;
339     size is greater than 512 bytes; so ST_BLKSIZE code below, in preparation     size is greater than 512 bytes; so ST_BLKSIZE code below, in preparation
340     for some cleanup in this area, later.  */     for some cleanup in this area, later.  */
341    
 /* Get or fake the disk device blocksize.  Usually defined by sys/param.h  
    (if at all).  */  
   
 #if !defined(DEV_BSIZE) && defined(BSIZE)  
 # define DEV_BSIZE BSIZE  
 #endif  
 #if !defined(DEV_BSIZE) && defined(BBSIZE) /* SGI */  
 # define DEV_BSIZE BBSIZE  
 #endif  
 #ifndef DEV_BSIZE  
 # define DEV_BSIZE 4096  
 #endif  
   
342  /* Extract or fake data from a `struct stat'.  ST_BLKSIZE gives the  /* Extract or fake data from a `struct stat'.  ST_BLKSIZE gives the
343     optimal I/O blocksize for the file, in bytes.  Some systems, like     optimal I/O blocksize for the file, in bytes.  Some systems, like
344     Sequents, return st_blksize of 0 on pipes.  */     Sequents, return st_blksize of 0 on pipes.  */
345    
346    #define DEFAULT_ST_BLKSIZE 512
347    
348  #if !HAVE_ST_BLKSIZE  #if !HAVE_ST_BLKSIZE
349  # define ST_BLKSIZE(Statbuf) DEV_BSIZE  # define ST_BLKSIZE(Statbuf) DEFAULT_ST_BLKSIZE
350  #else  #else
351  # define ST_BLKSIZE(Statbuf) \  # define ST_BLKSIZE(Statbuf) \
352      ((Statbuf).st_blksize > 0 ? (Statbuf).st_blksize : DEV_BSIZE)      ((Statbuf).st_blksize > 0 ? (Statbuf).st_blksize : DEFAULT_ST_BLKSIZE)
353  #endif  #endif
354    
355  /* Extract or fake data from a `struct stat'.  ST_NBLOCKS gives the  /* Extract or fake data from a `struct stat'.  ST_NBLOCKS gives the
# Line 522  time_t time (); Line 511  time_t time ();
511  #if XENIX  #if XENIX
512  # include <sys/inode.h>  # include <sys/inode.h>
513  #endif  #endif
   
   

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26