version 1.2, 1996/09/21 06:23:07 |
version 1.3, 1996/10/14 03:55:15 |
|
|
#endif |
#endif |
|
|
/* |
/* |
* Some systems have the page size in statfs, some in stat |
* Some systems have the page size in statfs.f_bsize, some in stat.st_blksize |
*/ |
*/ |
#ifdef HAVE_SYS_STATFS_H |
#ifdef HAVE_ST_BLKSIZE |
# include <sys/statfs.h> |
|
# define STATFS statfs |
|
# define F_BSIZE f_bsize |
|
# ifdef MINT |
|
# define fstatfs(fd, buf, len, nul) fstat((fd), (buf)) |
|
# endif |
|
#else |
|
# define STATFS stat |
# define STATFS stat |
# define F_BSIZE st_blksize |
# define F_BSIZE st_blksize |
# define fstatfs(fd, buf, len, nul) fstat((fd), (buf)) |
# define fstatfs(fd, buf, len, nul) fstat((fd), (buf)) |
|
#else |
|
# ifdef HAVE_SYS_STATFS_H |
|
# include <sys/statfs.h> |
|
# define STATFS statfs |
|
# define F_BSIZE f_bsize |
|
# ifdef MINT /* do we still need this? */ |
|
# define fstatfs(fd, buf, len, nul) fstat((fd), (buf)) |
|
# endif |
|
# endif |
#endif |
#endif |
|
|
/* |
/* |
|
|
MEMFILE *mfp; |
MEMFILE *mfp; |
int i; |
int i; |
off_t size; |
off_t size; |
#ifdef UNIX |
#if defined(STATFS) && defined(UNIX) && !defined(__QNX__) |
|
# define USE_FSTATFS |
struct STATFS stf; |
struct STATFS stf; |
#endif |
#endif |
|
|
|
|
} |
} |
mfp->mf_page_size = MEMFILE_PAGE_SIZE; |
mfp->mf_page_size = MEMFILE_PAGE_SIZE; |
|
|
#ifdef UNIX |
#ifdef USE_FSTATFS |
/* |
/* |
* Try to set the page size equal to the block size of the device. |
* Try to set the page size equal to the block size of the device. |
* Speeds up I/O a lot. |
* Speeds up I/O a lot. |