* cygwin.din (fstat64): New symbol.

(ftruncate64): Ditto.
	(lseek64): Ditto.
	(lstat64): Ditto.
	(mmap64): Ditto.
	(seekdir64): Ditto.
	(stat64): Ditto.
	(telldir64): Ditto.
	(truncate64): Ditto.
	* dir.cc (telldir64): New function.
	(telldir): Call telldir64().
	(seekdir64): New function.
	(seekdir): Call seekdir64().
	* fhandler.h: Redefine all methods using __off32_t to use __off64_t.
	* fhandler.cc: Use __off64_t and struct __stat64 throughout.
	* fhandler_clipboard.cc: Ditto.
	* fhandler_disk_file.cc: Ditto.
	* fhandler_dsp.cc: Ditto.
	* fhandler_floppy.cc: Ditto.
	* fhandler_mem.cc: Ditto.
	* fhandler_random.cc: Ditto.
	* fhandler_socket.cc: Ditto.
	* fhandler_tape.cc: Ditto.
	* fhandler_zero.cc: Ditto.
	* pipe.cc: Ditto.
	* glob.c: Ditto, call lstat64 and stat64 in Cygwin.
	* mmap.cc: Use __off64_t throughout.
	(mmap64): New function.
	* sec_acl.cc (acl_worker): Use struct __stat64, call stat64 and lstat64.
	* syscalls.cc (lseek64): New function.
	(stat64_to_stat32): Ditto.
	(fstat64): Ditto.
	(stat64): Ditto.
	(lstat64): Ditto.
	(ftruncate64): Ditto.
	(truncate64): Ditto.
	(_fstat): Call fstat64.
	(_stat): Call stat64.
	(cygwin_lstat): Rename to avoid declaration problem.  Call lstat64.
	(stat_worker): Use struct __stat64.
	(access): Ditto.
	(ftruncate): Call ftruncate64.
	(truncate): Call truncate64.
	* wincap.cc: Set flag has_64bit_file_access appropriately.
	* wincap.h: Add flag has_64bit_file_access.
	* winsup.h (ILLEGAL_SEEK): Define as __off64_t.
	(stat_dev): Declare using struct __stat64.
	(stat_worker): Ditto.
	* include/cygwin/stat.h (struct __stat32): Define if compiling Cygwin.
	(struct __stat64): Ditto.
	(struct stat): Revert definition with explicitly sized datatypes.
	Eliminate sized field names.
	* include/cygwin/types.h (blksize_t): New type.
	(__blkcnt32_t): Ditto.
	(__blkcnt64_t): Ditto.
	(blkcnt_t): Ditto.
This commit is contained in:
Corinna Vinschen
2002-02-25 17:47:51 +00:00
parent 5a909729b1
commit acb5617538
24 changed files with 433 additions and 238 deletions

View File

@ -16,36 +16,75 @@ details. */
extern "C" {
#endif
struct stat
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
__uid16_t __st_uid16;
__gid16_t __st_gid16;
dev_t st_rdev;
__off32_t __st_size32;
time_t st_atime;
__uid32_t __st_uid32;
time_t st_mtime;
__uid32_t __st_gid32;
time_t st_ctime;
long st_spare3;
long st_blksize;
long st_blocks;
__off64_t __st_size64;
#ifdef __INSIDE_CYGWIN__
struct __stat32
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
__uid16_t st_uid;
__gid16_t st_gid;
dev_t st_rdev;
__off32_t st_size;
time_t st_atime;
long st_spare1;
time_t st_mtime;
long st_spare2;
time_t st_ctime;
long st_spare3;
blksize_t st_blksize;
__blkcnt32_t st_blocks;
long st_spare4[2];
};
#ifdef __CYGWIN_USE_BIG_TYPES__
#define st_uid __st_uid32
#define st_gid __st_gid32
#define st_size __st_size64
#else
#define st_uid __st_uid16
#define st_gid __st_gid16
#define st_size __st_size32
#endif /* __CYGWIN_USE_BIG_TYPES__ */
struct __stat64
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
__uid32_t st_uid;
__gid32_t st_gid;
dev_t st_rdev;
__off64_t st_size;
time_t st_atime;
long st_spare1;
time_t st_mtime;
long st_spare2;
time_t st_ctime;
long st_spare3;
blksize_t st_blksize;
__blkcnt64_t st_blocks;
long st_spare4[2];
};
extern int fstat64 (int fd, struct __stat64 *buf);
extern int stat64 (const char *file_name, struct __stat64 *buf);
extern int lstat64 (const char *file_name, struct __stat64 *buf);
#endif
struct stat
{
dev_t st_dev;
ino_t st_ino;
mode_t st_mode;
nlink_t st_nlink;
uid_t st_uid;
gid_t st_gid;
dev_t st_rdev;
off_t st_size;
time_t st_atime;
long st_spare1;
time_t st_mtime;
long st_spare2;
time_t st_ctime;
long st_spare3;
blksize_t st_blksize;
blkcnt_t st_blocks;
long st_spare4[2];
};
#ifdef __cplusplus
}