* (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,

fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
	fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
	fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
	pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
	security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h):
	Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
	off_t to __off32_t throughout.  Use INVALID_UID, INVALID_GID and
	INVALID_SEEK instead casting -1 to the appropriate type.
	* winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
	* include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
	types.  Don't declare acl functions when compiling Cygwin.
	* include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
	correct types for internal usage.
This commit is contained in:
Corinna Vinschen
2002-02-10 13:38:51 +00:00
parent a505db6554
commit de4e0d3001
32 changed files with 231 additions and 189 deletions

View File

@@ -77,16 +77,16 @@ fhandler_dev_floppy::close (void)
return fhandler_dev_raw::close ();
}
off_t
fhandler_dev_floppy::lseek (off_t offset, int whence)
__off32_t
fhandler_dev_floppy::lseek (__off32_t offset, int whence)
{
int ret;
char buf[512];
long long drive_size = 0;
long long lloffset = offset;
long long current_position;
off_t sector_aligned_offset;
off_t bytes_left;
__off32_t sector_aligned_offset;
__off32_t bytes_left;
DWORD low;
LONG high = 0;
@@ -158,12 +158,12 @@ fhandler_dev_floppy::lseek (off_t offset, int whence)
}
high = lloffset >> 32;
low = lloffset & 0xffffffff;
if (high || (off_t) low < 0)
if (high || (__off32_t) low < 0)
{
set_errno (EFBIG);
return -1;
}
offset = (off_t) low;
offset = (__off32_t) low;
/* FIXME: sector can possibly be not 512 bytes long */
sector_aligned_offset = (offset / 512) * 512;