]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Use HAVE_STRUCT_STAT_ST_BLOCKS, not deprecated HAVE_ST_BLOCKS.
authorJim Meyering <jim@meyering.net>
Fri, 5 Nov 1999 09:55:24 +0000 (09:55 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 5 Nov 1999 09:55:24 +0000 (09:55 +0000)
lib/fileblocks.c
src/copy.c
src/system.h

index 1a44516f3d0fb2a61af0bab5be00f22a6ae378df..2c944307d700b7ca050c729515354ce5d089e28f 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert file size to number of blocks on System V-like machines.
-   Copyright (C) 1990, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
 # include <sys/param.h>
 #endif
 
-#if !HAVE_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
+#if !HAVE_STRUCT_STAT_ST_BLOCKS && !defined _POSIX_SOURCE && defined BSIZE
 
 # if HAVE_UNISTD_H
 #  include <unistd.h>
index d40dc1901ca935bb9880d4f0f7298729d3760ae8..e06acc14a7f37a63adf9b21ee7296c6e3afbb015 100644 (file)
@@ -215,7 +215,7 @@ copy_reg (const char *src_path, const char *dst_path,
 
   buf_size = ST_BLKSIZE (sb);
 
-#if HAVE_ST_BLOCKS
+#if HAVE_STRUCT_STAT_ST_BLOCKS
   if (sparse_mode == SPARSE_AUTO && S_ISREG (sb.st_mode))
     {
       /* Use a heuristic to determine whether SRC_PATH contains any
index 58b378289ac6d46a0a1e57b64b86b09317e7f57e..4e2be1d46d91c39ac4b60c5dab79c31212c6e31f 100644 (file)
@@ -311,14 +311,14 @@ extern int errno;
    ST_BLKSIZE: Preferred I/O blocksize for the file, in bytes.
    ST_NBLOCKS: Number of blocks in the file, including indirect blocks.
    ST_NBLOCKSIZE: Size of blocks used when calculating ST_NBLOCKS.  */
-#ifndef HAVE_ST_BLOCKS
+#ifndef HAVE_STRUCT_STAT_ST_BLOCKS
 # define ST_BLKSIZE(statbuf) DEV_BSIZE
 # if defined(_POSIX_SOURCE) || !defined(BSIZE) /* fileblocks.c uses BSIZE.  */
 #  define ST_NBLOCKS(statbuf) ((statbuf).st_size / ST_NBLOCKSIZE + ((statbuf).st_size % ST_NBLOCKSIZE != 0))
 # else /* !_POSIX_SOURCE && BSIZE */
 #  define ST_NBLOCKS(statbuf) (st_blocks ((statbuf).st_size))
 # endif /* !_POSIX_SOURCE && BSIZE */
-#else /* HAVE_ST_BLOCKS */
+#else /* HAVE_STRUCT_STAT_ST_BLOCKS */
 /* Some systems, like Sequents, return st_blksize of 0 on pipes. */
 # define ST_BLKSIZE(statbuf) ((statbuf).st_blksize > 0 \
                               ? (statbuf).st_blksize : DEV_BSIZE)
@@ -336,7 +336,7 @@ extern int errno;
 #   endif /* _CRAY */
 #  endif /* not AIX PS/2 */
 # endif /* !hpux */
-#endif /* HAVE_ST_BLOCKS */
+#endif /* HAVE_STRUCT_STAT_ST_BLOCKS */
 
 #ifndef ST_NBLOCKS
 # define ST_NBLOCKS(statbuf) ((statbuf).st_blocks)