version 1.2, 1999/09/29 18:16:20 |
version 1.3, 1999/09/29 21:15:54 |
|
|
int fd, blksize; |
int fd, blksize; |
{ |
{ |
size_t size; |
size_t size; |
#ifdef HAVE_ST_BLKSIZE |
|
struct stat stb; |
struct stat stb; |
|
|
if (fstat(fd, &stb) < 0) { |
if (fstat(fd, &stb) < 0) { |
|
|
size = blksize; |
size = blksize; |
else |
else |
size = blksize + (stb.st_blksize - blksize % stb.st_blksize) % |
size = blksize + (stb.st_blksize - blksize % stb.st_blksize) % |
stb.st_blksize; |
stb.st_blksize; |
#else /* HAVE_ST_BLKSIZE */ |
|
size = blksize; |
|
#endif /* HAVE_ST_BLKSIZE */ |
|
if (bp->cnt >= size) |
if (bp->cnt >= size) |
return (bp); |
return (bp); |
if (bp->buf == NULL) |
if (bp->buf == NULL) |