]> Dogcows Code - chaz/tar/blobdiff - src/system.h
Bugfix by Jürgen Weigert
[chaz/tar] / src / system.h
index 9fd1c1b6573e2b671507de1fe0d5cdaaa39e514d..d82e8cd38e7dad94420110dc200823dd44caaa18 100644 (file)
@@ -339,28 +339,17 @@ extern int errno;
    size is greater than 512 bytes; so ST_BLKSIZE code below, in preparation
    for some cleanup in this area, later.  */
 
-/* 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
-
 /* Extract or fake data from a `struct stat'.  ST_BLKSIZE gives the
    optimal I/O blocksize for the file, in bytes.  Some systems, like
    Sequents, return st_blksize of 0 on pipes.  */
 
+#define DEFAULT_ST_BLKSIZE 512
+
 #if !HAVE_ST_BLKSIZE
-# define ST_BLKSIZE(Statbuf) DEV_BSIZE
+# define ST_BLKSIZE(Statbuf) DEFAULT_ST_BLKSIZE
 #else
 # define ST_BLKSIZE(Statbuf) \
-    ((Statbuf).st_blksize > 0 ? (Statbuf).st_blksize : DEV_BSIZE)
+    ((Statbuf).st_blksize > 0 ? (Statbuf).st_blksize : DEFAULT_ST_BLKSIZE)
 #endif
 
 /* Extract or fake data from a `struct stat'.  ST_NBLOCKS gives the
@@ -487,10 +476,17 @@ char *getenv ();
 #endif
 
 #include <time.h>
-#ifndef time
+#if defined(HAVE_SYS_TIME_H) && defined(TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+#endif
+#if ! HAVE_DECL_TIME
 time_t time ();
 #endif
 
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#endif
+
 /* Library modules.  */
 
 #include <dirname.h>
@@ -510,16 +506,15 @@ time_t time ();
 #if MSDOS
 # include <process.h>
 # define SET_BINARY_MODE(arc) setmode(arc, O_BINARY)
-# define ERRNO_IS_EACCESS errno == EACCESS
+# define ERRNO_IS_EACCES errno == EACCES
+# define mkdir(file, mode) (mkdir) (file)
 #else
 # include <pwd.h>
 # include <grp.h>
 # define SET_BINARY_MODE(arc)
-# define ERRNO_IS_EACCESS 0
+# define ERRNO_IS_EACCES 0
 #endif
 
 #if XENIX
 # include <sys/inode.h>
 #endif
-
-
This page took 0.024759 seconds and 4 git commands to generate.