X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fstat-size.h;h=049b8b9177efc76cac0c537f78033e75dbd77af8;hb=a77413333408e54b8d6c4e19918098794cef4b4b;hp=1e47500591ff35605849fd02d7531734427fa46b;hpb=c6d98d8cd52c163c2dba42a41da25356c4dad9f0;p=gnulib.git diff --git a/lib/stat-size.h b/lib/stat-size.h index 1e4750059..049b8b917 100644 --- a/lib/stat-size.h +++ b/lib/stat-size.h @@ -1,5 +1,5 @@ /* macros useful in interpreting size-related values in struct stat. - Copyright (C) 1989, 1991-2011 Free Software Foundation, Inc. + Copyright (C) 1989, 1991-2013 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 @@ -31,10 +31,6 @@ #endif -/* Much of the remainder of this file is not indented consistently - with the above, in order to make it easier to see that the text - is almost identical to part of the system.h header in coreutils. -*/ /* Get or fake the disk device blocksize. Usually defined by sys/param.h (if at all). */ #if !defined DEV_BSIZE && defined BSIZE @@ -49,7 +45,7 @@ -/* Extract or fake data from a `struct stat'. +/* Extract or fake data from a 'struct stat'. 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. */ @@ -67,10 +63,10 @@ # endif #else /* Some systems, like Sequents, return st_blksize of 0 on pipes. - Also, when running `rsh hpux11-system cat any-file', cat would + Also, when running 'rsh hpux11-system cat any-file', cat would determine that the output stream had an st_blksize of 2147421096. Conversely st_blksize can be 2 GiB (or maybe even larger) with XFS - on 64-bit hosts. Somewhat arbitrarily, limit the `optimal' block + on 64-bit hosts. Somewhat arbitrarily, limit the "optimal" block size to SIZE_MAX / 8 + 1. (Dividing SIZE_MAX by only 4 wouldn't suffice, since "cat" sometimes multiplies the result by 4.) If anyone knows of a system for which this limit is too small, please