* (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:
@@ -231,8 +231,8 @@ fhandler_dev_mem::close (void)
|
||||
return fhandler_base::close ();
|
||||
}
|
||||
|
||||
off_t
|
||||
fhandler_dev_mem::lseek (off_t offset, int whence)
|
||||
__off32_t
|
||||
fhandler_dev_mem::lseek (__off32_t offset, int whence)
|
||||
{
|
||||
switch (whence)
|
||||
{
|
||||
@@ -251,13 +251,13 @@ fhandler_dev_mem::lseek (off_t offset, int whence)
|
||||
|
||||
default:
|
||||
set_errno (EINVAL);
|
||||
return (off_t) -1;
|
||||
return ILLEGAL_SEEK;
|
||||
}
|
||||
|
||||
if (pos > mem_size)
|
||||
{
|
||||
set_errno (EINVAL);
|
||||
return (off_t) -1;
|
||||
return ILLEGAL_SEEK;
|
||||
}
|
||||
|
||||
return pos;
|
||||
@@ -265,7 +265,7 @@ fhandler_dev_mem::lseek (off_t offset, int whence)
|
||||
|
||||
HANDLE
|
||||
fhandler_dev_mem::mmap (caddr_t *addr, size_t len, DWORD access,
|
||||
int flags, off_t off)
|
||||
int flags, __off32_t off)
|
||||
{
|
||||
if ((DWORD) off >= mem_size
|
||||
|| (DWORD) len >= mem_size
|
||||
|
Reference in New Issue
Block a user