* path.cc (cygdrive_getmntent): Do not skip over drives of type
DRIVE_REMOVABLE. * fhandler.cc (fhandler_base::lseek): Be more paranoid when constructing offsets from 64 bit value. * syscalls.cc (logout): Avoid temp buffer memcpy since new scheme does not require it. (utmp_data): Rework as a macro which returns a pointer into a buffer. (getutent): Use new buffer allocation mechanism to grab a utmp buffer. (getutid): Ditto. (pututline): Ditto.
This commit is contained in:
@ -891,13 +891,13 @@ fhandler_base::lseek (_off64_t offset, int whence)
|
||||
DWORD win32_whence = whence == SEEK_SET ? FILE_BEGIN
|
||||
: (whence == SEEK_CUR ? FILE_CURRENT : FILE_END);
|
||||
|
||||
LONG off_low = offset & 0xffffffff;
|
||||
LONG off_low = ((__uint64_t) offset) & 0xffffffffLL;
|
||||
LONG *poff_high, off_high;
|
||||
if (!wincap.has_64bit_file_access ())
|
||||
poff_high = NULL;
|
||||
else
|
||||
{
|
||||
off_high = offset >> 32;
|
||||
off_high = ((__uint64_t) offset) >> 32LL;
|
||||
poff_high = &off_high;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user